Skip to content

Commit 3eb9b24

Browse files
authored
Update local development to latest ruby/rails, address console warnings (#2192)
* bundle update * update local dev to use latest rails and ruby * resolve warnings in tests * opt into new timezone behavior * move propshaft * fix ci * fix ci * one more
1 parent 4d455f8 commit 3eb9b24

File tree

10 files changed

+148
-113
lines changed

10 files changed

+148
-113
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Ruby
1717
uses: ruby/setup-ruby@v1
1818
with:
19-
ruby-version: 3.3
19+
ruby-version: 3.4
2020
bundler-cache: true
2121
- name: Run benchmarks
2222
run: |
@@ -113,7 +113,7 @@ jobs:
113113
- name: Setup Ruby
114114
uses: ruby/setup-ruby@v1
115115
with:
116-
ruby-version: 3.3
116+
ruby-version: 3.4
117117
bundler-cache: true
118118
working-directory: 'view_component'
119119
- uses: actions/setup-node@v4
@@ -139,7 +139,7 @@ jobs:
139139
- name: Setup Ruby
140140
uses: ruby/setup-ruby@v1
141141
with:
142-
ruby-version: 3.3
142+
ruby-version: 3.4
143143
bundler-cache: true
144144
- name: Download coverage results
145145
uses: actions/download-artifact@v4.1.8

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
- name: Setup Ruby
7171
uses: ruby/setup-ruby@v1
7272
with:
73-
ruby-version: 3.3
73+
ruby-version: 3.4
7474
- uses: actions/cache@v4
7575
with:
7676
path: vendor/bundle

.tool-versions

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

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
source "https://rubygems.org"
44
gemspec
55

6-
rails_version = (ENV["RAILS_VERSION"] || "~> 7.0.0").to_s
6+
rails_version = (ENV["RAILS_VERSION"] || "~> 8").to_s
77
gem "rails", (rails_version == "main") ? {git: "https://github.com/rails/rails", ref: "main"} : rails_version
88

9-
ruby_version = (ENV["RUBY_VERSION"] || "~> 3.3").to_s
9+
ruby_version = (ENV["RUBY_VERSION"] || "~> 3.4").to_s
1010
ruby ruby_version

Gemfile.lock

Lines changed: 101 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -9,71 +9,77 @@ PATH
99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
actioncable (7.0.8.7)
13-
actionpack (= 7.0.8.7)
14-
activesupport (= 7.0.8.7)
12+
actioncable (8.0.1)
13+
actionpack (= 8.0.1)
14+
activesupport (= 8.0.1)
1515
nio4r (~> 2.0)
1616
websocket-driver (>= 0.6.1)
17-
actionmailbox (7.0.8.7)
18-
actionpack (= 7.0.8.7)
19-
activejob (= 7.0.8.7)
20-
activerecord (= 7.0.8.7)
21-
activestorage (= 7.0.8.7)
22-
activesupport (= 7.0.8.7)
23-
mail (>= 2.7.1)
24-
net-imap
25-
net-pop
26-
net-smtp
27-
actionmailer (7.0.8.7)
28-
actionpack (= 7.0.8.7)
29-
actionview (= 7.0.8.7)
30-
activejob (= 7.0.8.7)
31-
activesupport (= 7.0.8.7)
32-
mail (~> 2.5, >= 2.5.4)
33-
net-imap
34-
net-pop
35-
net-smtp
36-
rails-dom-testing (~> 2.0)
37-
actionpack (7.0.8.7)
38-
actionview (= 7.0.8.7)
39-
activesupport (= 7.0.8.7)
40-
rack (~> 2.0, >= 2.2.4)
17+
zeitwerk (~> 2.6)
18+
actionmailbox (8.0.1)
19+
actionpack (= 8.0.1)
20+
activejob (= 8.0.1)
21+
activerecord (= 8.0.1)
22+
activestorage (= 8.0.1)
23+
activesupport (= 8.0.1)
24+
mail (>= 2.8.0)
25+
actionmailer (8.0.1)
26+
actionpack (= 8.0.1)
27+
actionview (= 8.0.1)
28+
activejob (= 8.0.1)
29+
activesupport (= 8.0.1)
30+
mail (>= 2.8.0)
31+
rails-dom-testing (~> 2.2)
32+
actionpack (8.0.1)
33+
actionview (= 8.0.1)
34+
activesupport (= 8.0.1)
35+
nokogiri (>= 1.8.5)
36+
rack (>= 2.2.4)
37+
rack-session (>= 1.0.1)
4138
rack-test (>= 0.6.3)
42-
rails-dom-testing (~> 2.0)
43-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
44-
actiontext (7.0.8.7)
45-
actionpack (= 7.0.8.7)
46-
activerecord (= 7.0.8.7)
47-
activestorage (= 7.0.8.7)
48-
activesupport (= 7.0.8.7)
39+
rails-dom-testing (~> 2.2)
40+
rails-html-sanitizer (~> 1.6)
41+
useragent (~> 0.16)
42+
actiontext (8.0.1)
43+
actionpack (= 8.0.1)
44+
activerecord (= 8.0.1)
45+
activestorage (= 8.0.1)
46+
activesupport (= 8.0.1)
4947
globalid (>= 0.6.0)
5048
nokogiri (>= 1.8.5)
51-
actionview (7.0.8.7)
52-
activesupport (= 7.0.8.7)
49+
actionview (8.0.1)
50+
activesupport (= 8.0.1)
5351
builder (~> 3.1)
54-
erubi (~> 1.4)
55-
rails-dom-testing (~> 2.0)
56-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
57-
activejob (7.0.8.7)
58-
activesupport (= 7.0.8.7)
52+
erubi (~> 1.11)
53+
rails-dom-testing (~> 2.2)
54+
rails-html-sanitizer (~> 1.6)
55+
activejob (8.0.1)
56+
activesupport (= 8.0.1)
5957
globalid (>= 0.3.6)
60-
activemodel (7.0.8.7)
61-
activesupport (= 7.0.8.7)
62-
activerecord (7.0.8.7)
63-
activemodel (= 7.0.8.7)
64-
activesupport (= 7.0.8.7)
65-
activestorage (7.0.8.7)
66-
actionpack (= 7.0.8.7)
67-
activejob (= 7.0.8.7)
68-
activerecord (= 7.0.8.7)
69-
activesupport (= 7.0.8.7)
58+
activemodel (8.0.1)
59+
activesupport (= 8.0.1)
60+
activerecord (8.0.1)
61+
activemodel (= 8.0.1)
62+
activesupport (= 8.0.1)
63+
timeout (>= 0.4.0)
64+
activestorage (8.0.1)
65+
actionpack (= 8.0.1)
66+
activejob (= 8.0.1)
67+
activerecord (= 8.0.1)
68+
activesupport (= 8.0.1)
7069
marcel (~> 1.0)
71-
mini_mime (>= 1.1.0)
72-
activesupport (7.0.8.7)
73-
concurrent-ruby (~> 1.0, >= 1.0.2)
70+
activesupport (8.0.1)
71+
base64
72+
benchmark (>= 0.3)
73+
bigdecimal
74+
concurrent-ruby (~> 1.0, >= 1.3.1)
75+
connection_pool (>= 2.2.5)
76+
drb
7477
i18n (>= 1.6, < 2)
78+
logger (>= 1.4.2)
7579
minitest (>= 5.1)
76-
tzinfo (~> 2.0)
80+
securerandom (>= 0.3)
81+
tzinfo (~> 2.0, >= 2.0.5)
82+
uri (>= 0.13.1)
7783
addressable (2.8.7)
7884
public_suffix (>= 2.0.2, < 7.0)
7985
allocation_stats (0.1.5)
@@ -84,6 +90,7 @@ GEM
8490
thor (>= 0.14.0)
8591
ast (2.4.2)
8692
base64 (0.2.0)
93+
benchmark (0.4.0)
8794
benchmark-ips (2.13.0)
8895
better_html (2.1.1)
8996
actionview (>= 6.0)
@@ -105,6 +112,7 @@ GEM
105112
xpath (~> 3.2)
106113
coderay (1.1.3)
107114
concurrent-ruby (1.3.4)
115+
connection_pool (2.5.0)
108116
crass (1.0.6)
109117
cuprite (0.15.1)
110118
capybara (~> 3.0)
@@ -116,7 +124,7 @@ GEM
116124
diff-lcs (1.5.1)
117125
docile (1.4.1)
118126
drb (2.2.1)
119-
erb_lint (0.7.0)
127+
erb_lint (0.8.0)
120128
activesupport
121129
better_html (>= 2.0.1)
122130
parser (>= 2.7.1.4)
@@ -147,6 +155,7 @@ GEM
147155
json (2.9.1)
148156
language_server-protocol (3.17.0.3)
149157
lint_roller (1.1.0)
158+
logger (1.6.4)
150159
loofah (2.24.0)
151160
crass (~> 1.0.2)
152161
nokogiri (>= 1.12.0)
@@ -182,6 +191,11 @@ GEM
182191
parser (3.3.6.0)
183192
ast (~> 2.4.1)
184193
racc
194+
propshaft (1.1.0)
195+
actionpack (>= 7.0.0)
196+
activesupport (>= 7.0.0)
197+
rack
198+
railties (>= 7.0.0)
185199
pry (0.15.2)
186200
coderay (~> 1.1)
187201
method_source (~> 1.0)
@@ -193,36 +207,42 @@ GEM
193207
nio4r (~> 2.0)
194208
racc (1.8.1)
195209
rack (2.2.10)
210+
rack-session (1.0.2)
211+
rack (< 3)
196212
rack-test (2.2.0)
197213
rack (>= 1.3)
198-
rails (7.0.8.7)
199-
actioncable (= 7.0.8.7)
200-
actionmailbox (= 7.0.8.7)
201-
actionmailer (= 7.0.8.7)
202-
actionpack (= 7.0.8.7)
203-
actiontext (= 7.0.8.7)
204-
actionview (= 7.0.8.7)
205-
activejob (= 7.0.8.7)
206-
activemodel (= 7.0.8.7)
207-
activerecord (= 7.0.8.7)
208-
activestorage (= 7.0.8.7)
209-
activesupport (= 7.0.8.7)
214+
rackup (1.0.1)
215+
rack (< 3)
216+
webrick
217+
rails (8.0.1)
218+
actioncable (= 8.0.1)
219+
actionmailbox (= 8.0.1)
220+
actionmailer (= 8.0.1)
221+
actionpack (= 8.0.1)
222+
actiontext (= 8.0.1)
223+
actionview (= 8.0.1)
224+
activejob (= 8.0.1)
225+
activemodel (= 8.0.1)
226+
activerecord (= 8.0.1)
227+
activestorage (= 8.0.1)
228+
activesupport (= 8.0.1)
210229
bundler (>= 1.15.0)
211-
railties (= 7.0.8.7)
230+
railties (= 8.0.1)
212231
rails-dom-testing (2.2.0)
213232
activesupport (>= 5.0.0)
214233
minitest
215234
nokogiri (>= 1.6)
216235
rails-html-sanitizer (1.6.2)
217236
loofah (~> 2.21)
218237
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)
219-
railties (7.0.8.7)
220-
actionpack (= 7.0.8.7)
221-
activesupport (= 7.0.8.7)
222-
method_source
238+
railties (8.0.1)
239+
actionpack (= 8.0.1)
240+
activesupport (= 8.0.1)
241+
irb (~> 1.13)
242+
rackup (>= 1.0.0)
223243
rake (>= 12.2)
224-
thor (~> 1.0)
225-
zeitwerk (~> 2.5)
244+
thor (~> 1.0, >= 1.2.2)
245+
zeitwerk (~> 2.6)
226246
rainbow (3.1.1)
227247
rake (13.2.1)
228248
rdoc (6.10.0)
@@ -267,6 +287,7 @@ GEM
267287
rubocop-ast (>= 1.31.1, < 2.0)
268288
ruby-progressbar (1.13.0)
269289
rubyzip (2.4.1)
290+
securerandom (0.4.1)
270291
selenium-webdriver (4.9.0)
271292
rexml (~> 3.2, >= 3.2.5)
272293
rubyzip (>= 1.2.2, < 3.0)
@@ -318,6 +339,8 @@ GEM
318339
tzinfo (2.0.6)
319340
concurrent-ruby (~> 1.0)
320341
unicode-display_width (2.6.0)
342+
uri (1.0.2)
343+
useragent (0.16.11)
321344
warning (1.5.0)
322345
webrick (1.9.1)
323346
websocket (1.2.11)
@@ -356,9 +379,10 @@ DEPENDENCIES
356379
net-imap
357380
net-pop
358381
net-smtp
382+
propshaft (~> 1.1.0)
359383
pry (~> 0.13)
360384
puma (~> 6)
361-
rails (~> 7.0.0)
385+
rails (~> 8)
362386
rake (~> 13.0)
363387
rspec-rails (~> 5)
364388
rubocop-md (~> 1)
@@ -375,7 +399,7 @@ DEPENDENCIES
375399
yard-activesupport-concern (~> 0.0.1)
376400

