lamby 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +28 -25
- data/bin/_setup +1 -0
- data/docker-compose.yml +1 -0
- data/lib/lamby/handler.rb +10 -12
- data/lib/lamby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40152d0ab40a6a6082853a1824fa716eb8b74e2289469a271f66681ac23e153a
|
4
|
+
data.tar.gz: 1c4af9ff9a7d556a2335f6326dfdb4a65047357e274c7adfae45a151d7ef43c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58000ce78c01aa5bc1c2c80bcac05571d2e8ca01926d7e37c6b7000564677c594ec2391dea314a88337f4f2c98009f2fa55e06f0b07628032b40ecd4522e6320
|
7
|
+
data.tar.gz: a26fb1d84a283caa0bcc2d46e8ec9344bed9314dee2bbe91691307b096f621fa9ae4c48b6500d628e3bdae8ac30445499cbb92fc1cd6369915b85603d8784e9b
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lamby (3.1.
|
4
|
+
lamby (3.1.2)
|
5
5
|
rack
|
6
6
|
|
7
7
|
GEM
|
@@ -66,37 +66,37 @@ GEM
|
|
66
66
|
minitest (>= 5.1)
|
67
67
|
tzinfo (~> 2.0)
|
68
68
|
zeitwerk (~> 2.3)
|
69
|
-
aws-eventstream (1.
|
70
|
-
aws-partitions (1.
|
71
|
-
aws-sdk-core (3.
|
69
|
+
aws-eventstream (1.2.0)
|
70
|
+
aws-partitions (1.570.0)
|
71
|
+
aws-sdk-core (3.130.0)
|
72
72
|
aws-eventstream (~> 1, >= 1.0.2)
|
73
|
-
aws-partitions (~> 1, >= 1.
|
73
|
+
aws-partitions (~> 1, >= 1.525.0)
|
74
74
|
aws-sigv4 (~> 1.1)
|
75
75
|
jmespath (~> 1.0)
|
76
|
-
aws-sdk-sqs (1.
|
77
|
-
aws-sdk-core (~> 3, >= 3.
|
76
|
+
aws-sdk-sqs (1.51.0)
|
77
|
+
aws-sdk-core (~> 3, >= 3.127.0)
|
78
78
|
aws-sigv4 (~> 1.1)
|
79
79
|
aws-sdk-ssm (1.108.0)
|
80
80
|
aws-sdk-core (~> 3, >= 3.112.0)
|
81
81
|
aws-sigv4 (~> 1.1)
|
82
|
-
aws-sigv4 (1.
|
82
|
+
aws-sigv4 (1.4.0)
|
83
83
|
aws-eventstream (~> 1, >= 1.0.2)
|
84
84
|
builder (3.2.4)
|
85
85
|
coderay (1.1.3)
|
86
|
-
concurrent-ruby (1.1.
|
86
|
+
concurrent-ruby (1.1.10)
|
87
87
|
crass (1.0.6)
|
88
88
|
erubi (1.10.0)
|
89
|
-
globalid (0.
|
90
|
-
activesupport (>=
|
91
|
-
i18n (1.
|
89
|
+
globalid (1.0.0)
|
90
|
+
activesupport (>= 5.0)
|
91
|
+
i18n (1.10.0)
|
92
92
|
concurrent-ruby (~> 1.0)
|
93
|
-
jmespath (1.
|
94
|
-
lambdakiq (
|
93
|
+
jmespath (1.6.1)
|
94
|
+
lambdakiq (2.0.0)
|
95
95
|
activejob
|
96
96
|
aws-sdk-sqs
|
97
97
|
concurrent-ruby
|
98
98
|
railties
|
99
|
-
loofah (2.
|
99
|
+
loofah (2.15.0)
|
100
100
|
crass (~> 1.0.2)
|
101
101
|
nokogiri (>= 1.5.9)
|
102
102
|
mail (2.7.1)
|
@@ -104,19 +104,21 @@ GEM
|
|
104
104
|
marcel (1.0.1)
|
105
105
|
method_source (1.0.0)
|
106
106
|
mini_mime (1.0.3)
|
107
|
-
mini_portile2 (2.
|
108
|
-
minitest (5.
|
107
|
+
mini_portile2 (2.8.0)
|
108
|
+
minitest (5.15.0)
|
109
109
|
minitest-focus (1.2.1)
|
110
110
|
minitest (>= 4, < 6)
|
111
111
|
mocha (1.12.0)
|
112
112
|
nio4r (2.5.7)
|
113
|
-
nokogiri (1.
|
114
|
-
mini_portile2 (~> 2.
|
113
|
+
nokogiri (1.13.3)
|
114
|
+
mini_portile2 (~> 2.8.0)
|
115
|
+
racc (~> 1.4)
|
116
|
+
nokogiri (1.13.3-x86_64-linux)
|
115
117
|
racc (~> 1.4)
|
116
118
|
pry (0.14.1)
|
117
119
|
coderay (~> 1.1)
|
118
120
|
method_source (~> 1.0)
|
119
|
-
racc (1.
|
121
|
+
racc (1.6.0)
|
120
122
|
rack (2.2.3)
|
121
123
|
rack-test (1.1.0)
|
122
124
|
rack (>= 1.0, < 3)
|
@@ -138,7 +140,7 @@ GEM
|
|
138
140
|
rails-dom-testing (2.0.3)
|
139
141
|
activesupport (>= 4.2.0)
|
140
142
|
nokogiri (>= 1.6)
|
141
|
-
rails-html-sanitizer (1.
|
143
|
+
rails-html-sanitizer (1.4.2)
|
142
144
|
loofah (~> 2.3)
|
143
145
|
railties (6.1.3.1)
|
144
146
|
actionpack (= 6.1.3.1)
|
@@ -146,7 +148,7 @@ GEM
|
|
146
148
|
method_source
|
147
149
|
rake (>= 0.8.7)
|
148
150
|
thor (~> 1.0)
|
149
|
-
rake (13.0.
|
151
|
+
rake (13.0.6)
|
150
152
|
sprockets (4.0.2)
|
151
153
|
concurrent-ruby (~> 1.0)
|
152
154
|
rack (> 1, < 3)
|
@@ -154,16 +156,17 @@ GEM
|
|
154
156
|
actionpack (>= 4.0)
|
155
157
|
activesupport (>= 4.0)
|
156
158
|
sprockets (>= 3.0.0)
|
157
|
-
thor (1.1
|
159
|
+
thor (1.2.1)
|
158
160
|
tzinfo (2.0.4)
|
159
161
|
concurrent-ruby (~> 1.0)
|
160
162
|
websocket-driver (0.7.3)
|
161
163
|
websocket-extensions (>= 0.1.0)
|
162
164
|
websocket-extensions (0.1.5)
|
163
|
-
zeitwerk (2.4
|
165
|
+
zeitwerk (2.5.4)
|
164
166
|
|
165
167
|
PLATFORMS
|
166
168
|
ruby
|
169
|
+
x86_64-linux
|
167
170
|
|
168
171
|
DEPENDENCIES
|
169
172
|
aws-sdk-ssm
|
@@ -178,4 +181,4 @@ DEPENDENCIES
|
|
178
181
|
rake
|
179
182
|
|
180
183
|
BUNDLED WITH
|
181
|
-
2.2.
|
184
|
+
2.2.22
|
data/bin/_setup
CHANGED
data/docker-compose.yml
CHANGED
data/lib/lamby/handler.rb
CHANGED
@@ -14,13 +14,10 @@ module Lamby
|
|
14
14
|
@event = event
|
15
15
|
@context = context
|
16
16
|
@options = options
|
17
|
-
@called = false
|
18
17
|
end
|
19
18
|
|
20
19
|
def response
|
21
|
-
|
22
|
-
headers: headers,
|
23
|
-
body: body }.merge(rack_response)
|
20
|
+
@response
|
24
21
|
end
|
25
22
|
|
26
23
|
def status
|
@@ -46,10 +43,7 @@ module Lamby
|
|
46
43
|
end
|
47
44
|
|
48
45
|
def call
|
49
|
-
|
50
|
-
@status, @headers, @body = call_app
|
51
|
-
set_cookies if rack?
|
52
|
-
@called = true
|
46
|
+
@response ||= call_app
|
53
47
|
self
|
54
48
|
end
|
55
49
|
|
@@ -82,21 +76,25 @@ module Lamby
|
|
82
76
|
end
|
83
77
|
|
84
78
|
def rack_response
|
85
|
-
|
79
|
+
{ statusCode: status,
|
80
|
+
headers: headers,
|
81
|
+
body: body }.merge(rack.response(self))
|
86
82
|
end
|
87
83
|
|
88
84
|
def call_app
|
89
85
|
if Debug.on?(@event)
|
90
86
|
Debug.call @event, @context, rack.env
|
91
87
|
elsif rack?
|
92
|
-
@app.call rack.env
|
88
|
+
@status, @headers, @body = @app.call rack.env
|
89
|
+
set_cookies
|
90
|
+
rack_response
|
93
91
|
elsif runner?
|
94
|
-
Runner.call(@event)
|
92
|
+
@status, @headers, @body = Runner.call(@event)
|
93
|
+
{ statusCode: status, headers: headers, body: body }
|
95
94
|
elsif lambdakiq?
|
96
95
|
Lambdakiq.handler(@event)
|
97
96
|
elsif event_bridge?
|
98
97
|
Lamby.config.event_bridge_handler.call @event, @context
|
99
|
-
[200, {}, StringIO.new('')]
|
100
98
|
else
|
101
99
|
[404, {}, StringIO.new('')]
|
102
100
|
end
|
data/lib/lamby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lamby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|