lamby 2.6.1 → 2.6.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 +4 -0
- data/Dockerfile +0 -5
- data/Gemfile.lock +99 -96
- data/lib/lamby/handler.rb +7 -7
- data/lib/lamby/rack_alb.rb +1 -1
- 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: 6b47ebf99fa0cfc8d6f88c652d05cf97f30d00c119081d2068418731faf88967
|
4
|
+
data.tar.gz: ae3e41ee1ff96c3a9868f1d25b9f030d0c971113827fb2751b66bed8e89bf46c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de331c42dc947a6cfe15929c24c3b0c00c5bc81b89a7782149dd3c985fb4894f2ad5d2bf3f789ff699865f1982b690d43c8b983f0c553cf078b3567394508ea0
|
7
|
+
data.tar.gz: 992d10b1e0c9e39df59ae2b96e1406d6a53fc331f3eae92ea6d731e89bb43c754bd97cce60817277eedb65ad436ac15beea55ad55c36cb4a3d95486071d6efff
|
data/CHANGELOG.md
CHANGED
data/Dockerfile
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
FROM lambci/lambda:build-ruby2.7
|
2
2
|
|
3
|
-
# Lock down AWS SAM version.
|
4
|
-
RUN pip install awscli && \
|
5
|
-
pip uninstall --yes aws-sam-cli && \
|
6
|
-
pip install aws-sam-cli==0.45.0
|
7
|
-
|
8
3
|
# Asset Pipeline
|
9
4
|
RUN curl -sL https://rpm.nodesource.com/setup_12.x | bash - && \
|
10
5
|
yum install -y nodejs
|
data/Gemfile.lock
CHANGED
@@ -1,155 +1,158 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lamby (2.6.
|
4
|
+
lamby (2.6.2)
|
5
5
|
rack
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (6.
|
11
|
-
actionpack (= 6.
|
10
|
+
actioncable (6.1.3.1)
|
11
|
+
actionpack (= 6.1.3.1)
|
12
|
+
activesupport (= 6.1.3.1)
|
12
13
|
nio4r (~> 2.0)
|
13
14
|
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailbox (6.
|
15
|
-
actionpack (= 6.
|
16
|
-
activejob (= 6.
|
17
|
-
activerecord (= 6.
|
18
|
-
activestorage (= 6.
|
19
|
-
activesupport (= 6.
|
15
|
+
actionmailbox (6.1.3.1)
|
16
|
+
actionpack (= 6.1.3.1)
|
17
|
+
activejob (= 6.1.3.1)
|
18
|
+
activerecord (= 6.1.3.1)
|
19
|
+
activestorage (= 6.1.3.1)
|
20
|
+
activesupport (= 6.1.3.1)
|
20
21
|
mail (>= 2.7.1)
|
21
|
-
actionmailer (6.
|
22
|
-
actionpack (= 6.
|
23
|
-
actionview (= 6.
|
24
|
-
activejob (= 6.
|
22
|
+
actionmailer (6.1.3.1)
|
23
|
+
actionpack (= 6.1.3.1)
|
24
|
+
actionview (= 6.1.3.1)
|
25
|
+
activejob (= 6.1.3.1)
|
26
|
+
activesupport (= 6.1.3.1)
|
25
27
|
mail (~> 2.5, >= 2.5.4)
|
26
28
|
rails-dom-testing (~> 2.0)
|
27
|
-
actionpack (6.
|
28
|
-
actionview (= 6.
|
29
|
-
activesupport (= 6.
|
30
|
-
rack (~> 2.0, >= 2.0.
|
29
|
+
actionpack (6.1.3.1)
|
30
|
+
actionview (= 6.1.3.1)
|
31
|
+
activesupport (= 6.1.3.1)
|
32
|
+
rack (~> 2.0, >= 2.0.9)
|
31
33
|
rack-test (>= 0.6.3)
|
32
34
|
rails-dom-testing (~> 2.0)
|
33
35
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
34
|
-
actiontext (6.
|
35
|
-
actionpack (= 6.
|
36
|
-
activerecord (= 6.
|
37
|
-
activestorage (= 6.
|
38
|
-
activesupport (= 6.
|
36
|
+
actiontext (6.1.3.1)
|
37
|
+
actionpack (= 6.1.3.1)
|
38
|
+
activerecord (= 6.1.3.1)
|
39
|
+
activestorage (= 6.1.3.1)
|
40
|
+
activesupport (= 6.1.3.1)
|
39
41
|
nokogiri (>= 1.8.5)
|
40
|
-
actionview (6.
|
41
|
-
activesupport (= 6.
|
42
|
+
actionview (6.1.3.1)
|
43
|
+
activesupport (= 6.1.3.1)
|
42
44
|
builder (~> 3.1)
|
43
45
|
erubi (~> 1.4)
|
44
46
|
rails-dom-testing (~> 2.0)
|
45
47
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
46
|
-
activejob (6.
|
47
|
-
activesupport (= 6.
|
48
|
+
activejob (6.1.3.1)
|
49
|
+
activesupport (= 6.1.3.1)
|
48
50
|
globalid (>= 0.3.6)
|
49
|
-
activemodel (6.
|
50
|
-
activesupport (= 6.
|
51
|
-
activerecord (6.
|
52
|
-
activemodel (= 6.
|
53
|
-
activesupport (= 6.
|
54
|
-
activestorage (6.
|
55
|
-
actionpack (= 6.
|
56
|
-
activejob (= 6.
|
57
|
-
activerecord (= 6.
|
58
|
-
|
59
|
-
|
51
|
+
activemodel (6.1.3.1)
|
52
|
+
activesupport (= 6.1.3.1)
|
53
|
+
activerecord (6.1.3.1)
|
54
|
+
activemodel (= 6.1.3.1)
|
55
|
+
activesupport (= 6.1.3.1)
|
56
|
+
activestorage (6.1.3.1)
|
57
|
+
actionpack (= 6.1.3.1)
|
58
|
+
activejob (= 6.1.3.1)
|
59
|
+
activerecord (= 6.1.3.1)
|
60
|
+
activesupport (= 6.1.3.1)
|
61
|
+
marcel (~> 1.0.0)
|
62
|
+
mini_mime (~> 1.0.2)
|
63
|
+
activesupport (6.1.3.1)
|
60
64
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
61
|
-
i18n (>=
|
62
|
-
minitest (
|
63
|
-
tzinfo (~>
|
64
|
-
zeitwerk (~> 2.
|
65
|
-
aws-eventstream (1.
|
66
|
-
aws-partitions (1.
|
67
|
-
aws-sdk-core (3.
|
68
|
-
aws-eventstream (~> 1
|
65
|
+
i18n (>= 1.6, < 2)
|
66
|
+
minitest (>= 5.1)
|
67
|
+
tzinfo (~> 2.0)
|
68
|
+
zeitwerk (~> 2.3)
|
69
|
+
aws-eventstream (1.1.1)
|
70
|
+
aws-partitions (1.446.0)
|
71
|
+
aws-sdk-core (3.114.0)
|
72
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
69
73
|
aws-partitions (~> 1, >= 1.239.0)
|
70
74
|
aws-sigv4 (~> 1.1)
|
71
75
|
jmespath (~> 1.0)
|
72
|
-
aws-sdk-ssm (1.
|
73
|
-
aws-sdk-core (~> 3, >= 3.
|
76
|
+
aws-sdk-ssm (1.108.0)
|
77
|
+
aws-sdk-core (~> 3, >= 3.112.0)
|
74
78
|
aws-sigv4 (~> 1.1)
|
75
|
-
aws-sigv4 (1.
|
76
|
-
aws-eventstream (~> 1
|
79
|
+
aws-sigv4 (1.2.3)
|
80
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
77
81
|
builder (3.2.4)
|
78
|
-
coderay (1.1.
|
79
|
-
concurrent-ruby (1.1.
|
82
|
+
coderay (1.1.3)
|
83
|
+
concurrent-ruby (1.1.8)
|
80
84
|
crass (1.0.6)
|
81
|
-
erubi (1.
|
85
|
+
erubi (1.10.0)
|
82
86
|
globalid (0.4.2)
|
83
87
|
activesupport (>= 4.2.0)
|
84
|
-
i18n (1.8.
|
88
|
+
i18n (1.8.10)
|
85
89
|
concurrent-ruby (~> 1.0)
|
86
90
|
jmespath (1.4.0)
|
87
|
-
loofah (2.
|
91
|
+
loofah (2.9.1)
|
88
92
|
crass (~> 1.0.2)
|
89
93
|
nokogiri (>= 1.5.9)
|
90
94
|
mail (2.7.1)
|
91
95
|
mini_mime (>= 0.1.1)
|
92
|
-
marcel (0.
|
93
|
-
mimemagic (~> 0.3.2)
|
96
|
+
marcel (1.0.1)
|
94
97
|
method_source (1.0.0)
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
minitest (
|
99
|
-
minitest-focus (1.1.2)
|
98
|
+
mini_mime (1.0.3)
|
99
|
+
mini_portile2 (2.5.0)
|
100
|
+
minitest (5.14.4)
|
101
|
+
minitest-focus (1.2.1)
|
100
102
|
minitest (>= 4, < 6)
|
101
|
-
mocha (1.
|
102
|
-
nio4r (2.5.
|
103
|
-
nokogiri (1.
|
104
|
-
mini_portile2 (~> 2.
|
105
|
-
|
103
|
+
mocha (1.12.0)
|
104
|
+
nio4r (2.5.7)
|
105
|
+
nokogiri (1.11.3)
|
106
|
+
mini_portile2 (~> 2.5.0)
|
107
|
+
racc (~> 1.4)
|
108
|
+
pry (0.14.1)
|
106
109
|
coderay (~> 1.1)
|
107
110
|
method_source (~> 1.0)
|
108
|
-
|
111
|
+
racc (1.5.2)
|
112
|
+
rack (2.2.3)
|
109
113
|
rack-test (1.1.0)
|
110
114
|
rack (>= 1.0, < 3)
|
111
|
-
rails (6.
|
112
|
-
actioncable (= 6.
|
113
|
-
actionmailbox (= 6.
|
114
|
-
actionmailer (= 6.
|
115
|
-
actionpack (= 6.
|
116
|
-
actiontext (= 6.
|
117
|
-
actionview (= 6.
|
118
|
-
activejob (= 6.
|
119
|
-
activemodel (= 6.
|
120
|
-
activerecord (= 6.
|
121
|
-
activestorage (= 6.
|
122
|
-
activesupport (= 6.
|
123
|
-
bundler (>= 1.
|
124
|
-
railties (= 6.
|
115
|
+
rails (6.1.3.1)
|
116
|
+
actioncable (= 6.1.3.1)
|
117
|
+
actionmailbox (= 6.1.3.1)
|
118
|
+
actionmailer (= 6.1.3.1)
|
119
|
+
actionpack (= 6.1.3.1)
|
120
|
+
actiontext (= 6.1.3.1)
|
121
|
+
actionview (= 6.1.3.1)
|
122
|
+
activejob (= 6.1.3.1)
|
123
|
+
activemodel (= 6.1.3.1)
|
124
|
+
activerecord (= 6.1.3.1)
|
125
|
+
activestorage (= 6.1.3.1)
|
126
|
+
activesupport (= 6.1.3.1)
|
127
|
+
bundler (>= 1.15.0)
|
128
|
+
railties (= 6.1.3.1)
|
125
129
|
sprockets-rails (>= 2.0.0)
|
126
130
|
rails-dom-testing (2.0.3)
|
127
131
|
activesupport (>= 4.2.0)
|
128
132
|
nokogiri (>= 1.6)
|
129
133
|
rails-html-sanitizer (1.3.0)
|
130
134
|
loofah (~> 2.3)
|
131
|
-
railties (6.
|
132
|
-
actionpack (= 6.
|
133
|
-
activesupport (= 6.
|
135
|
+
railties (6.1.3.1)
|
136
|
+
actionpack (= 6.1.3.1)
|
137
|
+
activesupport (= 6.1.3.1)
|
134
138
|
method_source
|
135
139
|
rake (>= 0.8.7)
|
136
|
-
thor (
|
137
|
-
rake (13.0.
|
138
|
-
sprockets (4.0.
|
140
|
+
thor (~> 1.0)
|
141
|
+
rake (13.0.3)
|
142
|
+
sprockets (4.0.2)
|
139
143
|
concurrent-ruby (~> 1.0)
|
140
144
|
rack (> 1, < 3)
|
141
|
-
sprockets-rails (3.2.
|
145
|
+
sprockets-rails (3.2.2)
|
142
146
|
actionpack (>= 4.0)
|
143
147
|
activesupport (>= 4.0)
|
144
148
|
sprockets (>= 3.0.0)
|
145
|
-
thor (1.0
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
websocket-driver (0.7.1)
|
149
|
+
thor (1.1.0)
|
150
|
+
tzinfo (2.0.4)
|
151
|
+
concurrent-ruby (~> 1.0)
|
152
|
+
websocket-driver (0.7.3)
|
150
153
|
websocket-extensions (>= 0.1.0)
|
151
|
-
websocket-extensions (0.1.
|
152
|
-
zeitwerk (2.
|
154
|
+
websocket-extensions (0.1.5)
|
155
|
+
zeitwerk (2.4.2)
|
153
156
|
|
154
157
|
PLATFORMS
|
155
158
|
ruby
|
@@ -166,4 +169,4 @@ DEPENDENCIES
|
|
166
169
|
rake
|
167
170
|
|
168
171
|
BUNDLED WITH
|
169
|
-
2.2.
|
172
|
+
2.2.15
|
data/lib/lamby/handler.rb
CHANGED
@@ -52,11 +52,11 @@ module Lamby
|
|
52
52
|
self
|
53
53
|
end
|
54
54
|
|
55
|
-
def base64_encodeable?
|
56
|
-
|
57
|
-
|
58
|
-
content_encoding_compressed? ||
|
59
|
-
|
55
|
+
def base64_encodeable?(hdrs = @headers)
|
56
|
+
hdrs && (
|
57
|
+
hdrs['Content-Transfer-Encoding'] == 'binary' ||
|
58
|
+
content_encoding_compressed?(hdrs) ||
|
59
|
+
hdrs['X-Lamby-Base64'] == '1'
|
60
60
|
)
|
61
61
|
end
|
62
62
|
|
@@ -89,8 +89,8 @@ module Lamby
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
-
def content_encoding_compressed?
|
93
|
-
content_encoding_header =
|
92
|
+
def content_encoding_compressed?(hdrs)
|
93
|
+
content_encoding_header = hdrs['Content-Encoding'] || ''
|
94
94
|
content_encoding_header.split(', ').any? { |h| ['br', 'gzip'].include?(h) }
|
95
95
|
end
|
96
96
|
end
|
data/lib/lamby/rack_alb.rb
CHANGED
@@ -16,7 +16,7 @@ module Lamby
|
|
16
16
|
multivalue_headers['Set-Cookie'] = handler.set_cookies if handler.set_cookies
|
17
17
|
end
|
18
18
|
status_description = "#{handler.status} #{::Rack::Utils::HTTP_STATUS_CODES[handler.status]}"
|
19
|
-
base64_encode = hhdrs
|
19
|
+
base64_encode = handler.base64_encodeable?(hhdrs)
|
20
20
|
body = Base64.strict_encode64(handler.body) if base64_encode
|
21
21
|
{ multiValueHeaders: multivalue_headers,
|
22
22
|
statusDescription: status_description,
|
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: 2.6.
|
4
|
+
version: 2.6.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-
|
11
|
+
date: 2021-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|