Skip to content

Commit 93cbeee

Browse files
Support Rack v3 (#181)
* use rack version or release * to_s body and headers sometimes they come back as array. * Lowercase headers and rack v3 no longer includes a body on redirects * require Rack v3 or greater * version 6.0.0
1 parent 8691e2a commit 93cbeee

21 files changed

+637
-155
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
See this http://keepachangelog.com link for information on how we want this documented formatted.
44

5+
## v6.0.0
6+
7+
### Changed
8+
9+
- ⚠️ Breaking Changes ⚠️
10+
- Remove Rack v2 support.
11+
- Added Rack v3 support.
12+
513
## v5.2.1
614

715
- Rack 3.X compatibility, by removing uninitialized constants.

Gemfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ source "https://rubygems.org"
22
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
33
gemspec
44

5-
gem 'rails'
5+
gem 'rails', '7.1.3.4'
6+
gem 'mocha', '~> 2.4'
7+
gem 'rack', "~> 3.1", ">= 3.1.7"
68

79
group :test do
810
gem 'lambdakiq'

Gemfile.lock

+140-106
Original file line numberDiff line numberDiff line change
@@ -3,183 +3,216 @@ PATH
33
specs:
44
lamby (5.2.1)
55
lambda-console-ruby
6-
rack
6+
rack (>= 3.0.0)
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
actioncable (7.0.4.3)
12-
actionpack (= 7.0.4.3)
13-
activesupport (= 7.0.4.3)
11+
actioncable (7.1.3.4)
12+
actionpack (= 7.1.3.4)
13+
activesupport (= 7.1.3.4)
1414
nio4r (~> 2.0)
1515
websocket-driver (>= 0.6.1)
16-
actionmailbox (7.0.4.3)
17-
actionpack (= 7.0.4.3)
18-
activejob (= 7.0.4.3)
19-
activerecord (= 7.0.4.3)
20-
activestorage (= 7.0.4.3)
21-
activesupport (= 7.0.4.3)
16+
zeitwerk (~> 2.6)
17+
actionmailbox (7.1.3.4)
18+
actionpack (= 7.1.3.4)
19+
activejob (= 7.1.3.4)
20+
activerecord (= 7.1.3.4)
21+
activestorage (= 7.1.3.4)
22+
activesupport (= 7.1.3.4)
2223
mail (>= 2.7.1)
2324
net-imap
2425
net-pop
2526
net-smtp
26-
actionmailer (7.0.4.3)
27-
actionpack (= 7.0.4.3)
28-
actionview (= 7.0.4.3)
29-
activejob (= 7.0.4.3)
30-
activesupport (= 7.0.4.3)
27+
actionmailer (7.1.3.4)
28+
actionpack (= 7.1.3.4)
29+
actionview (= 7.1.3.4)
30+
activejob (= 7.1.3.4)
31+
activesupport (= 7.1.3.4)
3132
mail (~> 2.5, >= 2.5.4)
3233
net-imap
3334
net-pop
3435
net-smtp
35-
rails-dom-testing (~> 2.0)
36-
actionpack (7.0.4.3)
37-
actionview (= 7.0.4.3)
38-
activesupport (= 7.0.4.3)
39-
rack (~> 2.0, >= 2.2.0)
36+
rails-dom-testing (~> 2.2)
37+
actionpack (7.1.3.4)
38+
actionview (= 7.1.3.4)
39+
activesupport (= 7.1.3.4)
40+
nokogiri (>= 1.8.5)
41+
racc
42+
rack (>= 2.2.4)
43+
rack-session (>= 1.0.1)
4044
rack-test (>= 0.6.3)
41-
rails-dom-testing (~> 2.0)
42-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
43-
actiontext (7.0.4.3)
44-
actionpack (= 7.0.4.3)
45-
activerecord (= 7.0.4.3)
46-
activestorage (= 7.0.4.3)
47-
activesupport (= 7.0.4.3)
45+
rails-dom-testing (~> 2.2)
46+
rails-html-sanitizer (~> 1.6)
47+
actiontext (7.1.3.4)
48+
actionpack (= 7.1.3.4)
49+
activerecord (= 7.1.3.4)
50+
activestorage (= 7.1.3.4)
51+
activesupport (= 7.1.3.4)
4852
globalid (>= 0.6.0)
4953
nokogiri (>= 1.8.5)
50-
actionview (7.0.4.3)
51-
activesupport (= 7.0.4.3)
54+
actionview (7.1.3.4)
55+
activesupport (= 7.1.3.4)
5256
builder (~> 3.1)
53-
erubi (~> 1.4)
54-
rails-dom-testing (~> 2.0)
55-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
56-
activejob (7.0.4.3)
57-
activesupport (= 7.0.4.3)
57+
erubi (~> 1.11)
58+
rails-dom-testing (~> 2.2)
59+
rails-html-sanitizer (~> 1.6)
60+
activejob (7.1.3.4)
61+
activesupport (= 7.1.3.4)
5862
globalid (>= 0.3.6)
59-
activemodel (7.0.4.3)
60-
activesupport (= 7.0.4.3)
61-
activerecord (7.0.4.3)
62-
activemodel (= 7.0.4.3)
63-
activesupport (= 7.0.4.3)
64-
activestorage (7.0.4.3)
65-
actionpack (= 7.0.4.3)
66-
activejob (= 7.0.4.3)
67-
activerecord (= 7.0.4.3)
68-
activesupport (= 7.0.4.3)
63+
activemodel (7.1.3.4)
64+
activesupport (= 7.1.3.4)
65+
activerecord (7.1.3.4)
66+
activemodel (= 7.1.3.4)
67+
activesupport (= 7.1.3.4)
68+
timeout (>= 0.4.0)
69+
activestorage (7.1.3.4)
70+
actionpack (= 7.1.3.4)
71+
activejob (= 7.1.3.4)
72+
activerecord (= 7.1.3.4)
73+
activesupport (= 7.1.3.4)
6974
marcel (~> 1.0)
70-
mini_mime (>= 1.1.0)
71-
activesupport (7.0.4.3)
75+
activesupport (7.1.3.4)
76+
base64
77+
bigdecimal
7278
concurrent-ruby (~> 1.0, >= 1.0.2)
79+
connection_pool (>= 2.2.5)
80+
drb
7381
i18n (>= 1.6, < 2)
7482
minitest (>= 5.1)
83+
mutex_m
7584
tzinfo (~> 2.0)
76-
aws-eventstream (1.2.0)
77-
aws-partitions (1.752.0)
78-
aws-sdk-core (3.171.0)
79-
aws-eventstream (~> 1, >= 1.0.2)
85+
aws-eventstream (1.3.0)
86+
aws-partitions (1.956.0)
87+
aws-sdk-core (3.201.1)
88+
aws-eventstream (~> 1, >= 1.3.0)
8089
aws-partitions (~> 1, >= 1.651.0)
81-
aws-sigv4 (~> 1.5)
90+
aws-sigv4 (~> 1.8)
8291
jmespath (~> 1, >= 1.6.1)
83-
aws-sdk-sqs (1.53.0)
84-
aws-sdk-core (~> 3, >= 3.165.0)
85-
aws-sigv4 (~> 1.1)
92+
aws-sdk-sqs (1.80.0)
93+
aws-sdk-core (~> 3, >= 3.201.0)
94+
aws-sigv4 (~> 1.5)
8695
aws-sdk-ssm (1.150.0)
8796
aws-sdk-core (~> 3, >= 3.165.0)
8897
aws-sigv4 (~> 1.1)
89-
aws-sigv4 (1.5.2)
98+
aws-sigv4 (1.8.0)
9099
aws-eventstream (~> 1, >= 1.0.2)
91-
builder (3.2.4)
100+
base64 (0.2.0)
101+
bigdecimal (3.1.8)
102+
builder (3.3.0)
92103
coderay (1.1.3)
93-
concurrent-ruby (1.2.2)
104+
concurrent-ruby (1.3.3)
105+
connection_pool (2.4.1)
94106
crass (1.0.6)
95-
date (3.3.3)
96-
erubi (1.12.0)
97-
globalid (1.1.0)
98-
activesupport (>= 5.0)
99-
i18n (1.12.0)
107+
date (3.3.4)
108+
drb (2.2.1)
109+
erubi (1.13.0)
110+
globalid (1.2.1)
111+
activesupport (>= 6.1)
112+
i18n (1.14.5)
100113
concurrent-ruby (~> 1.0)
114+
io-console (0.7.2)
115+
irb (1.14.0)
116+
rdoc (>= 4.0.0)
117+
reline (>= 0.4.2)
101118
jmespath (1.6.2)
102119
lambda-console-ruby (1.0.0)
103120
lambdakiq (2.2.0)
104121
activejob
105122
aws-sdk-sqs
106123
concurrent-ruby
107124
railties
108-
loofah (2.20.0)
125+
loofah (2.22.0)
109126
crass (~> 1.0.2)
110-
nokogiri (>= 1.5.9)
127+
nokogiri (>= 1.12.0)
111128
mail (2.8.1)
112129
mini_mime (>= 0.1.1)
113130
net-imap
114131
net-pop
115132
net-smtp
116-
marcel (1.0.2)
133+
marcel (1.0.4)
117134
method_source (1.0.0)
118-
mini_mime (1.1.2)
119-
minitest (5.18.0)
135+
mini_mime (1.1.5)
136+
minitest (5.24.1)
120137
minitest-focus (1.3.1)
121138
minitest (>= 4, < 6)
122-
mocha (2.0.2)
139+
mocha (2.4.0)
123140
ruby2_keywords (>= 0.0.5)
124-
net-imap (0.3.4)
141+
mutex_m (0.2.0)
142+
net-imap (0.4.14)
125143
date
126144
net-protocol
127145
net-pop (0.1.2)
128146
net-protocol
129-
net-protocol (0.2.1)
147+
net-protocol (0.2.2)
130148
timeout
131-
net-smtp (0.3.3)
149+
net-smtp (0.5.0)
132150
net-protocol
133-
nio4r (2.5.9)
134-
nokogiri (1.14.3-aarch64-linux)
151+
nio4r (2.7.3)
152+
nokogiri (1.16.6-aarch64-linux)
135153
racc (~> 1.4)
136-
nokogiri (1.14.3-arm64-darwin)
154+
nokogiri (1.16.6-arm64-darwin)
137155
racc (~> 1.4)
138156
pry (0.14.2)
139157
coderay (~> 1.1)
140158
method_source (~> 1.0)
141-
racc (1.6.2)
142-
rack (2.2.6.4)
159+
psych (5.1.2)
160+
stringio
161+
racc (1.8.0)
162+
rack (3.1.7)
163+
rack-session (2.0.0)
164+
rack (>= 3.0.0)
143165
rack-test (2.1.0)
144166
rack (>= 1.3)
145-
rails (7.0.4.3)
146-
actioncable (= 7.0.4.3)
147-
actionmailbox (= 7.0.4.3)
148-
actionmailer (= 7.0.4.3)
149-
actionpack (= 7.0.4.3)
150-
actiontext (= 7.0.4.3)
151-
actionview (= 7.0.4.3)
152-
activejob (= 7.0.4.3)
153-
activemodel (= 7.0.4.3)
154-
activerecord (= 7.0.4.3)
155-
activestorage (= 7.0.4.3)
156-
activesupport (= 7.0.4.3)
167+
rackup (2.1.0)
168+
rack (>= 3)
169+
webrick (~> 1.8)
170+
rails (7.1.3.4)
171+
actioncable (= 7.1.3.4)
172+
actionmailbox (= 7.1.3.4)
173+
actionmailer (= 7.1.3.4)
174+
actionpack (= 7.1.3.4)
175+
actiontext (= 7.1.3.4)
176+
actionview (= 7.1.3.4)
177+
activejob (= 7.1.3.4)
178+
activemodel (= 7.1.3.4)
179+
activerecord (= 7.1.3.4)
180+
activestorage (= 7.1.3.4)
181+
activesupport (= 7.1.3.4)
157182
bundler (>= 1.15.0)
158-
railties (= 7.0.4.3)
159-
rails-dom-testing (2.0.3)
160-
activesupport (>= 4.2.0)
183+
railties (= 7.1.3.4)
184+
rails-dom-testing (2.2.0)
185+
activesupport (>= 5.0.0)
186+
minitest
161187
nokogiri (>= 1.6)
162-
rails-html-sanitizer (1.5.0)
163-
loofah (~> 2.19, >= 2.19.1)
164-
railties (7.0.4.3)
165-
actionpack (= 7.0.4.3)
166-
activesupport (= 7.0.4.3)
167-
method_source
188+
rails-html-sanitizer (1.6.0)
189+
loofah (~> 2.21)
190+
nokogiri (~> 1.14)
191+
railties (7.1.3.4)
192+
actionpack (= 7.1.3.4)
193+
activesupport (= 7.1.3.4)
194+
irb
195+
rackup (>= 1.0.0)
168196
rake (>= 12.2)
169-
thor (~> 1.0)
170-
zeitwerk (~> 2.5)
171-
rake (13.0.6)
197+
thor (~> 1.0, >= 1.2.2)
198+
zeitwerk (~> 2.6)
199+
rake (13.2.1)
200+
rdoc (6.7.0)
201+
psych (>= 4.0.0)
202+
reline (0.5.9)
203+
io-console (~> 0.5)
172204
ruby2_keywords (0.0.5)
173-
thor (1.2.1)
205+
stringio (3.1.1)
206+
thor (1.3.1)
174207
timecop (0.9.6)
175-
timeout (0.3.2)
208+
timeout (0.4.1)
176209
tzinfo (2.0.6)
177210
concurrent-ruby (~> 1.0)
178211
webrick (1.8.1)
179-
websocket-driver (0.7.5)
212+
websocket-driver (0.7.6)
180213
websocket-extensions (>= 0.1.0)
181214
websocket-extensions (0.1.5)
182-
zeitwerk (2.6.7)
215+
zeitwerk (2.6.16)
183216

184217
PLATFORMS
185218
aarch64-linux
@@ -194,9 +227,10 @@ DEPENDENCIES
194227
lamby!
195228
minitest
196229
minitest-focus
197-
mocha
230+
mocha (~> 2.4)
198231
pry
199-
rails
232+
rack (~> 3.1, >= 3.1.7)
233+
rails (= 7.1.3.4)
200234
rake
201235
timecop
202236
webrick

bin/setup

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ set -e
33

44
echo '== Installing dependencies =='
55
bundle config set --local path 'vendor/bundle'
6-
bundle install
6+
bundle install

bin/test

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ export RAILS_ENV="test"
55

66
bundle exec rake test
77
LAMBY_TEST_DYNAMIC_HANDLER=1 bundle exec rake test
8-
LAMBY_RACK_DEFLATE_ENABLED=1 bundle exec rake test_deflate
8+
LAMBY_RACK_DEFLATE_ENABLED=1 bundle exec rake test_deflate

lamby.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
1818
spec.bindir = "exe"
1919
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2020
spec.require_paths = ["lib"]
21-
spec.add_dependency 'rack'
21+
spec.add_dependency 'rack', '>= 3.0.0'
2222
spec.add_dependency 'lambda-console-ruby'
2323
spec.add_development_dependency 'aws-sdk-ssm'
2424
spec.add_development_dependency 'bundler'

0 commit comments

Comments
 (0)