377401
RUBY VERSION
378-
ruby 3.3.0p0
402+
ruby 3.4.1p0
379403

380404
BUNDLED WITH
381405
2.5.3

test/sandbox/config/environments/test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,6 @@
5454
config.action_view.annotate_rendered_view_with_filenames = true if Rails.version.to_f >= 6.1
5555

5656
config.eager_load = true
57+
58+
config.active_support.to_time_preserves_timezone = :zone
5759
end

test/sandbox/test/rendering_test.rb

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -964,11 +964,13 @@ def test_multithread_render
964964
end
965965

966966
def test_concurrency_deadlock_cache
967-
with_compiler_development_mode(true) do
968-
with_new_cache do
969-
render_inline(ContentEvalComponent.new) do
970-
ViewComponent::CompileCache.invalidate!
971-
render_inline(ContentEvalComponent.new)
967+
assert_nothing_raised do
968+
with_compiler_development_mode(true) do
969+
with_new_cache do
970+
render_inline(ContentEvalComponent.new) do
971+
ViewComponent::CompileCache.invalidate!
972+
render_inline(ContentEvalComponent.new)
973+
end
972974
end
973975
end
974976
end
@@ -1089,27 +1091,29 @@ def test_renders_nested_collection
10891091
end
10901092

10911093
def test_concurrency_deadlock
1092-
with_compiler_development_mode(true) do
1093-
with_new_cache do
1094-
mutex = Mutex.new
1094+
assert_nothing_raised do
1095+
with_compiler_development_mode(true) do
1096+
with_new_cache do
1097+
mutex = Mutex.new
10951098

1096-
t1 = Thread.new do
1097-
mutex.synchronize do
1098-
sleep 0.02
1099-
render_inline(ContentEvalComponent.new)
1099+
t1 = Thread.new do
1100+
mutex.synchronize do
1101+
sleep 0.02
1102+
render_inline(ContentEvalComponent.new)
1103+
end
11001104
end
1101-
end
11021105

1103-
t = Thread.new do
1104-
render_inline(ContentEvalComponent.new) do
1105-
mutex.synchronize do
1106-
sleep 0.01
1106+
t = Thread.new do
1107+
render_inline(ContentEvalComponent.new) do
1108+
mutex.synchronize do
1109+
sleep 0.01
1110+
end
11071111
end
11081112
end
1109-
end
11101113

1111-
t1.join
1112-
t.join
1114+
t1.join
1115+
t.join
1116+
end
11131117
end
11141118
end
11151119
end

0 commit comments

Comments
 (0)