Skip to content

Commit 4c41280

Browse files
authored
Add support for Rails 8.0 (#1239)
Here, we loosen the constraints to allow us to use Rails 8.0, and update the `dummy` app so that we're testing against Rails 8.0. Closes #1213.
1 parent a4a4af0 commit 4c41280

28 files changed

+919
-424
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ gemspec
66

77
gem "puma"
88

9-
gem "sqlite3"
9+
gem "sqlite3", ">= 2.1"
1010

1111
# Start debugger with binding.b [https://github.com/ruby/debug]
1212
# gem "debug", ">= 1.0.0"

Gemfile.lock

+119-111
Original file line numberDiff line numberDiff line change
@@ -2,187 +2,190 @@ PATH
22
remote: .
33
specs:
44
suspenders (20240516.0)
5-
rails (~> 7.0)
5+
rails (~> 8.0)
66

77
GEM
88
remote: https://rubygems.org/
99
specs:
10-
actioncable (7.1.1)
11-
actionpack (= 7.1.1)
12-
activesupport (= 7.1.1)
10+
actioncable (8.0.1)
11+
actionpack (= 8.0.1)
12+
activesupport (= 8.0.1)
1313
nio4r (~> 2.0)
1414
websocket-driver (>= 0.6.1)
1515
zeitwerk (~> 2.6)
16-
actionmailbox (7.1.1)
17-
actionpack (= 7.1.1)
18-
activejob (= 7.1.1)
19-
activerecord (= 7.1.1)
20-
activestorage (= 7.1.1)
21-
activesupport (= 7.1.1)
22-
mail (>= 2.7.1)
23-
net-imap
24-
net-pop
25-
net-smtp
26-
actionmailer (7.1.1)
27-
actionpack (= 7.1.1)
28-
actionview (= 7.1.1)
29-
activejob (= 7.1.1)
30-
activesupport (= 7.1.1)
31-
mail (~> 2.5, >= 2.5.4)
32-
net-imap
33-
net-pop
34-
net-smtp
16+
actionmailbox (8.0.1)
17+
actionpack (= 8.0.1)
18+
activejob (= 8.0.1)
19+
activerecord (= 8.0.1)
20+
activestorage (= 8.0.1)
21+
activesupport (= 8.0.1)
22+
mail (>= 2.8.0)
23+
actionmailer (8.0.1)
24+
actionpack (= 8.0.1)
25+
actionview (= 8.0.1)
26+
activejob (= 8.0.1)
27+
activesupport (= 8.0.1)
28+
mail (>= 2.8.0)
3529
rails-dom-testing (~> 2.2)
36-
actionpack (7.1.1)
37-
actionview (= 7.1.1)
38-
activesupport (= 7.1.1)
30+
actionpack (8.0.1)
31+
actionview (= 8.0.1)
32+
activesupport (= 8.0.1)
3933
nokogiri (>= 1.8.5)
4034
rack (>= 2.2.4)
4135
rack-session (>= 1.0.1)
4236
rack-test (>= 0.6.3)
4337
rails-dom-testing (~> 2.2)
4438
rails-html-sanitizer (~> 1.6)
45-
actiontext (7.1.1)
46-
actionpack (= 7.1.1)
47-
activerecord (= 7.1.1)
48-
activestorage (= 7.1.1)
49-
activesupport (= 7.1.1)
39+
useragent (~> 0.16)
40+
actiontext (8.0.1)
41+
actionpack (= 8.0.1)
42+
activerecord (= 8.0.1)
43+
activestorage (= 8.0.1)
44+
activesupport (= 8.0.1)
5045
globalid (>= 0.6.0)
5146
nokogiri (>= 1.8.5)
52-
actionview (7.1.1)
53-
activesupport (= 7.1.1)
47+
actionview (8.0.1)
48+
activesupport (= 8.0.1)
5449
builder (~> 3.1)
5550
erubi (~> 1.11)
5651
rails-dom-testing (~> 2.2)
5752
rails-html-sanitizer (~> 1.6)
58-
activejob (7.1.1)
59-
activesupport (= 7.1.1)
53+
activejob (8.0.1)
54+
activesupport (= 8.0.1)
6055
globalid (>= 0.3.6)
61-
activemodel (7.1.1)
62-
activesupport (= 7.1.1)
63-
activerecord (7.1.1)
64-
activemodel (= 7.1.1)
65-
activesupport (= 7.1.1)
56+
activemodel (8.0.1)
57+
activesupport (= 8.0.1)
58+
activerecord (8.0.1)
59+
activemodel (= 8.0.1)
60+
activesupport (= 8.0.1)
6661
timeout (>= 0.4.0)
67-
activestorage (7.1.1)
68-
actionpack (= 7.1.1)
69-
activejob (= 7.1.1)
70-
activerecord (= 7.1.1)
71-
activesupport (= 7.1.1)
62+
activestorage (8.0.1)
63+
actionpack (= 8.0.1)
64+
activejob (= 8.0.1)
65+
activerecord (= 8.0.1)
66+
activesupport (= 8.0.1)
7267
marcel (~> 1.0)
73-
activesupport (7.1.1)
68+
activesupport (8.0.1)
7469
base64
70+
benchmark (>= 0.3)
7571
bigdecimal
76-
concurrent-ruby (~> 1.0, >= 1.0.2)
72+
concurrent-ruby (~> 1.0, >= 1.3.1)
7773
connection_pool (>= 2.2.5)
7874
drb
7975
i18n (>= 1.6, < 2)
76+
logger (>= 1.4.2)
8077
minitest (>= 5.1)
81-
mutex_m
82-
tzinfo (~> 2.0)
78+
securerandom (>= 0.3)
79+
tzinfo (~> 2.0, >= 2.0.5)
80+
uri (>= 0.13.1)
8381
ast (2.4.2)
84-
base64 (0.1.1)
85-
bigdecimal (3.1.4)
86-
builder (3.2.4)
82+
base64 (0.1.2)
83+
benchmark (0.4.0)
84+
bigdecimal (3.1.9)
85+
builder (3.3.0)
8786
climate_control (1.2.0)
88-
concurrent-ruby (1.2.2)
89-
connection_pool (2.4.1)
87+
concurrent-ruby (1.3.5)
88+
connection_pool (2.5.0)
9089
crass (1.0.6)
91-
date (3.3.3)
92-
drb (2.1.1)
93-
ruby2_keywords
94-
erubi (1.12.0)
90+
date (3.4.1)
91+
drb (2.2.1)
92+
erubi (1.13.1)
9593
globalid (1.2.1)
9694
activesupport (>= 6.1)
97-
i18n (1.14.1)
95+
i18n (1.14.7)
9896
concurrent-ruby (~> 1.0)
99-
io-console (0.6.0)
100-
irb (1.8.3)
101-
rdoc
102-
reline (>= 0.3.8)
97+
io-console (0.8.0)
98+
irb (1.15.1)
99+
pp (>= 0.6.0)
100+
rdoc (>= 4.0.0)
101+
reline (>= 0.4.2)
103102
json (2.6.3)
104103
language_server-protocol (3.17.0.3)
105104
lint_roller (1.1.0)
106-
loofah (2.21.4)
105+
logger (1.6.6)
106+
loofah (2.24.0)
107107
crass (~> 1.0.2)
108108
nokogiri (>= 1.12.0)
109109
mail (2.8.1)
110110
mini_mime (>= 0.1.1)
111111
net-imap
112112
net-pop
113113
net-smtp
114-
marcel (1.0.2)
114+
marcel (1.0.4)
115115
mini_mime (1.1.5)
116-
minitest (5.20.0)
116+
minitest (5.25.4)
117117
mocha (2.1.0)
118118
ruby2_keywords (>= 0.0.5)
119-
mutex_m (0.1.2)
120-
net-imap (0.4.1)
119+
net-imap (0.5.6)
121120
date
122121
net-protocol
123122
net-pop (0.1.2)
124123
net-protocol
125-
net-protocol (0.2.1)
124+
net-protocol (0.2.2)
126125
timeout
127-
net-smtp (0.4.0)
126+
net-smtp (0.5.1)
128127
net-protocol
129-
nio4r (2.5.9)
130-
nokogiri (1.16.3-arm64-darwin)
128+
nio4r (2.7.4)
129+
nokogiri (1.18.2-arm64-darwin)
131130
racc (~> 1.4)
132-
nokogiri (1.16.3-x86_64-linux)
131+
nokogiri (1.18.2-x86_64-linux-gnu)
133132
racc (~> 1.4)
134133
parallel (1.23.0)
135134
parser (3.2.2.4)
136135
ast (~> 2.4.1)
137136
racc
138-
psych (5.1.1.1)
137+
pp (0.6.2)
138+
prettyprint
139+
prettyprint (0.2.0)
140+
psych (5.2.3)
141+
date
139142
stringio
140143
puma (6.4.0)
141144
nio4r (~> 2.0)
142-
racc (1.7.1)
143-
rack (3.0.8)
144-
rack-session (2.0.0)
145+
racc (1.8.1)
146+
rack (3.1.10)
147+
rack-session (2.1.0)
148+
base64 (>= 0.1.0)
145149
rack (>= 3.0.0)
146-
rack-test (2.1.0)
150+
rack-test (2.2.0)
147151
rack (>= 1.3)
148-
rackup (2.1.0)
152+
rackup (2.2.1)
149153
rack (>= 3)
150-
webrick (~> 1.8)
151-
rails (7.1.1)
152-
actioncable (= 7.1.1)
153-
actionmailbox (= 7.1.1)
154-
actionmailer (= 7.1.1)
155-
actionpack (= 7.1.1)
156-
actiontext (= 7.1.1)
157-
actionview (= 7.1.1)
158-
activejob (= 7.1.1)
159-
activemodel (= 7.1.1)
160-
activerecord (= 7.1.1)
161-
activestorage (= 7.1.1)
162-
activesupport (= 7.1.1)
154+
rails (8.0.1)
155+
actioncable (= 8.0.1)
156+
actionmailbox (= 8.0.1)
157+
actionmailer (= 8.0.1)
158+
actionpack (= 8.0.1)
159+
actiontext (= 8.0.1)
160+
actionview (= 8.0.1)
161+
activejob (= 8.0.1)
162+
activemodel (= 8.0.1)
163+
activerecord (= 8.0.1)
164+
activestorage (= 8.0.1)
165+
activesupport (= 8.0.1)
163166
bundler (>= 1.15.0)
164-
railties (= 7.1.1)
167+
railties (= 8.0.1)
165168
rails-dom-testing (2.2.0)
166169
activesupport (>= 5.0.0)
167170
minitest
168171
nokogiri (>= 1.6)
169-
rails-html-sanitizer (1.6.0)
172+
rails-html-sanitizer (1.6.2)
170173
loofah (~> 2.21)
171-
nokogiri (~> 1.14)
172-
railties (7.1.1)
173-
actionpack (= 7.1.1)
174-
activesupport (= 7.1.1)
175-
irb
174+
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)
175+
railties (8.0.1)
176+
actionpack (= 8.0.1)
177+
activesupport (= 8.0.1)
178+
irb (~> 1.13)
176179
rackup (>= 1.0.0)
177180
rake (>= 12.2)
178181
thor (~> 1.0, >= 1.2.2)
179182
zeitwerk (~> 2.6)
180183
rainbow (3.1.1)
181-
rake (13.0.6)
182-
rdoc (6.5.0)
184+
rake (13.2.1)
185+
rdoc (6.12.0)
183186
psych (>= 4.0.0)
184187
regexp_parser (2.8.2)
185-
reline (0.3.9)
188+
reline (0.6.0)
186189
io-console (~> 0.5)
187190
rexml (3.2.6)
188191
rubocop (1.56.4)
@@ -204,8 +207,9 @@ GEM
204207
rubocop-ast (>= 0.4.0)
205208
ruby-progressbar (1.13.0)
206209
ruby2_keywords (0.0.5)
207-
sqlite3 (1.7.3-arm64-darwin)
208-
sqlite3 (1.7.3-x86_64-linux)
210+
securerandom (0.4.1)
211+
sqlite3 (2.3.1-arm64-darwin)
212+
sqlite3 (2.3.1-x86_64-linux-gnu)
209213
standard (1.31.2)
210214
language_server-protocol (~> 3.17.0.2)
211215
lint_roller (~> 1.0)
@@ -218,27 +222,31 @@ GEM
218222
standard-performance (1.2.1)
219223
lint_roller (~> 1.1)
220224
rubocop-performance (~> 1.19.1)
221-
stringio (3.0.8)
222-
thor (1.2.2)
223-
timeout (0.4.0)
225+
stringio (3.1.3)
226+
thor (1.3.2)
227+
timeout (0.4.3)
224228
tzinfo (2.0.6)
225229
concurrent-ruby (~> 1.0)
226230
unicode-display_width (2.5.0)
227-
webrick (1.8.1)
228-
websocket-driver (0.7.6)
231+
uri (1.0.2)
232+
useragent (0.16.11)
233+
websocket-driver (0.7.7)
234+
base64
229235
websocket-extensions (>= 0.1.0)
230236
websocket-extensions (0.1.5)
231-
zeitwerk (2.6.12)
237+
zeitwerk (2.7.1)
232238

