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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ce831b5763fdf703c2dee815561117aaa3f437655f6633de363f4464f123fd4
4
- data.tar.gz: ea61014f1f2ce8ce009f2a1818578bb012309f568b5e3443cc1bbc6bf5b50ab6
3
+ metadata.gz: 40152d0ab40a6a6082853a1824fa716eb8b74e2289469a271f66681ac23e153a
4
+ data.tar.gz: 1c4af9ff9a7d556a2335f6326dfdb4a65047357e274c7adfae45a151d7ef43c0
5
5
  SHA512:
6
- metadata.gz: b0a13fbb2a30b8970900275554df0b915a32f93352e4596df9c202dcb307bcbb1a45fc5afe7cc755306003e7e5633fcb38de119a7a35355f20a3db05adc90e5d
7
- data.tar.gz: 1455fbdcddc869a920f2f65a3a0d6df5c536d2fa4e1136cb8cf0e46733b33b35012b01dc93c5c15b026d5ad1fee59c0a9e4bacb08673e1f7338044542432a580
6
+ metadata.gz: 58000ce78c01aa5bc1c2c80bcac05571d2e8ca01926d7e37c6b7000564677c594ec2391dea314a88337f4f2c98009f2fa55e06f0b07628032b40ecd4522e6320
7
+ data.tar.gz: a26fb1d84a283caa0bcc2d46e8ec9344bed9314dee2bbe91691307b096f621fa9ae4c48b6500d628e3bdae8ac30445499cbb92fc1cd6369915b85603d8784e9b
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@
4
4
 
5
5
  See this http://keepachangelog.com link for information on how we want this documented formatted.
6
6
 
7
+ ## v3.1.2
8
+
9
+ #### Fixed
10
+
11
+ - Lambdakiq Handler Integration. Fixes #120.
12
+
7
13
  ## v3.1.1
8
14
 
9
15
  #### Fixed
data/Gemfile CHANGED
@@ -5,5 +5,5 @@ gemspec
5
5
  gem 'rails'
6
6
 
7
7
  group :test do
8
- gem 'lambdakiq', require: false
9
- end
8
+ gem 'lambdakiq'
9
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lamby (3.1.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.1.1)
70
- aws-partitions (1.446.0)
71
- aws-sdk-core (3.114.0)
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.239.0)
73
+ aws-partitions (~> 1, >= 1.525.0)
74
74
  aws-sigv4 (~> 1.1)
75
75
  jmespath (~> 1.0)
76
- aws-sdk-sqs (1.38.0)
77
- aws-sdk-core (~> 3, >= 3.112.0)
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.2.3)
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.8)
86
+ concurrent-ruby (1.1.10)
87
87
  crass (1.0.6)
88
88
  erubi (1.10.0)
89
- globalid (0.4.2)
90
- activesupport (>= 4.2.0)
91
- i18n (1.8.10)
89
+ globalid (1.0.0)
90
+ activesupport (>= 5.0)
91
+ i18n (1.10.0)
92
92
  concurrent-ruby (~> 1.0)
93
- jmespath (1.4.0)
94
- lambdakiq (1.0.1)
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.9.1)
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.5.0)
108
- minitest (5.14.4)
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.11.3)
114
- mini_portile2 (~> 2.5.0)
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.5.2)
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.3.0)
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.3)
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.0)
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.2)
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.15
184
+ 2.2.22
data/bin/_setup CHANGED
@@ -2,5 +2,6 @@
2
2
  set -e
3
3
 
4
4
  echo '== Installing dependencies =='
5
+ bundle lock --add-platform x86_64-linux
5
6
  bundle config set --local path 'vendor/bundle'
6
7
  bundle install
data/docker-compose.yml CHANGED
@@ -3,6 +3,7 @@ services:
3
3
  cicd:
4
4
  build: .
5
5
  environment:
6
+ - AWS_REGION=${AWS_REGION-us-east-1}
6
7
  - AWS_PROFILE=${AWS_PROFILE-default}
7
8
  - RAILS_ENV=${RAILS_ENV-test}
8
9
  - AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION-us-east-1}
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
- { statusCode: status,
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
- return self if @called
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
- rack? ? rack.response(self) : {}
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
@@ -1,3 +1,3 @@
1
1
  module Lamby
2
- VERSION = '3.1.1'
2
+ VERSION = '3.1.2'
3
3
  end
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.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: 2021-07-16 00:00:00.000000000 Z
11
+ date: 2022-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack