Skip to content

Commit 6cf7556

Browse files
committed
Update Framework to Rails 7.2
* `Rails.application.secrets` is removed; the `secret_key_base` accessor in `Rails.application` has been present since 6.x, so just use that. * Minor configuration updates for 7.2 defaults. * Add `mutex_m` to avoid deprecation warnings for Ruby 3.4. Ref: AP-270
1 parent e78e784 commit 6cf7556

File tree

15 files changed

+141
-176
lines changed

15 files changed

+141
-176
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ jobs:
130130

131131
- name: Setup the stack
132132
run: |
133+
docker run --rm "${DOCKER_APP_IMAGE}" rails secret > /tmp/secret_key_base
133134
docker compose build --quiet
134135
docker compose pull --quiet
135136
docker compose up --wait

.idea/altmedia.iml

Lines changed: 15 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ gem 'jquery-rails'
2121
gem 'jquery-ui-rails'
2222
gem 'jwt', '~> 1.5', '>= 1.5.4'
2323
gem 'lograge', '>=0.11.2'
24+
gem 'mutex_m' # Deprecation warning.
2425
gem 'netaddr', '~> 1.5', '>= 1.5.1'
2526
gem 'net-ssh'
2627
gem 'okcomputer', '~> 1.19'
@@ -30,7 +31,7 @@ gem 'omniauth-rails_csrf_protection', '~> 1.0'
3031
gem 'pg', '~> 1.2'
3132
gem 'prawn', '~> 2.4'
3233
gem 'puma', '~> 4.3', '>= 4.3.12'
33-
gem 'rails', '~> 7.1.6'
34+
gem 'rails', '~> 7.2.3'
3435
gem 'recaptcha', '~> 4.13'
3536
gem 'sprockets', '~> 4.0'
3637
gem 'tzinfo-data', platforms: %i[windows jruby]

Gemfile.lock

