Skip to content

Commit ae9a1c4

Browse files
Added support for Puma v7+
1 parent 421533e commit ae9a1c4

36 files changed

+1388
-341
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ jobs:
4545
ruby-version: ${{ matrix.ruby }}
4646
bundler-cache: true
4747
- name: Run the default task
48-
run: bundle exec rake
48+
run: bundle exec appraisal rake

Appraisals

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Significance: Puma < v6.5 does not have on_stopped.
2+
appraise "puma-6-latest" do
3+
gem "puma", ">= 6", "< 6.5.0"
4+
end
5+
6+
# Significance: Puma v6.5 added on_stopped.
7+
appraise "puma-6.5-latest" do
8+
gem "puma", ">= 6.5", "< 7.0.0"
9+
end
10+
11+
# Significance: Puma v7 renamed all hooks.
12+
appraise "puma-7-latest" do
13+
gem "puma", ">= 7", "< 8.0.0"
14+
end

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ source "https://rubygems.org"
55
# Specify your gem's dependencies in rails-nginx.gemspec
66
gemspec
77

8+
gem "appraisal"
89
gem "debug"
910
gem "rake"
1011
gem "rspec"

Gemfile.lock

Lines changed: 101 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -9,121 +9,126 @@ PATH
99
GEM
1010
remote: https://rubygems.org/
1111
specs:
12-
actioncable (8.0.2)
13-
actionpack (= 8.0.2)
14-
activesupport (= 8.0.2)
12+
action_text-trix (2.1.15)
13+
railties
14+
actioncable (8.1.0)
15+
actionpack (= 8.1.0)
16+
activesupport (= 8.1.0)
1517
nio4r (~> 2.0)
1618
websocket-driver (>= 0.6.1)
1719
zeitwerk (~> 2.6)
18-
actionmailbox (8.0.2)
19-
actionpack (= 8.0.2)
20-
activejob (= 8.0.2)
21-
activerecord (= 8.0.2)
22-
activestorage (= 8.0.2)
23-
activesupport (= 8.0.2)
20+
actionmailbox (8.1.0)
21+
actionpack (= 8.1.0)
22+
activejob (= 8.1.0)
23+
activerecord (= 8.1.0)
24+
activestorage (= 8.1.0)
25+
activesupport (= 8.1.0)
2426
mail (>= 2.8.0)
25-
actionmailer (8.0.2)
26-
actionpack (= 8.0.2)
27-
actionview (= 8.0.2)
28-
activejob (= 8.0.2)
29-
activesupport (= 8.0.2)
27+
actionmailer (8.1.0)
28+
actionpack (= 8.1.0)
29+
actionview (= 8.1.0)
30+
activejob (= 8.1.0)
31+
activesupport (= 8.1.0)
3032
mail (>= 2.8.0)
3133
rails-dom-testing (~> 2.2)
32-
actionpack (8.0.2)
33-
actionview (= 8.0.2)
34-
activesupport (= 8.0.2)
34+
actionpack (8.1.0)
35+
actionview (= 8.1.0)
36+
activesupport (= 8.1.0)
3537
nokogiri (>= 1.8.5)
3638
rack (>= 2.2.4)
3739
rack-session (>= 1.0.1)
3840
rack-test (>= 0.6.3)
3941
rails-dom-testing (~> 2.2)
4042
rails-html-sanitizer (~> 1.6)
4143
useragent (~> 0.16)
42-
actiontext (8.0.2)
43-
actionpack (= 8.0.2)
44-
activerecord (= 8.0.2)
45-
activestorage (= 8.0.2)
46-
activesupport (= 8.0.2)
44+
actiontext (8.1.0)
45+
action_text-trix (~> 2.1.15)
46+
actionpack (= 8.1.0)
47+
activerecord (= 8.1.0)
48+
activestorage (= 8.1.0)
49+
activesupport (= 8.1.0)
4750
globalid (>= 0.6.0)
4851
nokogiri (>= 1.8.5)
49-
actionview (8.0.2)
50-
activesupport (= 8.0.2)
52+
actionview (8.1.0)
53+
activesupport (= 8.1.0)
5154
builder (~> 3.1)
5255
erubi (~> 1.11)
5356
rails-dom-testing (~> 2.2)
5457
rails-html-sanitizer (~> 1.6)
55-
activejob (8.0.2)
56-
activesupport (= 8.0.2)
58+
activejob (8.1.0)
59+
activesupport (= 8.1.0)
5760
globalid (>= 0.3.6)
58-
activemodel (8.0.2)
59-
activesupport (= 8.0.2)
60-
activerecord (8.0.2)
61-
activemodel (= 8.0.2)
62-
activesupport (= 8.0.2)
61+
activemodel (8.1.0)
62+
activesupport (= 8.1.0)
63+
activerecord (8.1.0)
64+
activemodel (= 8.1.0)
65+
activesupport (= 8.1.0)
6366
timeout (>= 0.4.0)
64-
activestorage (8.0.2)
65-
actionpack (= 8.0.2)
66-
activejob (= 8.0.2)
67-
activerecord (= 8.0.2)
68-
activesupport (= 8.0.2)
67+
activestorage (8.1.0)
68+
actionpack (= 8.1.0)
69+
activejob (= 8.1.0)
70+
activerecord (= 8.1.0)
71+
activesupport (= 8.1.0)
6972
marcel (~> 1.0)
70-
activesupport (8.0.2)
73+
activesupport (8.1.0)
7174
base64
72-
benchmark (>= 0.3)
7375
bigdecimal
7476
concurrent-ruby (~> 1.0, >= 1.3.1)
7577
connection_pool (>= 2.2.5)
7678
drb
7779
i18n (>= 1.6, < 2)
80+
json
7881
logger (>= 1.4.2)
7982
minitest (>= 5.1)
8083
securerandom (>= 0.3)
8184
tzinfo (~> 2.0, >= 2.0.5)
8285
uri (>= 0.13.1)
86+
appraisal (2.5.0)
87+
bundler
88+
rake
89+
thor (>= 0.14.0)
8390
ast (2.4.3)
84-
base64 (0.2.0)
85-
benchmark (0.4.0)
86-
bigdecimal (3.1.9)
91+
base64 (0.3.0)
92+
bigdecimal (3.3.1)
8793
builder (3.3.0)
88-
cgi (0.4.2)
8994
concurrent-ruby (1.3.5)
90-
connection_pool (2.5.0)
95+
connection_pool (2.5.4)
9196
crass (1.0.6)
9297
date (3.4.1)
9398
debug (1.10.0)
9499
irb (~> 1.10)
95100
reline (>= 0.3.8)
96101
diff-lcs (1.6.1)
97-
drb (2.2.1)
98-
erb (4.0.4)
99-
cgi (>= 0.3.3)
102+
drb (2.2.3)
103+
erb (5.1.1)
100104
erubi (1.13.1)
101-
globalid (1.2.1)
105+
globalid (1.3.0)
102106
activesupport (>= 6.1)
103107
i18n (1.14.7)
104108
concurrent-ruby (~> 1.0)
105-
io-console (0.8.0)
109+
io-console (0.8.1)
106110
irb (1.15.2)
107111
pp (>= 0.6.0)
108112
rdoc (>= 4.0.0)
109113
reline (>= 0.4.2)
110-
json (2.10.2)
114+
json (2.15.2)
111115
language_server-protocol (3.17.0.4)
112116
lint_roller (1.1.0)
113117
logger (1.7.0)
114-
loofah (2.24.0)
118+
loofah (2.24.1)
115119
crass (~> 1.0.2)
116120
nokogiri (>= 1.12.0)
117-
mail (2.8.1)
121+
mail (2.9.0)
122+
logger
118123
mini_mime (>= 0.1.1)
119124
net-imap
120125
net-pop
121126
net-smtp
122-
marcel (1.0.4)
127+
marcel (1.1.0)
123128
mini_mime (1.1.5)
124-
mini_portile2 (2.8.8)
125-
minitest (5.25.5)
126-
net-imap (0.5.6)
129+
mini_portile2 (2.8.9)
130+
minitest (5.26.0)
131+
net-imap (0.5.12)
127132
date
128133
net-protocol
129134
net-pop (0.1.2)
@@ -133,78 +138,81 @@ GEM
133138
net-smtp (0.5.1)
134139
net-protocol
135140
nio4r (2.7.4)
136-
nokogiri (1.18.7)
141+
nokogiri (1.18.10)
137142
mini_portile2 (~> 2.8.2)
138143
racc (~> 1.4)
139-
nokogiri (1.18.7-aarch64-linux-gnu)
144+
nokogiri (1.18.10-aarch64-linux-gnu)
140145
racc (~> 1.4)
141-
nokogiri (1.18.7-arm-linux-gnu)
146+
nokogiri (1.18.10-arm-linux-gnu)
142147
racc (~> 1.4)
143-
nokogiri (1.18.7-arm64-darwin)
148+
nokogiri (1.18.10-arm64-darwin)
144149
racc (~> 1.4)
145-
nokogiri (1.18.7-x86_64-darwin)
150+
nokogiri (1.18.10-x86_64-darwin)
146151
racc (~> 1.4)
147-
nokogiri (1.18.7-x86_64-linux-gnu)
152+
nokogiri (1.18.10-x86_64-linux-gnu)
148153
racc (~> 1.4)
149154
parallel (1.26.3)
150155
parser (3.3.7.4)
151156
ast (~> 2.4.1)
152157
racc
153158
pastel (0.8.0)
154159
tty-color (~> 0.5)
155-
pp (0.6.2)
160+
pp (0.6.3)
156161
prettyprint
157162
prettyprint (0.2.0)
158163
prism (1.4.0)
159-
psych (5.2.3)
164+
psych (5.2.6)
160165
date
161166
stringio
162-
puma (6.6.0)
167+
puma (7.1.0)
163168
nio4r (~> 2.0)
164169
racc (1.8.1)
165-
rack (3.1.12)
166-
rack-session (2.1.0)
170+
rack (3.2.3)
171+
rack-session (2.1.1)
167172
base64 (>= 0.1.0)
168173
rack (>= 3.0.0)
169174
rack-test (2.2.0)
170175
rack (>= 1.3)
171176
rackup (2.2.1)
172177
rack (>= 3)
173-
rails (8.0.2)
174-
actioncable (= 8.0.2)
175-
actionmailbox (= 8.0.2)
176-
actionmailer (= 8.0.2)
177-
actionpack (= 8.0.2)
178-
actiontext (= 8.0.2)
179-
actionview (= 8.0.2)
180-
activejob (= 8.0.2)
181-
activemodel (= 8.0.2)
182-
activerecord (= 8.0.2)
183-
activestorage (= 8.0.2)
184-
activesupport (= 8.0.2)
178+
rails (8.1.0)
179+
actioncable (= 8.1.0)
180+
actionmailbox (= 8.1.0)
181+
actionmailer (= 8.1.0)
182+
actionpack (= 8.1.0)
183+
actiontext (= 8.1.0)
184+
actionview (= 8.1.0)
185+
activejob (= 8.1.0)
186+
activemodel (= 8.1.0)
187+
activerecord (= 8.1.0)
188+
activestorage (= 8.1.0)
189+
activesupport (= 8.1.0)
185190
bundler (>= 1.15.0)
186-
railties (= 8.0.2)
187-
rails-dom-testing (2.2.0)
191+
railties (= 8.1.0)
192+
rails-dom-testing (2.3.0)
188193
activesupport (>= 5.0.0)
189194
minitest
190195
nokogiri (>= 1.6)
191196
rails-html-sanitizer (1.6.2)
192197
loofah (~> 2.21)
193198
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)
194-
railties (8.0.2)
195-
actionpack (= 8.0.2)
196-
activesupport (= 8.0.2)
199+
railties (8.1.0)
200+
actionpack (= 8.1.0)
201+
activesupport (= 8.1.0)
197202
irb (~> 1.13)
198203
rackup (>= 1.0.0)
199204
rake (>= 12.2)
200205
thor (~> 1.0, >= 1.2.2)
206+
tsort (>= 0.2)
201207
zeitwerk (~> 2.6)
202208
rainbow (3.1.1)
203-
rake (13.2.1)
204-
rdoc (6.13.1)
209+
rake (13.3.0)
210+
rdoc (6.15.0)
211+
erb
205212
psych (>= 4.0.0)
213+
tsort
206214
regexp_parser (2.10.0)
207-
reline (0.6.1)
215+
reline (0.6.2)
208216
io-console (~> 0.5)
209217
rspec (3.13.0)
210218
rspec-core (~> 3.13.0)
@@ -255,9 +263,10 @@ GEM
255263
standard-performance (1.8.0)
256264
lint_roller (~> 1.1)
257265
rubocop-performance (~> 1.25.0)
258-
stringio (3.1.6)
259-
thor (1.3.2)
266+
stringio (3.1.7)
267+
thor (1.4.0)
260268
timeout (0.4.3)
269+
tsort (0.2.0)
261270
tty-color (0.6.0)
262271
tty-command (0.10.1)
263272
pastel (~> 0.8)
@@ -266,13 +275,13 @@ GEM
266275
unicode-display_width (3.1.4)
267276
unicode-emoji (~> 4.0, >= 4.0.4)
268277
unicode-emoji (4.0.4)
269-
uri (1.0.3)
278+
uri (1.0.4)
270279
useragent (0.16.11)
271-
websocket-driver (0.7.7)
280+
websocket-driver (0.8.0)
272281
base64
273282
websocket-extensions (>= 0.1.0)
274283
websocket-extensions (0.1.5)
275-
zeitwerk (2.7.2)
284+
zeitwerk (2.7.3)
276285

