Skip to content

Commit b5f4791

Browse files
authored
Update for Rails 8 (#479)
1 parent 04d4dcb commit b5f4791

33 files changed

+315
-538
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
77
gemspec
88

99
gem "puma"
10-
gem "sqlite3", "< 2"
10+
gem "sqlite3"
1111
gem "debug", ">= 1.7.0"
1212
gem "mocha"
1313
gem "rubocop-shopify", "~> 2.15", require: false
@@ -17,7 +17,7 @@ gem "rubocop-sorbet", "~> 0.8", require: false
1717
gem "sorbet-static-and-runtime", platforms: :ruby
1818
gem "tapioca", "~> 0.13", require: false, platforms: :ruby
1919
gem "psych", "~> 5.1", require: false
20-
gem "rails"
20+
gem "rails", "8.0.0.beta1"
2121
gem "webmock"
2222

2323
platforms :mingw, :x64_mingw, :mswin, :jruby do

Gemfile.lock

Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -7,87 +7,85 @@ PATH
77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
actioncable (7.1.3.3)
11-
actionpack (= 7.1.3.3)
12-
activesupport (= 7.1.3.3)
10+
actioncable (8.0.0.beta1)
11+
actionpack (= 8.0.0.beta1)
12+
activesupport (= 8.0.0.beta1)
1313
nio4r (~> 2.0)
1414
websocket-driver (>= 0.6.1)
1515
zeitwerk (~> 2.6)
16-
actionmailbox (7.1.3.3)
17-
actionpack (= 7.1.3.3)
18-
activejob (= 7.1.3.3)
19-
activerecord (= 7.1.3.3)
20-
activestorage (= 7.1.3.3)
21-
activesupport (= 7.1.3.3)
22-
mail (>= 2.7.1)
23-
net-imap
24-
net-pop
25-
net-smtp
26-
actionmailer (7.1.3.3)
27-
actionpack (= 7.1.3.3)
28-
actionview (= 7.1.3.3)
29-
activejob (= 7.1.3.3)
30-
activesupport (= 7.1.3.3)
31-
mail (~> 2.5, >= 2.5.4)
32-
net-imap
33-
net-pop
34-
net-smtp
16+
actionmailbox (8.0.0.beta1)
17+
actionpack (= 8.0.0.beta1)
18+
activejob (= 8.0.0.beta1)
19+
activerecord (= 8.0.0.beta1)
20+
activestorage (= 8.0.0.beta1)
21+
activesupport (= 8.0.0.beta1)
22+
mail (>= 2.8.0)
23+
actionmailer (8.0.0.beta1)
24+
actionpack (= 8.0.0.beta1)
25+
actionview (= 8.0.0.beta1)
26+
activejob (= 8.0.0.beta1)
27+
activesupport (= 8.0.0.beta1)
28+
mail (>= 2.8.0)
3529
rails-dom-testing (~> 2.2)
36-
actionpack (7.1.3.3)
37-
actionview (= 7.1.3.3)
38-
activesupport (= 7.1.3.3)
30+
actionpack (8.0.0.beta1)
31+
actionview (= 8.0.0.beta1)
32+
activesupport (= 8.0.0.beta1)
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.3)
47-
actionpack (= 7.1.3.3)
48-
activerecord (= 7.1.3.3)
49-
activestorage (= 7.1.3.3)
50-
activesupport (= 7.1.3.3)
39+
useragent (~> 0.16)
40+
actiontext (8.0.0.beta1)
41+
actionpack (= 8.0.0.beta1)
42+
activerecord (= 8.0.0.beta1)
43+
activestorage (= 8.0.0.beta1)
44+
activesupport (= 8.0.0.beta1)
5145
globalid (>= 0.6.0)
5246
nokogiri (>= 1.8.5)
53-
actionview (7.1.3.3)
54-
activesupport (= 7.1.3.3)
47+
actionview (8.0.0.beta1)
48+
activesupport (= 8.0.0.beta1)
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.3)
60-
activesupport (= 7.1.3.3)
53+
activejob (8.0.0.beta1)
54+
activesupport (= 8.0.0.beta1)
6155
globalid (>= 0.3.6)
62-
activemodel (7.1.3.3)
63-
activesupport (= 7.1.3.3)
64-
activerecord (7.1.3.3)
65-
activemodel (= 7.1.3.3)
66-
activesupport (= 7.1.3.3)
56+
activemodel (8.0.0.beta1)
57+
activesupport (= 8.0.0.beta1)
58+
activerecord (8.0.0.beta1)
59+
activemodel (= 8.0.0.beta1)
60+
activesupport (= 8.0.0.beta1)
6761
timeout (>= 0.4.0)
68-
activestorage (7.1.3.3)
69-
actionpack (= 7.1.3.3)
70-
activejob (= 7.1.3.3)
71-
activerecord (= 7.1.3.3)
72-
activesupport (= 7.1.3.3)
62+
activestorage (8.0.0.beta1)
63+
actionpack (= 8.0.0.beta1)
64+
activejob (= 8.0.0.beta1)
65+
activerecord (= 8.0.0.beta1)
66+
activesupport (= 8.0.0.beta1)
7367
marcel (~> 1.0)
74-
activesupport (7.1.3.3)
68+
activesupport (8.0.0.beta1)
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.6)
8582
public_suffix (>= 2.0.2, < 6.0)
8683
ast (2.4.2)
8784
base64 (0.2.0)
85+
benchmark (0.3.0)
8886
bigdecimal (3.1.8)
89-
builder (3.2.4)
90-
concurrent-ruby (1.2.3)
87+
builder (3.3.0)
88+
concurrent-ruby (1.3.4)
9189
connection_pool (2.4.1)
9290
crack (1.0.0)
9391
bigdecimal
@@ -98,14 +96,14 @@ GEM
9896
irb (~> 1.10)
9997
reline (>= 0.3.8)
10098
drb (2.2.1)
101-
erubi (1.12.0)
99+
erubi (1.13.0)
102100
globalid (1.2.1)
103101
activesupport (>= 6.1)
104102
hashdiff (1.1.0)
105-
i18n (1.14.5)
103+
i18n (1.14.6)
106104
concurrent-ruby (~> 1.0)
107105
io-console (0.7.2)
108-
irb (1.13.1)
106+
irb (1.14.1)
109107
rdoc (>= 4.0.0)
110108
reline (>= 0.4.2)
111109
json (2.7.2)
@@ -121,11 +119,10 @@ GEM
121119
net-smtp
122120
marcel (1.0.4)
123121
mini_mime (1.1.5)
124-
minitest (5.23.0)
122+
minitest (5.25.1)
125123
mocha (2.3.0)
126124
ruby2_keywords (>= 0.0.5)
127-
mutex_m (0.2.0)
128-
net-imap (0.4.11)
125+
net-imap (0.4.16)
129126
date
130127
net-protocol
131128
net-pop (0.1.2)
@@ -136,13 +133,13 @@ GEM
136133
net-protocol
137134
netrc (0.11.0)
138135
nio4r (2.7.3)
139-
nokogiri (1.16.5-arm64-darwin)
136+
nokogiri (1.16.7-arm64-darwin)
140137
racc (~> 1.4)
141-
nokogiri (1.16.5-x64-mingw-ucrt)
138+
nokogiri (1.16.7-x64-mingw-ucrt)
142139
racc (~> 1.4)
143-
nokogiri (1.16.5-x86_64-darwin)
140+
nokogiri (1.16.7-x86_64-darwin)
144141
racc (~> 1.4)
145-
nokogiri (1.16.5-x86_64-linux)
142+
nokogiri (1.16.7-x86_64-linux)
146143
racc (~> 1.4)
147144
parallel (1.24.0)
148145
parser (3.3.1.0)
@@ -154,40 +151,40 @@ GEM
154151
public_suffix (5.0.5)
155152
puma (6.4.3)
156153
nio4r (~> 2.0)
157-
racc (1.7.3)
158-
rack (3.0.11)
154+
racc (1.8.1)
155+
rack (3.1.7)
159156
rack-session (2.0.0)
160157
rack (>= 3.0.0)
161158
rack-test (2.1.0)
162159
rack (>= 1.3)
163160
rackup (2.1.0)
164161
rack (>= 3)
165162
webrick (~> 1.8)
166-
rails (7.1.3.3)
167-
actioncable (= 7.1.3.3)
168-
actionmailbox (= 7.1.3.3)
169-
actionmailer (= 7.1.3.3)
170-
actionpack (= 7.1.3.3)
171-
actiontext (= 7.1.3.3)
172-
actionview (= 7.1.3.3)
173-
activejob (= 7.1.3.3)
174-
activemodel (= 7.1.3.3)
175-
activerecord (= 7.1.3.3)
176-
activestorage (= 7.1.3.3)
177-
activesupport (= 7.1.3.3)
163+
rails (8.0.0.beta1)
164+
actioncable (= 8.0.0.beta1)
165+
actionmailbox (= 8.0.0.beta1)
166+
actionmailer (= 8.0.0.beta1)
167+
actionpack (= 8.0.0.beta1)
168+
actiontext (= 8.0.0.beta1)
169+
actionview (= 8.0.0.beta1)
170+
activejob (= 8.0.0.beta1)
171+
activemodel (= 8.0.0.beta1)
172+
activerecord (= 8.0.0.beta1)
173+
activestorage (= 8.0.0.beta1)
174+
activesupport (= 8.0.0.beta1)
178175
bundler (>= 1.15.0)
179-
railties (= 7.1.3.3)
176+
railties (= 8.0.0.beta1)
180177
rails-dom-testing (2.2.0)
181178
activesupport (>= 5.0.0)
182179
minitest
183180
nokogiri (>= 1.6)
184181
rails-html-sanitizer (1.6.0)
185182
loofah (~> 2.21)
186183
nokogiri (~> 1.14)
187-
railties (7.1.3.3)
188-
actionpack (= 7.1.3.3)
189-
activesupport (= 7.1.3.3)
190-
irb
184+
railties (8.0.0.beta1)
185+
actionpack (= 8.0.0.beta1)
186+
activesupport (= 8.0.0.beta1)
187+
irb (~> 1.13)
191188
rackup (>= 1.0.0)
192189
rake (>= 12.2)
193190
thor (~> 1.0, >= 1.2.2)
@@ -199,10 +196,10 @@ GEM
199196
sorbet-runtime (>= 0.5.9204)
200197
rbs (3.6.1)
201198
logger
202-
rdoc (6.6.3.1)
199+
rdoc (6.7.0)
203200
psych (>= 4.0.0)
204201
regexp_parser (2.9.0)
205-
reline (0.5.7)
202+
reline (0.5.10)
206203
io-console (~> 0.5)
207204
rexml (3.3.8)
208205
rubocop (1.63.4)
@@ -234,6 +231,7 @@ GEM
234231
sorbet-runtime (>= 0.5.10782)
235232
ruby-progressbar (1.13.0)
236233
ruby2_keywords (0.0.5)
234+
securerandom (0.3.1)
237235
sorbet (0.5.11577)
238236
sorbet-static (= 0.5.11577)
239237
sorbet-runtime (0.5.11577)
@@ -247,11 +245,11 @@ GEM
247245
prism (>= 0.19.0)
248246
sorbet-static-and-runtime (>= 0.5.10187)
249247
thor (>= 0.19.2)
250-
sqlite3 (1.7.3-arm64-darwin)
251-
sqlite3 (1.7.3-x64-mingw-ucrt)
252-
sqlite3 (1.7.3-x86_64-darwin)
253-
sqlite3 (1.7.3-x86_64-linux)
254-
stringio (3.1.0)
248+
sqlite3 (2.1.0-arm64-darwin)
249+
sqlite3 (2.1.0-x64-mingw-ucrt)
250+
sqlite3 (2.1.0-x86_64-darwin)
251+
sqlite3 (2.1.0-x86_64-linux-gnu)
252+
stringio (3.1.1)
255253
tapioca (0.16.2)
256254
bundler (>= 2.2.25)
257255
netrc (>= 0.11.0)
@@ -261,13 +259,15 @@ GEM
261259
spoom (>= 1.2.0)
262260
thor (>= 1.2.0)
263261
yard-sorbet
264-
thor (1.3.1)
262+
thor (1.3.2)
265263
timeout (0.4.1)
266264
tzinfo (2.0.6)
267265
concurrent-ruby (~> 1.0)
268266
tzinfo-data (1.2024.1)
269267
tzinfo (>= 1.0.0)
270268
unicode-display_width (2.5.0)
269+
uri (0.13.1)
270+
useragent (0.16.10)
271271
webmock (3.23.1)
272272
addressable (>= 2.8.0)
273273
crack (>= 0.3.2)
@@ -280,7 +280,7 @@ GEM
280280
yard-sorbet (0.8.1)
281281
sorbet-runtime (>= 0.5)
282282
yard (>= 0.9)
283-
zeitwerk (2.6.14)
283+
zeitwerk (2.6.18)
284284

