Skip to content

Commit 80899b3

Browse files
authored
Upgrade dependencies (rails 8.0 - redis - turbo - stimulus - rubocop) (#605)
* upgrade rails from 7.1 to 8.0, also upgrades other dependencies Fixes spec/stimulus/turbo_spec.rb:42 failing in CI. The Turbo spec was failing because new comments weren't appearing immediately after submission. * avoid deprecation warning "`to_time` will always preserve the full timezone rather than offset of the receiver in Rails 8.1." Configure Rails to use full timezone preservation instead of offset, adopting the upcoming Rails 8.1 default behavior early.
1 parent f0e1121 commit 80899b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+994
-564
lines changed

Gemfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gem "shakapacker", "8.0.0"
1010

1111
# Bundle edge Rails instead: gem "rails", github: "rails/rails"
1212
gem "listen"
13-
gem "rails", "~> 7.1"
13+
gem "rails", "~> 8.0"
1414

1515
gem "pg"
1616

@@ -30,7 +30,7 @@ gem "coffee-rails"
3030

3131
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
3232
gem "jbuilder"
33-
gem "redis", "~> 4.0"
33+
gem "redis", "~> 5.0"
3434

3535
# bundle exec rake doc:rails generates the API under doc/api.
3636
gem "sdoc", group: :doc
@@ -74,10 +74,10 @@ group :development, :test do
7474

7575
################################################################################
7676
# Linters and Security
77-
gem "rubocop", "1.24.1", require: false
77+
gem "rubocop", "1.69", require: false
7878
gem "rubocop-performance", "~> 1.13"
7979
gem "rubocop-rails"
80-
gem "rubocop-rspec", "~> 2.7"
80+
gem "rubocop-rspec", "~> 3.3"
8181
# Critical that require: false be set! https://github.com/brigade/scss-lint/issues/278
8282
gem "scss_lint", require: false
8383

@@ -109,5 +109,5 @@ group :test do
109109
gem "selenium-webdriver", "~> 4"
110110
end
111111

112-
gem "stimulus-rails", "~> 1.2"
113-
gem "turbo-rails", "~> 1.4"
112+
gem "stimulus-rails", "~> 1.3"
113+
gem "turbo-rails", "~> 2.0"

Gemfile.lock

Lines changed: 95 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -7,87 +7,85 @@ GIT
77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
actioncable (7.1.3.4)
11-
actionpack (= 7.1.3.4)
12-
activesupport (= 7.1.3.4)
10+
actioncable (8.0.0)
11+
actionpack (= 8.0.0)
12+
activesupport (= 8.0.0)
1313
nio4r (~> 2.0)
1414
websocket-driver (>= 0.6.1)
1515
zeitwerk (~> 2.6)
16-
actionmailbox (7.1.3.4)
17-
actionpack (= 7.1.3.4)
18-
activejob (= 7.1.3.4)
19-
activerecord (= 7.1.3.4)
20-
activestorage (= 7.1.3.4)
21-
activesupport (= 7.1.3.4)
22-
mail (>= 2.7.1)
23-
net-imap
24-
net-pop
25-
net-smtp
26-
actionmailer (7.1.3.4)
27-
actionpack (= 7.1.3.4)
28-
actionview (= 7.1.3.4)
29-
activejob (= 7.1.3.4)
30-
activesupport (= 7.1.3.4)
31-
mail (~> 2.5, >= 2.5.4)
32-
net-imap
33-
net-pop
34-
net-smtp
16+
actionmailbox (8.0.0)
17+
actionpack (= 8.0.0)
18+
activejob (= 8.0.0)
19+
activerecord (= 8.0.0)
20+
activestorage (= 8.0.0)
21+
activesupport (= 8.0.0)
22+
mail (>= 2.8.0)
23+
actionmailer (8.0.0)
24+
actionpack (= 8.0.0)
25+
actionview (= 8.0.0)
26+
activejob (= 8.0.0)
27+
activesupport (= 8.0.0)
28+
mail (>= 2.8.0)
3529
rails-dom-testing (~> 2.2)
36-
actionpack (7.1.3.4)
37-
actionview (= 7.1.3.4)
38-
activesupport (= 7.1.3.4)
30+
actionpack (8.0.0)
31+
actionview (= 8.0.0)
32+
activesupport (= 8.0.0)
3933
nokogiri (>= 1.8.5)
40-
racc
4134
rack (>= 2.2.4)
4235
rack-session (>= 1.0.1)
4336
rack-test (>= 0.6.3)
4437
rails-dom-testing (~> 2.2)
4538
rails-html-sanitizer (~> 1.6)
46-
actiontext (7.1.3.4)
47-
actionpack (= 7.1.3.4)
48-
activerecord (= 7.1.3.4)
49-
activestorage (= 7.1.3.4)
50-
activesupport (= 7.1.3.4)
39+
useragent (~> 0.16)
40+
actiontext (8.0.0)
41+
actionpack (= 8.0.0)
42+
activerecord (= 8.0.0)
43+
activestorage (= 8.0.0)
44+
activesupport (= 8.0.0)
5145
globalid (>= 0.6.0)
5246
nokogiri (>= 1.8.5)
53-
actionview (7.1.3.4)
54-
activesupport (= 7.1.3.4)
47+
actionview (8.0.0)
48+
activesupport (= 8.0.0)
5549
builder (~> 3.1)
5650
erubi (~> 1.11)
5751
rails-dom-testing (~> 2.2)
5852
rails-html-sanitizer (~> 1.6)
59-
activejob (7.1.3.4)
60-
activesupport (= 7.1.3.4)
53+
activejob (8.0.0)
54+
activesupport (= 8.0.0)
6155
globalid (>= 0.3.6)
62-
activemodel (7.1.3.4)
63-
activesupport (= 7.1.3.4)
64-
activerecord (7.1.3.4)
65-
activemodel (= 7.1.3.4)
66-
activesupport (= 7.1.3.4)
56+
activemodel (8.0.0)
57+
activesupport (= 8.0.0)
58+
activerecord (8.0.0)
59+
activemodel (= 8.0.0)
60+
activesupport (= 8.0.0)
6761
timeout (>= 0.4.0)
68-
activestorage (7.1.3.4)
69-
actionpack (= 7.1.3.4)
70-
activejob (= 7.1.3.4)
71-
activerecord (= 7.1.3.4)
72-
activesupport (= 7.1.3.4)
62+
activestorage (8.0.0)
63+
actionpack (= 8.0.0)
64+
activejob (= 8.0.0)
65+
activerecord (= 8.0.0)
66+
activesupport (= 8.0.0)
7367
marcel (~> 1.0)
74-
activesupport (7.1.3.4)
68+
activesupport (8.0.0)
7569
base64
70+
benchmark (>= 0.3)
7671
bigdecimal
77-
concurrent-ruby (~> 1.0, >= 1.0.2)
72+
concurrent-ruby (~> 1.0, >= 1.3.1)
7873
connection_pool (>= 2.2.5)
7974
drb
8075
i18n (>= 1.6, < 2)
76+
logger (>= 1.4.2)
8177
minitest (>= 5.1)
82-
mutex_m
83-
tzinfo (~> 2.0)
78+
securerandom (>= 0.3)
79+
tzinfo (~> 2.0, >= 2.0.5)
80+
uri (>= 0.13.1)
8481
addressable (2.8.7)
8582
public_suffix (>= 2.0.2, < 7.0)
8683
ast (2.4.2)
8784
autoprefixer-rails (10.4.16.0)
8885
execjs (~> 2)
8986
awesome_print (1.9.2)
9087
base64 (0.2.0)
88+
benchmark (0.4.0)
9189
bigdecimal (3.1.8)
9290
bindex (0.8.1)
9391
binding_of_caller (1.0.1)
@@ -131,7 +129,7 @@ GEM
131129
activerecord (>= 5.a)
132130
database_cleaner-core (~> 2.0.0)
133131
database_cleaner-core (2.0.1)
134-
date (3.3.4)
132+
date (3.4.0)
135133
debug (1.9.2)
136134
irb (~> 1.10)
137135
reline (>= 0.3.8)
@@ -167,6 +165,7 @@ GEM
167165
actionview (>= 5.0.0)
168166
activesupport (>= 5.0.0)
169167
json (2.7.2)
168+
language_server-protocol (3.17.0.3)
170169
launchy (3.0.1)
171170
addressable (~> 2.8)
172171
childprocess (~> 5.0)
@@ -190,8 +189,7 @@ GEM
190189
minitest (5.24.1)
191190
mize (0.4.1)
192191
protocol (~> 2.0)
193-
mutex_m (0.2.0)
194-
net-imap (0.4.14)
192+
net-imap (0.5.1)
195193
date
196194
net-protocol
197195
net-protocol (0.2.2)
@@ -207,7 +205,7 @@ GEM
207205
nokogiri (1.16.6-x86_64-linux)
208206
racc (~> 1.4)
209207
package_json (0.1.0)
210-
parallel (1.25.1)
208+
parallel (1.26.3)
211209
parser (3.3.3.0)
212210
ast (~> 2.4.1)
213211
racc
@@ -247,20 +245,20 @@ GEM
247245
rackup (2.1.0)
248246
rack (>= 3)
249247
webrick (~> 1.8)
250-
rails (7.1.3.4)
251-
actioncable (= 7.1.3.4)
252-
actionmailbox (= 7.1.3.4)
253-
actionmailer (= 7.1.3.4)
254-
actionpack (= 7.1.3.4)
255-
actiontext (= 7.1.3.4)
256-
actionview (= 7.1.3.4)
257-
activejob (= 7.1.3.4)
258-
activemodel (= 7.1.3.4)
259-
activerecord (= 7.1.3.4)
260-
activestorage (= 7.1.3.4)
261-
activesupport (= 7.1.3.4)
248+
rails (8.0.0)
249+
actioncable (= 8.0.0)
250+
actionmailbox (= 8.0.0)
251+
actionmailer (= 8.0.0)
252+
actionpack (= 8.0.0)
253+
actiontext (= 8.0.0)
254+
actionview (= 8.0.0)
255+
activejob (= 8.0.0)
256+
activemodel (= 8.0.0)
257+
activerecord (= 8.0.0)
258+
activestorage (= 8.0.0)
259+
activesupport (= 8.0.0)
262260
bundler (>= 1.15.0)
263-
railties (= 7.1.3.4)
261+
railties (= 8.0.0)
264262
rails-dom-testing (2.2.0)
265263
activesupport (>= 5.0.0)
266264
minitest
@@ -276,10 +274,10 @@ GEM
276274
json
277275
require_all (~> 3.0)
278276
ruby-progressbar
279-
railties (7.1.3.4)
280-
actionpack (= 7.1.3.4)
281-
activesupport (= 7.1.3.4)
282-
irb
277+
railties (8.0.0)
278+
actionpack (= 8.0.0)
279+
activesupport (= 8.0.0)
280+
irb (~> 1.13)
283281
rackup (>= 1.0.0)
284282
rake (>= 12.2)
285283
thor (~> 1.0, >= 1.2.2)
@@ -298,7 +296,10 @@ GEM
298296
rails (>= 5.2)
299297
rainbow (~> 3.0)
300298
redcarpet (3.6.0)
301-
redis (4.8.1)
299+
redis (5.3.0)
300+
redis-client (>= 0.22.0)
301+
redis-client (0.22.2)
302+
connection_pool
302303
regexp_parser (2.9.2)
303304
reline (0.5.9)
304305
io-console (~> 0.5)
@@ -322,16 +323,17 @@ GEM
322323
rspec-mocks (~> 3.12)
323324
rspec-support (~> 3.12)
324325
rspec-support (3.13.1)
325-
rubocop (1.24.1)
326+
rubocop (1.69.0)
327+
json (~> 2.3)
328+
language_server-protocol (>= 3.17.0)
326329
parallel (~> 1.10)
327-
parser (>= 3.0.0.0)
330+
parser (>= 3.3.0.2)
328331
rainbow (>= 2.2.2, < 4.0)
329-
regexp_parser (>= 1.8, < 3.0)
330-
rexml
331-
rubocop-ast (>= 1.15.1, < 2.0)
332+
regexp_parser (>= 2.4, < 3.0)
333+
rubocop-ast (>= 1.36.1, < 2.0)
332334
ruby-progressbar (~> 1.7)
333-
unicode-display_width (>= 1.4.0, < 3.0)
334-
rubocop-ast (1.31.3)
335+
unicode-display_width (>= 2.4.0, < 4.0)
336+
rubocop-ast (1.36.1)
335337
parser (>= 3.3.1.0)
336338
rubocop-performance (1.19.1)
337339
rubocop (>= 1.7.0, < 2.0)
@@ -340,8 +342,8 @@ GEM
340342
activesupport (>= 4.2.0)
341343
rack (>= 1.1)
342344
rubocop (>= 1.7.0, < 2.0)
343-
rubocop-rspec (2.11.1)
344-
rubocop (~> 1.19)
345+
rubocop-rspec (3.3.0)
346+
rubocop (~> 1.61)
345347
ruby-progressbar (1.13.0)
346348
ruby_parser (3.21.0)
347349
racc (~> 1.5)
@@ -366,6 +368,7 @@ GEM
366368
sass (~> 3.5, >= 3.5.5)
367369
sdoc (2.6.1)
368370
rdoc (>= 5.0)
371+
securerandom (0.3.2)
369372
selenium-webdriver (4.22.0)
370373
base64 (~> 0.2)
371374
logger (~> 1.4)
@@ -410,15 +413,18 @@ GEM
410413
tins (1.33.0)
411414
bigdecimal
412415
sync
413-
turbo-rails (1.5.0)
416+
turbo-rails (2.0.11)
414417
actionpack (>= 6.0.0)
415-
activejob (>= 6.0.0)
416418
railties (>= 6.0.0)
417419
tzinfo (2.0.6)
418420
concurrent-ruby (~> 1.0)
419421
uglifier (4.2.0)
420422
execjs (>= 0.3.0, < 3)
421-
unicode-display_width (2.5.0)
423+
unicode-display_width (3.1.2)
424+
unicode-emoji (~> 4.0, >= 4.0.4)
425+
unicode-emoji (4.0.4)
426+
uri (1.0.2)
427+
useragent (0.16.10)
422428
web-console (4.2.1)
423429
actionview (>= 6.0.0)
424430
activemodel (>= 6.0.0)
@@ -463,27 +469,27 @@ DEPENDENCIES
463469
pry-rescue
464470
pry-stack_explorer
465471
puma
466-
rails (~> 7.1)
472+
rails (~> 8.0)
467473
rails-html-sanitizer
468474
rails_best_practices
469475
rainbow
470476
react_on_rails (= 14.1.0.rc.0)
471477
redcarpet
472-
redis (~> 4.0)
478+
redis (~> 5.0)
473479
rspec-rails (~> 6.0.0)
474-
rubocop (= 1.24.1)
480+
rubocop (= 1.69)
475481
rubocop-performance (~> 1.13)
476482
rubocop-rails
477-
rubocop-rspec (~> 2.7)
483+
rubocop-rspec (~> 3.3)
478484
sass-rails
479485
scss_lint
480486
sdoc
481487
selenium-webdriver (~> 4)
482488
shakapacker (= 8.0.0)
483489
spring
484490
spring-commands-rspec
485-
stimulus-rails (~> 1.2)
486-
turbo-rails (~> 1.4)
491+
stimulus-rails (~> 1.3)
492+
turbo-rails (~> 2.0)
487493
uglifier
488494
web-console
489495

app/controllers/pages_controller.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ def comments_json_string
5050
end
5151

5252
def render_html
53-
respond_to do |format|
54-
format.html
55-
end
53+
respond_to(&:html)
5654
end
5755
end

0 commit comments

Comments
 (0)