mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
(security) updated ruby to 3.1.3
This commit is contained in:
parent
d13208210a
commit
cc830d7deb
@ -38,6 +38,8 @@ Rails/RedundantPresenceValidationOnBelongsTo:
|
|||||||
Enabled: false
|
Enabled: false
|
||||||
Style/DateTime:
|
Style/DateTime:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
Style/HashSyntax:
|
||||||
|
EnforcedShorthandSyntax: never
|
||||||
Rails/TimeZone:
|
Rails/TimeZone:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Rails/UnknownEnv:
|
Rails/UnknownEnv:
|
||||||
|
@ -1 +1 @@
|
|||||||
ruby-2.7.7
|
ruby-3.1.3
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Changelog Fab-manager
|
# Changelog Fab-manager
|
||||||
|
|
||||||
- Updated ruby to 2.7
|
- Updated ruby to 3.1
|
||||||
- Updated rails to 6.1
|
- Updated rails to 6.1
|
||||||
- Updated puma to 6.1
|
- Updated puma to 6.1
|
||||||
- Updated responders to 3.0
|
- Updated responders to 3.0
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM ruby:2.7.7-alpine
|
FROM ruby:3.1.3-alpine
|
||||||
MAINTAINER contact@fab-manager.com
|
MAINTAINER contact@fab-manager.com
|
||||||
|
|
||||||
# Install upgrade system packages
|
# Install upgrade system packages
|
||||||
|
9
Gemfile
9
Gemfile
@ -10,6 +10,13 @@ gem 'bootsnap'
|
|||||||
gem 'puma', '6.1.0'
|
gem 'puma', '6.1.0'
|
||||||
gem 'shakapacker', '6.5.5'
|
gem 'shakapacker', '6.5.5'
|
||||||
|
|
||||||
|
# rails 6 compatibility with ruby 3 (may not be required after upgrade to rails 7)
|
||||||
|
gem 'matrix'
|
||||||
|
gem 'net-imap', require: false
|
||||||
|
gem 'net-pop', require: false
|
||||||
|
gem 'net-smtp', require: false
|
||||||
|
gem 'psych', '< 4'
|
||||||
|
|
||||||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||||
gem 'jbuilder', '~> 2.5'
|
gem 'jbuilder', '~> 2.5'
|
||||||
gem 'jbuilder_cache_multi'
|
gem 'jbuilder_cache_multi'
|
||||||
@ -52,7 +59,7 @@ group :test do
|
|||||||
gem 'minitest-reporters'
|
gem 'minitest-reporters'
|
||||||
gem 'pdf-reader'
|
gem 'pdf-reader'
|
||||||
gem 'rubyXL'
|
gem 'rubyXL'
|
||||||
gem 'vcr', '6.0.0'
|
gem 'vcr', '~> 6.1.0'
|
||||||
gem 'webmock'
|
gem 'webmock'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
42
Gemfile.lock
42
Gemfile.lock
@ -42,7 +42,7 @@ GEM
|
|||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
active_record_query_trace (1.7)
|
active_record_query_trace (1.8)
|
||||||
activejob (6.1.7.2)
|
activejob (6.1.7.2)
|
||||||
activesupport (= 6.1.7.2)
|
activesupport (= 6.1.7.2)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
@ -126,6 +126,7 @@ GEM
|
|||||||
safe_yaml (~> 1.0.0)
|
safe_yaml (~> 1.0.0)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
database_cleaner (1.8.3)
|
database_cleaner (1.8.3)
|
||||||
|
date (3.3.3)
|
||||||
descendants_tracker (0.0.4)
|
descendants_tracker (0.0.4)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
devise (4.9.0)
|
devise (4.9.0)
|
||||||
@ -228,6 +229,7 @@ GEM
|
|||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
marcel (1.0.2)
|
marcel (1.0.2)
|
||||||
|
matrix (0.4.2)
|
||||||
message_format (0.0.6)
|
message_format (0.0.6)
|
||||||
twitter_cldr (~> 5.0)
|
twitter_cldr (~> 5.0)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
@ -236,7 +238,6 @@ GEM
|
|||||||
rake
|
rake
|
||||||
mini_magick (4.10.1)
|
mini_magick (4.10.1)
|
||||||
mini_mime (1.1.2)
|
mini_mime (1.1.2)
|
||||||
mini_portile2 (2.8.1)
|
|
||||||
minitest (5.17.0)
|
minitest (5.17.0)
|
||||||
minitest-reporters (1.4.2)
|
minitest-reporters (1.4.2)
|
||||||
ansi
|
ansi
|
||||||
@ -247,9 +248,17 @@ GEM
|
|||||||
multi_json (1.14.1)
|
multi_json (1.14.1)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
|
net-imap (0.3.4)
|
||||||
|
date
|
||||||
|
net-protocol
|
||||||
|
net-pop (0.1.2)
|
||||||
|
net-protocol
|
||||||
|
net-protocol (0.2.1)
|
||||||
|
timeout
|
||||||
|
net-smtp (0.3.3)
|
||||||
|
net-protocol
|
||||||
nio4r (2.5.8)
|
nio4r (2.5.8)
|
||||||
nokogiri (1.14.2)
|
nokogiri (1.14.2-x86_64-linux)
|
||||||
mini_portile2 (~> 2.8.0)
|
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
oauth2 (1.4.4)
|
oauth2 (1.4.4)
|
||||||
faraday (>= 0.8, < 2.0)
|
faraday (>= 0.8, < 2.0)
|
||||||
@ -291,7 +300,7 @@ GEM
|
|||||||
parallel (1.19.1)
|
parallel (1.19.1)
|
||||||
parser (3.1.2.0)
|
parser (3.1.2.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
pdf-core (0.7.0)
|
pdf-core (0.9.0)
|
||||||
pdf-reader (2.4.0)
|
pdf-reader (2.4.0)
|
||||||
Ascii85 (~> 1.0.0)
|
Ascii85 (~> 1.0.0)
|
||||||
afm (~> 0.2.1)
|
afm (~> 0.2.1)
|
||||||
@ -302,11 +311,12 @@ GEM
|
|||||||
pg_search (2.3.2)
|
pg_search (2.3.2)
|
||||||
activerecord (>= 5.2)
|
activerecord (>= 5.2)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
prawn (2.2.2)
|
prawn (2.4.0)
|
||||||
pdf-core (~> 0.7.0)
|
pdf-core (~> 0.9.0)
|
||||||
ttfunk (~> 1.5)
|
ttfunk (~> 1.7)
|
||||||
prawn-table (0.2.2)
|
prawn-table (0.2.2)
|
||||||
prawn (>= 1.3.0, < 3.0.0)
|
prawn (>= 1.3.0, < 3.0.0)
|
||||||
|
psych (3.3.4)
|
||||||
public_suffix (4.0.6)
|
public_suffix (4.0.6)
|
||||||
puma (6.1.0)
|
puma (6.1.0)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
@ -433,7 +443,7 @@ GEM
|
|||||||
simplecov (0.19.0)
|
simplecov (0.19.0)
|
||||||
docile (~> 1.1)
|
docile (~> 1.1)
|
||||||
simplecov-html (~> 0.11)
|
simplecov-html (~> 0.11)
|
||||||
simplecov-html (0.12.2)
|
simplecov-html (0.12.3)
|
||||||
spring (2.0.2)
|
spring (2.0.2)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 4.2)
|
||||||
spring-watcher-listen (2.0.1)
|
spring-watcher-listen (2.0.1)
|
||||||
@ -460,9 +470,10 @@ GEM
|
|||||||
thor (1.2.1)
|
thor (1.2.1)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
|
timeout (0.3.2)
|
||||||
tins (1.25.0)
|
tins (1.25.0)
|
||||||
sync
|
sync
|
||||||
ttfunk (1.5.1)
|
ttfunk (1.7.0)
|
||||||
twitter_cldr (5.4.0)
|
twitter_cldr (5.4.0)
|
||||||
camertron-eprun
|
camertron-eprun
|
||||||
cldr-plurals-runtime-rb (~> 1.0)
|
cldr-plurals-runtime-rb (~> 1.0)
|
||||||
@ -479,7 +490,7 @@ GEM
|
|||||||
validate_url (1.0.13)
|
validate_url (1.0.13)
|
||||||
activemodel (>= 3.0.0)
|
activemodel (>= 3.0.0)
|
||||||
public_suffix
|
public_suffix
|
||||||
vcr (6.0.0)
|
vcr (6.1.0)
|
||||||
virtus (1.0.5)
|
virtus (1.0.5)
|
||||||
axiom-types (~> 0.1)
|
axiom-types (~> 0.1)
|
||||||
coercible (~> 1.0)
|
coercible (~> 1.0)
|
||||||
@ -505,7 +516,7 @@ GEM
|
|||||||
zeitwerk (2.6.7)
|
zeitwerk (2.6.7)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
aasm
|
aasm
|
||||||
@ -539,9 +550,13 @@ DEPENDENCIES
|
|||||||
jsonpath
|
jsonpath
|
||||||
kaminari
|
kaminari
|
||||||
listen (~> 3.0.5)
|
listen (~> 3.0.5)
|
||||||
|
matrix
|
||||||
message_format
|
message_format
|
||||||
mini_magick
|
mini_magick
|
||||||
minitest-reporters
|
minitest-reporters
|
||||||
|
net-imap
|
||||||
|
net-pop
|
||||||
|
net-smtp
|
||||||
oj
|
oj
|
||||||
omniauth (~> 1.9.2)
|
omniauth (~> 1.9.2)
|
||||||
omniauth-oauth2
|
omniauth-oauth2
|
||||||
@ -554,6 +569,7 @@ DEPENDENCIES
|
|||||||
pg_search
|
pg_search
|
||||||
prawn
|
prawn
|
||||||
prawn-table
|
prawn-table
|
||||||
|
psych (< 4)
|
||||||
puma (= 6.1.0)
|
puma (= 6.1.0)
|
||||||
pundit
|
pundit
|
||||||
railroady
|
railroady
|
||||||
@ -582,7 +598,7 @@ DEPENDENCIES
|
|||||||
stripe (= 5.29.0)
|
stripe (= 5.29.0)
|
||||||
sys-filesystem
|
sys-filesystem
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
vcr (= 6.0.0)
|
vcr (~> 6.1.0)
|
||||||
web-console (>= 3.3.0)
|
web-console (>= 3.3.0)
|
||||||
webmock
|
webmock
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ class SettingService
|
|||||||
return unless (%w[openlab_app_id openlab_app_secret] & settings.map(&:name)).count.positive? &&
|
return unless (%w[openlab_app_id openlab_app_secret] & settings.map(&:name)).count.positive? &&
|
||||||
Setting.get('openlab_app_id').present? && Setting.get('openlab_app_secret').present?
|
Setting.get('openlab_app_id').present? && Setting.get('openlab_app_secret').present?
|
||||||
|
|
||||||
Project.all.each(&:openlab_create)
|
Project.find_each(&:openlab_create)
|
||||||
end
|
end
|
||||||
|
|
||||||
# automatically validate the admins
|
# automatically validate the admins
|
||||||
|
@ -9,7 +9,7 @@ class ClosedPeriodValidator < ActiveModel::Validator
|
|||||||
Time.current
|
Time.current
|
||||||
end
|
end
|
||||||
|
|
||||||
AccountingPeriod.all.each do |period|
|
AccountingPeriod.find_each do |period|
|
||||||
record.errors.add(:date, I18n.t('errors.messages.in_closed_period')) if date >= period.start_at && date <= period.end_at
|
record.errors.add(:date, I18n.t('errors.messages.in_closed_period')) if date >= period.start_at && date <= period.end_at
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ class PeriodOverlapValidator < ActiveModel::Validator
|
|||||||
the_end = record.end_at
|
the_end = record.end_at
|
||||||
the_start = record.start_at
|
the_start = record.start_at
|
||||||
|
|
||||||
AccountingPeriod.all.each do |period|
|
AccountingPeriod.find_each do |period|
|
||||||
record.errors.add(:start_at, I18n.t('errors.messages.cannot_overlap')) if the_start >= period.start_at && the_start <= period.end_at
|
record.errors.add(:start_at, I18n.t('errors.messages.cannot_overlap')) if the_start >= period.start_at && the_start <= period.end_at
|
||||||
record.errors.add(:end_at, I18n.t('errors.messages.cannot_overlap')) if the_end >= period.start_at && the_end <= period.end_at
|
record.errors.add(:end_at, I18n.t('errors.messages.cannot_overlap')) if the_end >= period.start_at && the_end <= period.end_at
|
||||||
record.errors.add(:end_at, I18n.t('errors.messages.cannot_encompass')) if period.start_at >= the_start && period.end_at <= the_end
|
record.errors.add(:end_at, I18n.t('errors.messages.cannot_encompass')) if period.start_at >= the_start && period.end_at <= the_end
|
||||||
|
@ -141,7 +141,7 @@ if Training.count.zero?
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
TrainingsPricing.all.each do |p|
|
TrainingsPricing.find_each do |p|
|
||||||
p.update(amount: ((rand * 50) + 5).floor * 100)
|
p.update(amount: ((rand * 50) + 5).floor * 100)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -222,7 +222,7 @@ if Machine.count.zero?
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
Price.all.each do |p|
|
Price.find_each do |p|
|
||||||
p.update(amount: ((rand * 50) + 5).floor * 100)
|
p.update(amount: ((rand * 50) + 5).floor * 100)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,6 @@ module Integrity; end
|
|||||||
# Provides various helpers methods for interacting with accounting archives
|
# Provides various helpers methods for interacting with accounting archives
|
||||||
class Integrity::ArchiveHelper
|
class Integrity::ArchiveHelper
|
||||||
class << self
|
class << self
|
||||||
|
|
||||||
## Checks the validity of all closed periods and raise an error otherwise
|
## Checks the validity of all closed periods and raise an error otherwise
|
||||||
def check_footprints
|
def check_footprints
|
||||||
if AccountingPeriod.count.positive?
|
if AccountingPeriod.count.positive?
|
||||||
@ -20,7 +19,7 @@ class Integrity::ArchiveHelper
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
Rails.logger.info 'Checking all invoices footprints. This may take a while...'
|
Rails.logger.info 'Checking all invoices footprints. This may take a while...'
|
||||||
Invoice.order(:id).all.each do |i|
|
Invoice.order(:id).find_each do |i|
|
||||||
next if i.check_footprint
|
next if i.check_footprint
|
||||||
|
|
||||||
i.debug_footprint
|
i.debug_footprint
|
||||||
@ -48,7 +47,7 @@ class Integrity::ArchiveHelper
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
# 3. Delete periods from database
|
# 3. Delete periods from database
|
||||||
range_periods.each do |ap|
|
range_periods.each do |ap| # rubocop:disable Style/CombinableLoops
|
||||||
execute("DELETE FROM accounting_periods WHERE ID=#{ap.id};")
|
execute("DELETE FROM accounting_periods WHERE ID=#{ap.id};")
|
||||||
end
|
end
|
||||||
periods
|
periods
|
||||||
|
@ -40,7 +40,7 @@ class AuthProvidersTest < ActionDispatch::IntegrationTest
|
|||||||
db_provider&.reload
|
db_provider&.reload
|
||||||
assert_equal 'active', db_provider&.status
|
assert_equal 'active', db_provider&.status
|
||||||
assert_equal AuthProvider.active.id, db_provider&.id
|
assert_equal AuthProvider.active.id, db_provider&.id
|
||||||
User.all.each do |u|
|
User.find_each do |u|
|
||||||
assert_not_nil u.auth_token
|
assert_not_nil u.auth_token
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user