285285
PLATFORMS
286286
arm64-darwin
@@ -293,14 +293,14 @@ DEPENDENCIES
293293
mocha
294294
psych (~> 5.1)
295295
puma
296-
rails
296+
rails (= 8.0.0.beta1)
297297
rubocop-minitest (~> 0.35.0)
298298
rubocop-rake (~> 0.6.0)
299299
rubocop-shopify (~> 2.15)
300300
rubocop-sorbet (~> 0.8)
301301
ruby-lsp-rails!
302302
sorbet-static-and-runtime
303-
sqlite3 (< 2)
303+
sqlite3
304304
tapioca (~> 0.13)
305305
tzinfo
306306
tzinfo-data

test/dummy/app/controllers/application_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ def create
88
archive_users_path
99
invalid_path
1010
end
11+
12+
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
13+
allow_browser versions: :modern
1114
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
class ApplicationJob < ActiveJob::Base
4+
# Automatically retry jobs that encountered a deadlock
5+
# retry_on ActiveRecord::Deadlocked
6+
7+
# Most jobs are safe to ignore if the underlying records are no longer available
8+
# discard_on ActiveJob::DeserializationError
9+
end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
class ApplicationMailer < ActionMailer::Base
4+
default from: "[email protected]"
5+
layout "mailer"
6+
end

test/dummy/app/views/layouts/application.html.erb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>Dummy</title>
4+
<title><%= content_for(:title) || "Dummy" %></title>
55
<meta name="viewport" content="width=device-width,initial-scale=1">
6+
<meta name="apple-mobile-web-app-capable" content="yes">
7+
<meta name="mobile-web-app-capable" content="yes">
68
<%= csrf_meta_tags %>
79
<%= csp_meta_tag %>
810

11+
<%= yield :head %>
12+
13+
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
14+
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
15+
16+
<link rel="icon" href="/icon.png" type="image/png">
17+
<link rel="icon" href="/icon.svg" type="image/svg+xml">
18+
<link rel="apple-touch-icon" href="/icon.png">
19+
20+
<%# Includes all stylesheet files in app/views/stylesheets %>
921
<%= stylesheet_link_tag "application" %>
1022
</head>
1123

0 commit comments

Comments
 (0)