Lines changed: 63 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,79 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.1.6)
5-
actionpack (= 7.1.6)
6-
activesupport (= 7.1.6)
4+
actioncable (7.2.3)
5+
actionpack (= 7.2.3)
6+
activesupport (= 7.2.3)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.1.6)
11-
actionpack (= 7.1.6)
12-
activejob (= 7.1.6)
13-
activerecord (= 7.1.6)
14-
activestorage (= 7.1.6)
15-
activesupport (= 7.1.6)
16-
mail (>= 2.7.1)
17-
net-imap
18-
net-pop
19-
net-smtp
20-
actionmailer (7.1.6)
21-
actionpack (= 7.1.6)
22-
actionview (= 7.1.6)
23-
activejob (= 7.1.6)
24-
activesupport (= 7.1.6)
25-
mail (~> 2.5, >= 2.5.4)
26-
net-imap
27-
net-pop
28-
net-smtp
10+
actionmailbox (7.2.3)
11+
actionpack (= 7.2.3)
12+
activejob (= 7.2.3)
13+
activerecord (= 7.2.3)
14+
activestorage (= 7.2.3)
15+
activesupport (= 7.2.3)
16+
mail (>= 2.8.0)
17+
actionmailer (7.2.3)
18+
actionpack (= 7.2.3)
19+
actionview (= 7.2.3)
20+
activejob (= 7.2.3)
21+
activesupport (= 7.2.3)
22+
mail (>= 2.8.0)
2923
rails-dom-testing (~> 2.2)
30-
actionpack (7.1.6)
31-
actionview (= 7.1.6)
32-
activesupport (= 7.1.6)
24+
actionpack (7.2.3)
25+
actionview (= 7.2.3)
26+
activesupport (= 7.2.3)
3327
cgi
3428
nokogiri (>= 1.8.5)
3529
racc
36-
rack (>= 2.2.4)
30+
rack (>= 2.2.4, < 3.3)
3731
rack-session (>= 1.0.1)
3832
rack-test (>= 0.6.3)
3933
rails-dom-testing (~> 2.2)
4034
rails-html-sanitizer (~> 1.6)
41-
actiontext (7.1.6)
42-
actionpack (= 7.1.6)
43-
activerecord (= 7.1.6)
44-
activestorage (= 7.1.6)
45-
activesupport (= 7.1.6)
35+
useragent (~> 0.16)
36+
actiontext (7.2.3)
37+
actionpack (= 7.2.3)
38+
activerecord (= 7.2.3)
39+
activestorage (= 7.2.3)
40+
activesupport (= 7.2.3)
4641
globalid (>= 0.6.0)
4742
nokogiri (>= 1.8.5)
48-
actionview (7.1.6)
49-
activesupport (= 7.1.6)
43+
actionview (7.2.3)
44+
activesupport (= 7.2.3)
5045
builder (~> 3.1)
5146
cgi
5247
erubi (~> 1.11)
5348
rails-dom-testing (~> 2.2)
5449
rails-html-sanitizer (~> 1.6)
55-
activejob (7.1.6)
56-
activesupport (= 7.1.6)
50+
activejob (7.2.3)
51+
activesupport (= 7.2.3)
5752
globalid (>= 0.3.6)
58-
activemodel (7.1.6)
59-
activesupport (= 7.1.6)
60-
activerecord (7.1.6)
61-
activemodel (= 7.1.6)
62-
activesupport (= 7.1.6)
53+
activemodel (7.2.3)
54+
activesupport (= 7.2.3)
55+
activerecord (7.2.3)
56+
activemodel (= 7.2.3)
57+
activesupport (= 7.2.3)
6358
timeout (>= 0.4.0)
64-
activestorage (7.1.6)
65-
actionpack (= 7.1.6)
66-
activejob (= 7.1.6)
67-
activerecord (= 7.1.6)
68-
activesupport (= 7.1.6)
59+
activestorage (7.2.3)
60+
actionpack (= 7.2.3)
61+
activejob (= 7.2.3)
62+
activerecord (= 7.2.3)
63+
activesupport (= 7.2.3)
6964
marcel (~> 1.0)
70-
activesupport (7.1.6)
65+
activesupport (7.2.3)
7166
base64
7267
benchmark (>= 0.3)
7368
bigdecimal
74-
concurrent-ruby (~> 1.0, >= 1.0.2)
69+
concurrent-ruby (~> 1.0, >= 1.3.1)
7570
connection_pool (>= 2.2.5)
7671
drb
7772
i18n (>= 1.6, < 2)
7873
logger (>= 1.4.2)
7974
minitest (>= 5.1)
80-
mutex_m
8175
securerandom (>= 0.3)
82-
tzinfo (~> 2.0)
76+
tzinfo (~> 2.0, >= 2.0.5)
8377
addressable (2.8.1)
8478
public_suffix (>= 2.0.2, < 6.0)
8579
amazing_print (1.8.1)
@@ -325,32 +319,32 @@ GEM
325319
rackup (1.0.1)
326320
rack (< 3)
327321
webrick
328-
rails (7.1.6)
329-
actioncable (= 7.1.6)
330-
actionmailbox (= 7.1.6)
331-
actionmailer (= 7.1.6)
332-
actionpack (= 7.1.6)
333-
actiontext (= 7.1.6)
334-
actionview (= 7.1.6)
335-
activejob (= 7.1.6)
336-
activemodel (= 7.1.6)
337-
activerecord (= 7.1.6)
338-
activestorage (= 7.1.6)
339-
activesupport (= 7.1.6)
322+
rails (7.2.3)
323+
actioncable (= 7.2.3)
324+
actionmailbox (= 7.2.3)
325+
actionmailer (= 7.2.3)
326+
actionpack (= 7.2.3)
327+
actiontext (= 7.2.3)
328+
actionview (= 7.2.3)
329+
activejob (= 7.2.3)
330+
activemodel (= 7.2.3)
331+
activerecord (= 7.2.3)
332+
activestorage (= 7.2.3)
333+
activesupport (= 7.2.3)
340334
bundler (>= 1.15.0)
341-
railties (= 7.1.6)
335+
railties (= 7.2.3)
342336
rails-dom-testing (2.3.0)
343337
activesupport (>= 5.0.0)
344338
minitest
345339
nokogiri (>= 1.6)
346340
rails-html-sanitizer (1.6.2)
347341
loofah (~> 2.21)
348342
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
349-
railties (7.1.6)
350-
actionpack (= 7.1.6)
351-
activesupport (= 7.1.6)
343+
railties (7.2.3)
344+
actionpack (= 7.2.3)
345+
activesupport (= 7.2.3)
352346
cgi
353-
irb
347+
irb (~> 1.13)
354348
rackup (>= 1.0.0)
355349
rake (>= 12.2)
356350
thor (~> 1.0, >= 1.2.2)
@@ -488,6 +482,7 @@ GEM
488482
unicode-display_width (3.1.4)
489483
unicode-emoji (~> 4.0, >= 4.0.4)
490484
unicode-emoji (4.0.4)
485+
useragent (0.16.11)
491486
web-console (4.2.0)
492487
actionview (>= 6.0.0)
493488
activemodel (>= 6.0.0)
@@ -538,6 +533,7 @@ DEPENDENCIES
538533
jwt (~> 1.5, >= 1.5.4)
539534
listen (~> 3.2)
540535
lograge (>= 0.11.2)
536+
mutex_m
541537
net-ssh
542538
netaddr (~> 1.5, >= 1.5.1)
543539
okcomputer (~> 1.19)
@@ -547,7 +543,7 @@ DEPENDENCIES
547543
pg (~> 1.2)
548544
prawn (~> 2.4)
549545
puma (~> 4.3, >= 4.3.12)
550-
rails (~> 7.1.6)
546+
rails (~> 7.2.3)
551547
recaptcha (~> 4.13)
552548
roo (~> 2.8)
553549
rspec (~> 3.13)