277286
PLATFORMS
278287
aarch64-linux
@@ -283,6 +292,7 @@ PLATFORMS
283292
x86_64-linux
284293

285294
DEPENDENCIES
295+
appraisal
286296
debug
287297
rails-nginx!
288298
rake

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,13 @@ Run the Standard Ruby linter, and RSpec test suite.
180180
bundle exec rake
181181
```
182182

183+
**OR**
184+
185+
Run the rake task through [Appraisal](https://github.com/thoughtbot/appraisal) to test against many Puma versions.
186+
```
187+
bundle exec appraisal rake
188+
```
189+
183190
#### Generating a new Dummy server
184191

185192
There's a built-in executable if you'd like to generate a new Dummy server to upgrade the regression tests to work with the latest version of Rails.

bin/dummy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bundle install
1818

1919
# We need Puma 6.50 for the new on_stopped hook.
2020
bundle remove puma
21-
bundle add puma --version ">= 6.5.0"
21+
bundle add puma --version ">= 7.1.0"
2222

2323
# Configure Puma with rails-nginx
2424
cat >> ./config/puma.rb << EOF

gemfiles/puma_6.5_latest.gemfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal"
6+
gem "debug"
7+
gem "rake"
8+
gem "rspec"
9+
gem "standard"
10+
gem "puma", ">= 6.5", "< 7.0.0"
11+
12+
gemspec path: "../"

0 commit comments

Comments
 (0)