Skip to content

Commit e05436e

Browse files
authored
[rails] Upgrade to Rails 7.2 (#9209)
Update to latest release. - Remove YJIT initializer as YJIT is enabled by Rails by default. - Updated config with bin/rails app:update
1 parent 2ce1e12 commit e05436e

File tree

9 files changed

+167
-193
lines changed

9 files changed

+167
-193
lines changed

frameworks/Ruby/rails/.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.0
1+
3.3.0

frameworks/Ruby/rails/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
33
gem 'oj', '~> 3.16'
44
gem 'pg', '~> 1.5', group: :postgresql
55
gem 'puma', '~> 6.4'
6-
gem 'rails', '~> 7.1.3'
6+
gem 'rails', '~> 7.2.0'
77
gem 'redis', '~> 5.0'
88
gem 'trilogy', '~> 2.8.1', group: :mysql
99
gem 'tzinfo-data'

frameworks/Ruby/rails/Gemfile.lock

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,94 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.1.3.4)
5-
actionpack (= 7.1.3.4)
6-
activesupport (= 7.1.3.4)
4+
actioncable (7.2.0)
5+
actionpack (= 7.2.0)
6+
activesupport (= 7.2.0)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.1.3.4)
11-
actionpack (= 7.1.3.4)
12-
activejob (= 7.1.3.4)
13-
activerecord (= 7.1.3.4)
14-
activestorage (= 7.1.3.4)
15-
activesupport (= 7.1.3.4)
16-
mail (>= 2.7.1)
17-
net-imap
18-
net-pop
19-
net-smtp
20-
actionmailer (7.1.3.4)
21-
actionpack (= 7.1.3.4)
22-
actionview (= 7.1.3.4)
23-
activejob (= 7.1.3.4)
24-
activesupport (= 7.1.3.4)
25-
mail (~> 2.5, >= 2.5.4)
26-
net-imap
27-
net-pop
28-
net-smtp
10+
actionmailbox (7.2.0)
11+
actionpack (= 7.2.0)
12+
activejob (= 7.2.0)
13+
activerecord (= 7.2.0)
14+
activestorage (= 7.2.0)
15+
activesupport (= 7.2.0)
16+
mail (>= 2.8.0)
17+
actionmailer (7.2.0)
18+
actionpack (= 7.2.0)
19+
actionview (= 7.2.0)
20+
activejob (= 7.2.0)
21+
activesupport (= 7.2.0)
22+
mail (>= 2.8.0)
2923
rails-dom-testing (~> 2.2)
30-
actionpack (7.1.3.4)
31-
actionview (= 7.1.3.4)
32-
activesupport (= 7.1.3.4)
24+
actionpack (7.2.0)
25+
actionview (= 7.2.0)
26+
activesupport (= 7.2.0)
3327
nokogiri (>= 1.8.5)
3428
racc
35-
rack (>= 2.2.4)
29+
rack (>= 2.2.4, < 3.2)
3630
rack-session (>= 1.0.1)
3731
rack-test (>= 0.6.3)
3832
rails-dom-testing (~> 2.2)
3933
rails-html-sanitizer (~> 1.6)
40-
actiontext (7.1.3.4)
41-
actionpack (= 7.1.3.4)
42-
activerecord (= 7.1.3.4)
43-
activestorage (= 7.1.3.4)
44-
activesupport (= 7.1.3.4)
34+
useragent (~> 0.16)
35+
actiontext (7.2.0)
36+
actionpack (= 7.2.0)
37+
activerecord (= 7.2.0)
38+
activestorage (= 7.2.0)
39+
activesupport (= 7.2.0)
4540
globalid (>= 0.6.0)
4641
nokogiri (>= 1.8.5)
47-
actionview (7.1.3.4)
48-
activesupport (= 7.1.3.4)
42+
actionview (7.2.0)
43+
activesupport (= 7.2.0)
4944
builder (~> 3.1)
5045
erubi (~> 1.11)
5146
rails-dom-testing (~> 2.2)
5247
rails-html-sanitizer (~> 1.6)
53-
activejob (7.1.3.4)
54-
activesupport (= 7.1.3.4)
48+
activejob (7.2.0)
49+
activesupport (= 7.2.0)
5550
globalid (>= 0.3.6)
56-
activemodel (7.1.3.4)
57-
activesupport (= 7.1.3.4)
58-
activerecord (7.1.3.4)
59-
activemodel (= 7.1.3.4)
60-
activesupport (= 7.1.3.4)
51+
activemodel (7.2.0)
52+
activesupport (= 7.2.0)
53+
activerecord (7.2.0)
54+
activemodel (= 7.2.0)
55+
activesupport (= 7.2.0)
6156
timeout (>= 0.4.0)
62-
activestorage (7.1.3.4)
63-
actionpack (= 7.1.3.4)
64-
activejob (= 7.1.3.4)
65-
activerecord (= 7.1.3.4)
66-
activesupport (= 7.1.3.4)
57+
activestorage (7.2.0)
58+
actionpack (= 7.2.0)
59+
activejob (= 7.2.0)
60+
activerecord (= 7.2.0)
61+
activesupport (= 7.2.0)
6762
marcel (~> 1.0)
68-
activesupport (7.1.3.4)
63+
activesupport (7.2.0)
6964
base64
7065
bigdecimal
71-
concurrent-ruby (~> 1.0, >= 1.0.2)
66+
concurrent-ruby (~> 1.0, >= 1.3.1)
7267
connection_pool (>= 2.2.5)
7368
drb
7469
i18n (>= 1.6, < 2)
70+
logger (>= 1.4.2)
7571
minitest (>= 5.1)
76-
mutex_m
77-
tzinfo (~> 2.0)
72+
securerandom (>= 0.3)
73+
tzinfo (~> 2.0, >= 2.0.5)
7874
base64 (0.2.0)
7975
bigdecimal (3.1.8)
80-
builder (3.2.4)
81-
concurrent-ruby (1.3.1)
76+
builder (3.3.0)
77+
concurrent-ruby (1.3.4)
8278
connection_pool (2.4.1)
8379
crass (1.0.6)
8480
date (3.3.4)
8581
drb (2.2.1)
86-
erubi (1.12.0)
82+
erubi (1.13.0)
8783
globalid (1.2.1)
8884
activesupport (>= 6.1)
8985
i18n (1.14.5)
9086
concurrent-ruby (~> 1.0)
9187
io-console (0.7.2)
92-
irb (1.13.1)
88+
irb (1.14.0)
9389
rdoc (>= 4.0.0)
9490
reline (>= 0.4.2)
91+
logger (1.6.0)
9592
loofah (2.22.0)
9693
crass (~> 1.0.2)
9794
nokogiri (>= 1.12.0)
@@ -103,9 +100,8 @@ GEM
103100
marcel (1.0.4)
104101
mini_mime (1.1.5)
105102
mini_portile2 (2.8.7)
106-
minitest (5.23.1)
107-
mutex_m (0.2.0)
108-
net-imap (0.4.11)
103+
minitest (5.24.1)
104+
net-imap (0.4.14)
109105
date
110106
net-protocol
111107
net-pop (0.1.2)
@@ -115,80 +111,84 @@ GEM
115111
net-smtp (0.5.0)
116112
net-protocol
117113
nio4r (2.7.3)
118-
nokogiri (1.16.5)
114+
nokogiri (1.16.7)
119115
mini_portile2 (~> 2.8.2)
120116
racc (~> 1.4)
121-
nokogiri (1.16.5-arm64-darwin)
117+
nokogiri (1.16.7-arm64-darwin)
122118
racc (~> 1.4)
123-
nokogiri (1.16.5-x86_64-linux)
119+
nokogiri (1.16.7-x86_64-linux)
124120
racc (~> 1.4)
125-
oj (3.16.3)
121+
oj (3.16.5)
126122
bigdecimal (>= 3.0)
127-
pg (1.5.6)
123+
ostruct (>= 0.2)
124+
ostruct (0.6.0)
125+
pg (1.5.7)
128126
psych (5.1.2)
129127
stringio
130128
puma (6.4.2)
131129
nio4r (~> 2.0)
132-
racc (1.8.0)
133-
rack (3.0.11)
130+
racc (1.8.1)
131+
rack (3.1.7)
134132
rack-session (2.0.0)
135133
rack (>= 3.0.0)
136134
rack-test (2.1.0)
137135
rack (>= 1.3)
138136
rackup (2.1.0)
139137
rack (>= 3)
140138
webrick (~> 1.8)
141-
rails (7.1.3.4)
142-
actioncable (= 7.1.3.4)
143-
actionmailbox (= 7.1.3.4)
144-
actionmailer (= 7.1.3.4)
145-
actionpack (= 7.1.3.4)
146-
actiontext (= 7.1.3.4)
147-
actionview (= 7.1.3.4)
148-
activejob (= 7.1.3.4)
149-
activemodel (= 7.1.3.4)
150-
activerecord (= 7.1.3.4)
151-
activestorage (= 7.1.3.4)
152-
activesupport (= 7.1.3.4)
139+
rails (7.2.0)
140+
actioncable (= 7.2.0)
141+
actionmailbox (= 7.2.0)
142+
actionmailer (= 7.2.0)
143+
actionpack (= 7.2.0)
144+
actiontext (= 7.2.0)
145+
actionview (= 7.2.0)
146+
activejob (= 7.2.0)
147+
activemodel (= 7.2.0)
148+
activerecord (= 7.2.0)
149+
activestorage (= 7.2.0)
150+
activesupport (= 7.2.0)
153151
bundler (>= 1.15.0)
154-
railties (= 7.1.3.4)
152+
railties (= 7.2.0)
155153
rails-dom-testing (2.2.0)
156154
activesupport (>= 5.0.0)
157155
minitest
158156
nokogiri (>= 1.6)
159157
rails-html-sanitizer (1.6.0)
160158
loofah (~> 2.21)
161159
nokogiri (~> 1.14)
162-
railties (7.1.3.4)
163-
actionpack (= 7.1.3.4)
164-
activesupport (= 7.1.3.4)
165-
irb
160+
railties (7.2.0)
161+
actionpack (= 7.2.0)
162+
activesupport (= 7.2.0)
163+
irb (~> 1.13)
166164
rackup (>= 1.0.0)
167165
rake (>= 12.2)
168166
thor (~> 1.0, >= 1.2.2)
169167
zeitwerk (~> 2.6)
170168
rake (13.2.1)
171-
rdoc (6.6.3.1)
169+
rdoc (6.7.0)
172170
psych (>= 4.0.0)
173171
redis (5.2.0)
174172
redis-client (>= 0.22.0)
175173
redis-client (0.22.2)
176174
connection_pool
177-
reline (0.5.7)
175+
reline (0.5.9)
178176
io-console (~> 0.5)
179-
stringio (3.1.0)
177+
securerandom (0.3.1)
178+
stringio (3.1.1)
180179
thor (1.3.1)
181180
timeout (0.4.1)
182181
trilogy (2.8.1)
183182
tzinfo (2.0.6)
184183
concurrent-ruby (~> 1.0)
185184
tzinfo-data (1.2024.1)
186185
tzinfo (>= 1.0.0)
186+
useragent (0.16.10)
187187
webrick (1.8.1)
188188
websocket-driver (0.7.6)
189189
websocket-extensions (>= 0.1.0)
190190
websocket-extensions (0.1.5)
191-
zeitwerk (2.6.14)
191+
zeitwerk (2.6.17)
192192