233239
PLATFORMS
240+
arm64-darwin-21
234241
arm64-darwin-23
242+
arm64-darwin-24
235243
x86_64-linux
236244

237245
DEPENDENCIES
238246
climate_control
239247
mocha
240248
puma
241-
sqlite3
249+
sqlite3 (>= 2.1)
242250
standard
243251
suspenders!
244252

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ like missing deadlines.
1616

1717
## Requirements
1818

19-
- Rails `~> 7.0`
19+
- Rails `~> 8.0`
2020
- Ruby `>= 3.1`
2121
- Node `>= 20.0.0`
2222

Rakefile

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ require "bundler/gem_tasks"
33
require "minitest/test_task"
44
require "standard/rake"
55

6+
require File.expand_path("test/dummy/config/application", __dir__)
7+
8+
Rails.application.load_tasks
9+
610
Minitest::TestTask.create(:test) do |t|
711
t.libs << "test"
812
t.libs << "lib"

lib/suspenders/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Suspenders
22
VERSION = "20240516.0".freeze
3-
RAILS_VERSION = "~> 7.0".freeze
3+
RAILS_VERSION = "~> 8.0".freeze
44
MINIMUM_RUBY_VERSION = ">= 3.1".freeze
55
MINIMUM_NODE_VERSION = "20.0.0".freeze
66
end

test/dummy/bin/dev

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env ruby
2+
exec "./bin/rails", "server", *ARGV

test/dummy/bin/rubocop

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env ruby
2+
require "rubygems"
3+
require "bundler/setup"
4+
5+
# explicit rubocop config increases performance slightly while avoiding config confusion.
6+
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
7+
8+
load Gem.bin_path("rubocop", "rubocop")

0 commit comments

Comments
 (0)