app/models/efees_invoice.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def decode(token)
2121
end
2222

2323
def secret
24-
Rails.application.secrets.secret_key_base
24+
Rails.application.secret_key_base
2525
end
2626
end
2727

bin/brakeman

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
#!/usr/bin/env ruby
2-
# frozen_string_literal: true
3-
4-
#
5-
# This file was generated by Bundler.
6-
#
7-
# The application 'brakeman' is installed as part of a gem, and
8-
# this file is here to facilitate running it.
9-
#
10-
11-
require "pathname"
12-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13-
Pathname.new(__FILE__).realpath)
14-
15-
bundle_binstub = File.expand_path("../bundle", __FILE__)
16-
17-
if File.file?(bundle_binstub)
18-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19-
load(bundle_binstub)
20-
else
21-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23-
end
24-
end
25-
262
require "rubygems"
273
require "bundler/setup"
284

5+
ARGV.unshift("--ensure-latest")
6+
297
load Gem.bin_path("brakeman", "brakeman")

bin/rubocop

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
11
#!/usr/bin/env ruby
2-
# frozen_string_literal: true
3-
4-
#
5-
# This file was generated by Bundler.
6-
#
7-
# The application 'rubocop' is installed as part of a gem, and
8-
# this file is here to facilitate running it.
9-
#
10-
11-
require "pathname"
12-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13-
Pathname.new(__FILE__).realpath)
14-
15-
bundle_binstub = File.expand_path("../bundle", __FILE__)
16-
17-
if File.file?(bundle_binstub)
18-
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19-
load(bundle_binstub)
20-
else
21-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23-
end
24-
end
25-
262
require "rubygems"
273
require "bundler/setup"
284

5+
# explicit rubocop config increases performance slightly while avoiding config confusion.
6+
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
7+
298
load Gem.bin_path("rubocop", "rubocop")

0 commit comments

Comments
 (0)