193193
PLATFORMS
194194
arm64-darwin-20
@@ -199,7 +199,7 @@ DEPENDENCIES
199199
oj (~> 3.16)
200200
pg (~> 1.5)
201201
puma (~> 6.4)
202-
rails (~> 7.1.3)
202+
rails (~> 7.2.0)
203203
redis (~> 5.0)
204204
trilogy (~> 2.8.1)
205205
tzinfo-data

frameworks/Ruby/rails/config/application.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
# require "active_storage/engine"
99
require "action_controller/railtie"
1010
# require "action_mailer/railtie"
11+
# require "action_mailbox/engine"
12+
# require "action_text/engine"
1113
require "action_view/railtie"
1214
# require "action_cable/engine"
13-
# require "sprockets/railtie"
1415
# require "rails/test_unit/railtie"
1516

1617
# Require the gems listed in Gemfile, including any gems
@@ -20,12 +21,12 @@
2021
module Hello
2122
class Application < Rails::Application
2223
# Initialize configuration defaults for originally generated Rails version.
23-
config.load_defaults 7.1
24+
config.load_defaults 7.2
2425

25-
# Settings in config/environments/* take precedence over those specified here.
26-
# Application configuration can go into files in config/initializers
27-
# -- all .rb files in that directory are automatically loaded after loading
28-
# the framework and any gems in your application.
26+
# Please, add to the `ignore` list any other `lib` subdirectories that do
27+
# not contain `.rb` files, or that should not be reloaded or eager loaded.
28+
# Common ones are `templates`, `generators`, or `middleware`, for example.
29+
config.autoload_lib(ignore: %w[assets tasks])
2930

