lamby 0.3.1 → 0.3.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 +33 -0
- data/lib/lamby/rack.rb +7 -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: 836c45e05d0095fdbd0665b2252543601e40d4a4c2e0047e05c9b36c334952fb
|
4
|
+
data.tar.gz: 7a98d50351cb6be994c7ff5f5d3c5c1afbdc4296f235ea4fe37d840a70ac375c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4f674a95692a7cd0fd6b810db3b1ca1e74f6c26bf74522cb0b912970a03e1ef56ec4858af2370f324b87c93789076cd6e663ecfc5fc176056e7579c72156ae2
|
7
|
+
data.tar.gz: 074d1145e72ba11c7fd867a49397632fcf82591d12e73e7b8f27728d216db3be454509654c136b795c2b35999dd11aff68e46bd8336a8f3c18393a416b55f28c
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,39 @@
|
|
2
2
|
|
3
3
|
See this http://keepachangelog.com link for information on how we want this documented formatted.
|
4
4
|
|
5
|
+
## v0.3.2
|
6
|
+
|
7
|
+
#### Added
|
8
|
+
|
9
|
+
* Pass Request ID for CloudWatch logs. Fixes #30.
|
10
|
+
|
11
|
+
|
12
|
+
## v0.3.1
|
13
|
+
|
14
|
+
#### Changed
|
15
|
+
|
16
|
+
* Docs and SAM template tweaks.
|
17
|
+
|
18
|
+
|
19
|
+
## v0.3.0
|
20
|
+
|
21
|
+
#### Added
|
22
|
+
|
23
|
+
* Secure configs rake task.
|
24
|
+
* Project bin setup and tests.
|
25
|
+
|
26
|
+
#### Changed
|
27
|
+
|
28
|
+
* SAM template tweaks.
|
29
|
+
|
30
|
+
|
31
|
+
## v0.2.0
|
32
|
+
|
33
|
+
#### Changed
|
34
|
+
|
35
|
+
* Simple docs and project re-organization.
|
36
|
+
|
37
|
+
|
5
38
|
## v0.1.0
|
6
39
|
|
7
40
|
#### Added
|
data/lib/lamby/rack.rb
CHANGED
@@ -5,7 +5,7 @@ module Lamby
|
|
5
5
|
|
6
6
|
LAMBDA_EVENT = 'lambda.event'.freeze
|
7
7
|
LAMBDA_CONTEXT = 'lambda.context'.freeze
|
8
|
-
|
8
|
+
HTTP_X_REQUESTID = 'HTTP_X_REQUEST_ID'.freeze
|
9
9
|
|
10
10
|
attr_reader :event, :context
|
11
11
|
|
@@ -48,6 +48,8 @@ module Lamby
|
|
48
48
|
def env_headers
|
49
49
|
headers.transform_keys do |key|
|
50
50
|
"HTTP_#{key.to_s.upcase.tr '-', '_'}"
|
51
|
+
end.tap do |hdrs|
|
52
|
+
hdrs[HTTP_X_REQUESTID] = request_id
|
51
53
|
end
|
52
54
|
end
|
53
55
|
|
@@ -84,5 +86,9 @@ module Lamby
|
|
84
86
|
event.dig('requestContext', 'protocol') || 'HTTP/1.1'
|
85
87
|
end
|
86
88
|
|
89
|
+
def request_id
|
90
|
+
context.aws_request_id
|
91
|
+
end
|
92
|
+
|
87
93
|
end
|
88
94
|
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: 0.3.
|
4
|
+
version: 0.3.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: 2019-
|
11
|
+
date: 2019-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|