lamby 5.2.2 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +26 -0
- data/CHANGELOG.md +10 -2
- data/Gemfile +3 -1
- data/Gemfile.lock +144 -107
- data/bin/setup +1 -1
- data/bin/test +1 -1
- data/lamby.gemspec +1 -1
- data/lib/lamby/handler.rb +14 -5
- data/lib/lamby/rack_alb.rb +2 -1
- data/lib/lamby/rack_http.rb +2 -1
- data/lib/lamby/rack_rest.rb +2 -1
- data/lib/lamby/version.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caf85fda1bf5e3fb1aa80fde0e0cb3f0f9398306c7a12a51cc92406fe8ccd29b
|
4
|
+
data.tar.gz: 973d7a675fdc6d9d4373a5122dd86a756d3ed2396c325d96c65cf281c410f9a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abde3cc0dbd4dcc7fa2465e468e3e4840923fae6b1addd7f2b84b55922db0e10eeb4ecab4fac965ea9fc110ceb73069f2242e67e200f3c40a6af74d0f4c26bd7
|
7
|
+
data.tar.gz: 26b40c2aca0f9b993a414e1791b71b1f037a3f3c2bdc41303fffb0bf401ed87502022d9cf4d90568f58d46cbebea3e6d31c2f51ad5bb6a391725d5f0be45439d
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: Release Gem
|
2
|
+
on:
|
3
|
+
workflow_dispatch:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
push:
|
9
|
+
name: Push gem to RubyGems.org
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
permissions:
|
13
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
14
|
+
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
|
15
|
+
|
16
|
+
steps:
|
17
|
+
# Set up
|
18
|
+
- uses: actions/checkout@v4
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
bundler-cache: true
|
23
|
+
ruby-version: ruby
|
24
|
+
|
25
|
+
# Release
|
26
|
+
- uses: rubygems/release-gem@v1
|
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,17 @@
|
|
2
2
|
|
3
3
|
See this http://keepachangelog.com link for information on how we want this documented formatted.
|
4
4
|
|
5
|
-
##
|
5
|
+
## v6.0.0
|
6
6
|
|
7
|
-
-
|
7
|
+
- Remove "cookies" header from rack response to conform to Lambda proxy integration requirements.
|
8
|
+
|
9
|
+
## v6.0.0
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- ⚠️ Breaking Changes ⚠️
|
14
|
+
- Remove Rack v2 support.
|
15
|
+
- Added Rack v3 support.
|
8
16
|
|
9
17
|
## v5.2.1
|
10
18
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,103 +1,120 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lamby (
|
4
|
+
lamby (6.0.1)
|
5
5
|
lambda-console-ruby
|
6
|
-
rack (
|
6
|
+
rack (>= 3.0.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (7.
|
12
|
-
actionpack (= 7.
|
13
|
-
activesupport (= 7.
|
11
|
+
actioncable (7.1.3.4)
|
12
|
+
actionpack (= 7.1.3.4)
|
13
|
+
activesupport (= 7.1.3.4)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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)
|
22
23
|
mail (>= 2.7.1)
|
23
24
|
net-imap
|
24
25
|
net-pop
|
25
26
|
net-smtp
|
26
|
-
actionmailer (7.
|
27
|
-
actionpack (= 7.
|
28
|
-
actionview (= 7.
|
29
|
-
activejob (= 7.
|
30
|
-
activesupport (= 7.
|
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)
|
31
32
|
mail (~> 2.5, >= 2.5.4)
|
32
33
|
net-imap
|
33
34
|
net-pop
|
34
35
|
net-smtp
|
35
|
-
rails-dom-testing (~> 2.
|
36
|
-
actionpack (7.
|
37
|
-
actionview (= 7.
|
38
|
-
activesupport (= 7.
|
39
|
-
|
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)
|
40
44
|
rack-test (>= 0.6.3)
|
41
|
-
rails-dom-testing (~> 2.
|
42
|
-
rails-html-sanitizer (~> 1.
|
43
|
-
actiontext (7.
|
44
|
-
actionpack (= 7.
|
45
|
-
activerecord (= 7.
|
46
|
-
activestorage (= 7.
|
47
|
-
activesupport (= 7.
|
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)
|
48
52
|
globalid (>= 0.6.0)
|
49
53
|
nokogiri (>= 1.8.5)
|
50
|
-
actionview (7.
|
51
|
-
activesupport (= 7.
|
54
|
+
actionview (7.1.3.4)
|
55
|
+
activesupport (= 7.1.3.4)
|
52
56
|
builder (~> 3.1)
|
53
|
-
erubi (~> 1.
|
54
|
-
rails-dom-testing (~> 2.
|
55
|
-
rails-html-sanitizer (~> 1.
|
56
|
-
activejob (7.
|
57
|
-
activesupport (= 7.
|
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)
|
58
62
|
globalid (>= 0.3.6)
|
59
|
-
activemodel (7.
|
60
|
-
activesupport (= 7.
|
61
|
-
activerecord (7.
|
62
|
-
activemodel (= 7.
|
63
|
-
activesupport (= 7.
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
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)
|
69
74
|
marcel (~> 1.0)
|
70
|
-
|
71
|
-
|
75
|
+
activesupport (7.1.3.4)
|
76
|
+
base64
|
77
|
+
bigdecimal
|
72
78
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
79
|
+
connection_pool (>= 2.2.5)
|
80
|
+
drb
|
73
81
|
i18n (>= 1.6, < 2)
|
74
82
|
minitest (>= 5.1)
|
83
|
+
mutex_m
|
75
84
|
tzinfo (~> 2.0)
|
76
|
-
aws-eventstream (1.
|
77
|
-
aws-partitions (1.
|
78
|
-
aws-sdk-core (3.
|
79
|
-
aws-eventstream (~> 1, >= 1.0
|
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)
|
80
89
|
aws-partitions (~> 1, >= 1.651.0)
|
81
|
-
aws-sigv4 (~> 1.
|
90
|
+
aws-sigv4 (~> 1.8)
|
82
91
|
jmespath (~> 1, >= 1.6.1)
|
83
|
-
aws-sdk-sqs (1.
|
84
|
-
aws-sdk-core (~> 3, >= 3.
|
85
|
-
aws-sigv4 (~> 1.
|
92
|
+
aws-sdk-sqs (1.80.0)
|
93
|
+
aws-sdk-core (~> 3, >= 3.201.0)
|
94
|
+
aws-sigv4 (~> 1.5)
|
86
95
|
aws-sdk-ssm (1.150.0)
|
87
96
|
aws-sdk-core (~> 3, >= 3.165.0)
|
88
97
|
aws-sigv4 (~> 1.1)
|
89
|
-
aws-sigv4 (1.
|
98
|
+
aws-sigv4 (1.8.0)
|
90
99
|
aws-eventstream (~> 1, >= 1.0.2)
|
91
|
-
|
100
|
+
base64 (0.2.0)
|
101
|
+
bigdecimal (3.1.8)
|
102
|
+
builder (3.3.0)
|
92
103
|
coderay (1.1.3)
|
93
|
-
concurrent-ruby (1.
|
104
|
+
concurrent-ruby (1.3.3)
|
105
|
+
connection_pool (2.4.1)
|
94
106
|
crass (1.0.6)
|
95
|
-
date (3.3.
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
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)
|
100
113
|
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)
|
101
118
|
jmespath (1.6.2)
|
102
119
|
lambda-console-ruby (1.0.0)
|
103
120
|
lambdakiq (2.2.0)
|
@@ -105,87 +122,106 @@ GEM
|
|
105
122
|
aws-sdk-sqs
|
106
123
|
concurrent-ruby
|
107
124
|
railties
|
108
|
-
loofah (2.
|
125
|
+
loofah (2.22.0)
|
109
126
|
crass (~> 1.0.2)
|
110
|
-
nokogiri (>= 1.
|
127
|
+
nokogiri (>= 1.12.0)
|
111
128
|
mail (2.8.1)
|
112
129
|
mini_mime (>= 0.1.1)
|
113
130
|
net-imap
|
114
131
|
net-pop
|
115
132
|
net-smtp
|
116
|
-
marcel (1.0.
|
133
|
+
marcel (1.0.4)
|
117
134
|
method_source (1.0.0)
|
118
|
-
mini_mime (1.1.
|
119
|
-
minitest (5.
|
135
|
+
mini_mime (1.1.5)
|
136
|
+
minitest (5.24.1)
|
120
137
|
minitest-focus (1.3.1)
|
121
138
|
minitest (>= 4, < 6)
|
122
|
-
mocha (2.0
|
139
|
+
mocha (2.4.0)
|
123
140
|
ruby2_keywords (>= 0.0.5)
|
124
|
-
|
141
|
+
mutex_m (0.2.0)
|
142
|
+
net-imap (0.4.14)
|
125
143
|
date
|
126
144
|
net-protocol
|
127
145
|
net-pop (0.1.2)
|
128
146
|
net-protocol
|
129
|
-
net-protocol (0.2.
|
147
|
+
net-protocol (0.2.2)
|
130
148
|
timeout
|
131
|
-
net-smtp (0.
|
149
|
+
net-smtp (0.5.0)
|
132
150
|
net-protocol
|
133
|
-
nio4r (2.
|
134
|
-
nokogiri (1.
|
151
|
+
nio4r (2.7.3)
|
152
|
+
nokogiri (1.16.6-aarch64-linux)
|
153
|
+
racc (~> 1.4)
|
154
|
+
nokogiri (1.16.6-arm64-darwin)
|
135
155
|
racc (~> 1.4)
|
136
|
-
nokogiri (1.
|
156
|
+
nokogiri (1.16.6-x86_64-linux)
|
137
157
|
racc (~> 1.4)
|
138
158
|
pry (0.14.2)
|
139
159
|
coderay (~> 1.1)
|
140
160
|
method_source (~> 1.0)
|
141
|
-
|
142
|
-
|
161
|
+
psych (5.1.2)
|
162
|
+
stringio
|
163
|
+
racc (1.8.0)
|
164
|
+
rack (3.1.7)
|
165
|
+
rack-session (2.0.0)
|
166
|
+
rack (>= 3.0.0)
|
143
167
|
rack-test (2.1.0)
|
144
168
|
rack (>= 1.3)
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
169
|
+
rackup (2.1.0)
|
170
|
+
rack (>= 3)
|
171
|
+
webrick (~> 1.8)
|
172
|
+
rails (7.1.3.4)
|
173
|
+
actioncable (= 7.1.3.4)
|
174
|
+
actionmailbox (= 7.1.3.4)
|
175
|
+
actionmailer (= 7.1.3.4)
|
176
|
+
actionpack (= 7.1.3.4)
|
177
|
+
actiontext (= 7.1.3.4)
|
178
|
+
actionview (= 7.1.3.4)
|
179
|
+
activejob (= 7.1.3.4)
|
180
|
+
activemodel (= 7.1.3.4)
|
181
|
+
activerecord (= 7.1.3.4)
|
182
|
+
activestorage (= 7.1.3.4)
|
183
|
+
activesupport (= 7.1.3.4)
|
157
184
|
bundler (>= 1.15.0)
|
158
|
-
railties (= 7.
|
159
|
-
rails-dom-testing (2.0
|
160
|
-
activesupport (>=
|
185
|
+
railties (= 7.1.3.4)
|
186
|
+
rails-dom-testing (2.2.0)
|
187
|
+
activesupport (>= 5.0.0)
|
188
|
+
minitest
|
161
189
|
nokogiri (>= 1.6)
|
162
|
-
rails-html-sanitizer (1.
|
163
|
-
loofah (~> 2.
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
190
|
+
rails-html-sanitizer (1.6.0)
|
191
|
+
loofah (~> 2.21)
|
192
|
+
nokogiri (~> 1.14)
|
193
|
+
railties (7.1.3.4)
|
194
|
+
actionpack (= 7.1.3.4)
|
195
|
+
activesupport (= 7.1.3.4)
|
196
|
+
irb
|
197
|
+
rackup (>= 1.0.0)
|
168
198
|
rake (>= 12.2)
|
169
|
-
thor (~> 1.0)
|
170
|
-
zeitwerk (~> 2.
|
171
|
-
rake (13.
|
199
|
+
thor (~> 1.0, >= 1.2.2)
|
200
|
+
zeitwerk (~> 2.6)
|
201
|
+
rake (13.2.1)
|
202
|
+
rdoc (6.7.0)
|
203
|
+
psych (>= 4.0.0)
|
204
|
+
reline (0.5.9)
|
205
|
+
io-console (~> 0.5)
|
172
206
|
ruby2_keywords (0.0.5)
|
173
|
-
|
207
|
+
stringio (3.1.1)
|
208
|
+
thor (1.3.1)
|
174
209
|
timecop (0.9.6)
|
175
|
-
timeout (0.
|
210
|
+
timeout (0.4.1)
|
176
211
|
tzinfo (2.0.6)
|
177
212
|
concurrent-ruby (~> 1.0)
|
178
213
|
webrick (1.8.1)
|
179
|
-
websocket-driver (0.7.
|
214
|
+
websocket-driver (0.7.6)
|
180
215
|
websocket-extensions (>= 0.1.0)
|
181
216
|
websocket-extensions (0.1.5)
|
182
|
-
zeitwerk (2.6.
|
217
|
+
zeitwerk (2.6.16)
|
183
218
|
|
184
219
|
PLATFORMS
|
185
220
|
aarch64-linux
|
186
221
|
arm64-darwin-21
|
187
222
|
arm64-darwin-22
|
188
223
|
arm64-darwin-23
|
224
|
+
x86_64-linux
|
189
225
|
|
190
226
|
DEPENDENCIES
|
191
227
|
aws-sdk-ssm
|
@@ -194,9 +230,10 @@ DEPENDENCIES
|
|
194
230
|
lamby!
|
195
231
|
minitest
|
196
232
|
minitest-focus
|
197
|
-
mocha
|
233
|
+
mocha (~> 2.4)
|
198
234
|
pry
|
199
|
-
|
235
|
+
rack (~> 3.1, >= 3.1.7)
|
236
|
+
rails (= 7.1.3.4)
|
200
237
|
rake
|
201
238
|
timecop
|
202
239
|
webrick
|
data/bin/setup
CHANGED
data/bin/test
CHANGED
data/lamby.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.bindir = "exe"
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
|
-
spec.add_dependency 'rack', '
|
21
|
+
spec.add_dependency 'rack', '>= 3.0.0'
|
22
22
|
spec.add_dependency 'lambda-console-ruby'
|
23
23
|
spec.add_development_dependency 'aws-sdk-ssm'
|
24
24
|
spec.add_development_dependency 'bundler'
|
data/lib/lamby/handler.rb
CHANGED
@@ -31,14 +31,15 @@ module Lamby
|
|
31
31
|
|
32
32
|
def set_cookies
|
33
33
|
return @set_cookies if defined?(@set_cookies)
|
34
|
-
|
35
|
-
|
34
|
+
set_cookie = @headers.delete("Set-Cookie") || @headers.delete("set-cookie")
|
35
|
+
@set_cookies = if @headers && set_cookie
|
36
|
+
Array(set_cookie).flat_map { |cookie| cookie.split("\n").map(&:strip) }
|
36
37
|
end
|
37
38
|
end
|
38
39
|
|
39
40
|
def body
|
40
41
|
@rbody ||= ''.tap do |rbody|
|
41
|
-
@body.each { |part| rbody << part if part }
|
42
|
+
@body.each { |part| rbody << part.to_s if part }
|
42
43
|
@body.close if @body.respond_to? :close
|
43
44
|
end
|
44
45
|
end
|
@@ -50,6 +51,7 @@ module Lamby
|
|
50
51
|
|
51
52
|
def base64_encodeable?(hdrs = @headers)
|
52
53
|
hdrs && (
|
54
|
+
hdrs['content-transfer-encoding'] == 'binary' ||
|
53
55
|
hdrs['Content-Transfer-Encoding'] == 'binary' ||
|
54
56
|
content_encoding_compressed?(hdrs) ||
|
55
57
|
hdrs['X-Lamby-Base64'] == '1'
|
@@ -78,10 +80,17 @@ module Lamby
|
|
78
80
|
|
79
81
|
def rack_response
|
80
82
|
{ statusCode: status,
|
81
|
-
headers: headers,
|
83
|
+
headers: stringify_values!(headers),
|
82
84
|
body: body }.merge(rack.response(self))
|
83
85
|
end
|
84
86
|
|
87
|
+
def stringify_values!(headers)
|
88
|
+
headers.each do |k, v|
|
89
|
+
headers[k] = v.to_s
|
90
|
+
end
|
91
|
+
headers
|
92
|
+
end
|
93
|
+
|
85
94
|
def call_app
|
86
95
|
if Debug.on?(@event)
|
87
96
|
Debug.call @event, @context, rack.env
|
@@ -103,7 +112,7 @@ module Lamby
|
|
103
112
|
end
|
104
113
|
|
105
114
|
def content_encoding_compressed?(hdrs)
|
106
|
-
content_encoding_header = hdrs['Content-Encoding'] || ''
|
115
|
+
content_encoding_header = hdrs['Content-Encoding'] || hdrs['content-encoding'] || ''
|
107
116
|
content_encoding_header.split(', ').any? { |h| ['br', 'gzip'].include?(h) }
|
108
117
|
end
|
109
118
|
|
data/lib/lamby/rack_alb.rb
CHANGED
@@ -36,6 +36,7 @@ module Lamby
|
|
36
36
|
private
|
37
37
|
|
38
38
|
def env_base
|
39
|
+
rack_version = defined?(::Rack::VERSION) ? ::Rack::VERSION : ::Rack.release
|
39
40
|
{ ::Rack::REQUEST_METHOD => event['httpMethod'],
|
40
41
|
::Rack::SCRIPT_NAME => '',
|
41
42
|
::Rack::PATH_INFO => event['path'] || '',
|
@@ -43,7 +44,7 @@ module Lamby
|
|
43
44
|
::Rack::SERVER_NAME => headers['host'],
|
44
45
|
::Rack::SERVER_PORT => headers['x-forwarded-port'],
|
45
46
|
::Rack::SERVER_PROTOCOL => 'HTTP/1.1',
|
46
|
-
::Rack::RACK_VERSION =>
|
47
|
+
::Rack::RACK_VERSION => rack_version,
|
47
48
|
::Rack::RACK_URL_SCHEME => headers['x-forwarded-proto'],
|
48
49
|
::Rack::RACK_INPUT => StringIO.new(body || ''),
|
49
50
|
::Rack::RACK_ERRORS => $stderr,
|
data/lib/lamby/rack_http.rb
CHANGED
@@ -31,6 +31,7 @@ module Lamby
|
|
31
31
|
private
|
32
32
|
|
33
33
|
def env_base
|
34
|
+
rack_version = defined?(::Rack::VERSION) ? ::Rack::VERSION : ::Rack.release
|
34
35
|
{ ::Rack::REQUEST_METHOD => request_method,
|
35
36
|
::Rack::SCRIPT_NAME => '',
|
36
37
|
::Rack::PATH_INFO => path_info,
|
@@ -38,7 +39,7 @@ module Lamby
|
|
38
39
|
::Rack::SERVER_NAME => server_name,
|
39
40
|
::Rack::SERVER_PORT => server_port,
|
40
41
|
::Rack::SERVER_PROTOCOL => server_protocol,
|
41
|
-
::Rack::RACK_VERSION =>
|
42
|
+
::Rack::RACK_VERSION => rack_version,
|
42
43
|
::Rack::RACK_URL_SCHEME => 'https',
|
43
44
|
::Rack::RACK_INPUT => StringIO.new(body || ''),
|
44
45
|
::Rack::RACK_ERRORS => $stderr,
|
data/lib/lamby/rack_rest.rb
CHANGED
@@ -25,6 +25,7 @@ module Lamby
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def env_base
|
28
|
+
rack_version = defined?(::Rack::VERSION) ? ::Rack::VERSION : ::Rack.release
|
28
29
|
{ ::Rack::REQUEST_METHOD => event['httpMethod'],
|
29
30
|
::Rack::SCRIPT_NAME => '',
|
30
31
|
::Rack::PATH_INFO => event['path'] || '',
|
@@ -32,7 +33,7 @@ module Lamby
|
|
32
33
|
::Rack::SERVER_NAME => headers['Host'],
|
33
34
|
::Rack::SERVER_PORT => headers['X-Forwarded-Port'],
|
34
35
|
::Rack::SERVER_PROTOCOL => event.dig('requestContext', 'protocol') || 'HTTP/1.1',
|
35
|
-
::Rack::RACK_VERSION =>
|
36
|
+
::Rack::RACK_VERSION => rack_version,
|
36
37
|
::Rack::RACK_URL_SCHEME => 'https',
|
37
38
|
::Rack::RACK_INPUT => StringIO.new(body || ''),
|
38
39
|
::Rack::RACK_ERRORS => $stderr,
|
data/lib/lamby/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lamby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: lambda-console-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,6 +173,7 @@ extra_rdoc_files: []
|
|
173
173
|
files:
|
174
174
|
- ".devcontainer/Dockerfile"
|
175
175
|
- ".devcontainer/devcontainer.json"
|
176
|
+
- ".github/workflows/release.yml"
|
176
177
|
- ".github/workflows/test.yml"
|
177
178
|
- ".gitignore"
|
178
179
|
- CHANGELOG.md
|
@@ -210,7 +211,7 @@ homepage: https://github.com/rails-lambda/lamby
|
|
210
211
|
licenses:
|
211
212
|
- MIT
|
212
213
|
metadata: {}
|
213
|
-
post_install_message:
|
214
|
+
post_install_message:
|
214
215
|
rdoc_options: []
|
215
216
|
require_paths:
|
216
217
|
- lib
|
@@ -225,8 +226,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
226
|
- !ruby/object:Gem::Version
|
226
227
|
version: '0'
|
227
228
|
requirements: []
|
228
|
-
rubygems_version: 3.
|
229
|
-
signing_key:
|
229
|
+
rubygems_version: 3.5.11
|
230
|
+
signing_key:
|
230
231
|
specification_version: 4
|
231
232
|
summary: Simple Rails & AWS Lambda Integration using Rack
|
232
233
|
test_files: []
|