3031
config.action_dispatch.default_headers.merge!('Server' => 'WebServer')
3132

frameworks/Ruby/rails/config/environments/development.rb

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
# In the development environment your application's code is reloaded any time
77
# it changes. This slows down response time but is perfect for development
88
# since you don't have to restart the web server when you make code changes.
9-
config.cache_classes = false
9+
config.enable_reloading = true
1010

1111
# Do not eager load code on boot.
1212
config.eager_load = false
1313

1414
# Show full error reports.
1515
config.consider_all_requests_local = true
1616

17-
# Enable server timing
17+
# Enable server timing.
1818
config.server_timing = true
1919

2020
# Enable/disable caching. By default caching is disabled.
@@ -24,9 +24,7 @@
2424
config.action_controller.enable_fragment_cache_logging = true
2525

2626
config.cache_store = :memory_store
27-
config.public_file_server.headers = {
28-
"Cache-Control" => "public, max-age=#{2.days.to_i}"
29-
}
27+
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
3028
else
3129
config.action_controller.perform_caching = false
3230

@@ -48,16 +46,15 @@
4846
# Highlight code that triggered database queries in logs.
4947
config.active_record.verbose_query_logs = true
5048

51-
5249
# Raises error for missing translations.
5350
# config.i18n.raise_on_missing_translations = true
5451

5552
# Annotate rendered view with file names.
56-
# config.action_view.annotate_rendered_view_with_filenames = true
57-
58-
# Uncomment if you wish to allow Action Cable access from any origin.
59-
# config.action_cable.disable_request_forgery_protection = true
53+
config.action_view.annotate_rendered_view_with_filenames = true
6054

61-
# Raise error when a before_action's only/except options reference missing actions
55+
# Raise error when a before_action's only/except options reference missing actions.
6256
config.action_controller.raise_on_missing_callback_actions = true
57+
58+
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
59+
# config.generators.apply_rubocop_autocorrect_after_generate!
6360
end

0 commit comments

Comments
 (0)