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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 716093f86265b6449366a4f9a7f05cacb2ab568c95d218815b7bc4bb3cf79bb8
4
- data.tar.gz: bf8460030d9f6f49399c8aff53951f2af60915f3f6a5f4a27dc97de622767a73
3
+ metadata.gz: 836c45e05d0095fdbd0665b2252543601e40d4a4c2e0047e05c9b36c334952fb
4
+ data.tar.gz: 7a98d50351cb6be994c7ff5f5d3c5c1afbdc4296f235ea4fe37d840a70ac375c
5
5
  SHA512:
6
- metadata.gz: fae9a75a9e74f05fdc15051885e1d9881e49a0b1f6db9da4693395b27002e9582dacd25a717b5f6bc7d7ffa9d320099a7691c1d4ff75256a24b4e4d937538c6b
7
- data.tar.gz: b2f373ffc8730ec2d50111a38ccdc60d9fd92993ec8a0c48634789b09d10412791b28d87d2ed7e706cff37ce9e6c47b4f59ce14dfb65dc3f34a487b9b53df41a
6
+ metadata.gz: b4f674a95692a7cd0fd6b810db3b1ca1e74f6c26bf74522cb0b912970a03e1ef56ec4858af2370f324b87c93789076cd6e663ecfc5fc176056e7579c72156ae2
7
+ data.tar.gz: 074d1145e72ba11c7fd867a49397632fcf82591d12e73e7b8f27728d216db3be454509654c136b795c2b35999dd11aff68e46bd8336a8f3c18393a416b55f28c
@@ -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
@@ -5,7 +5,7 @@ module Lamby
5
5
 
6
6
  LAMBDA_EVENT = 'lambda.event'.freeze
7
7
  LAMBDA_CONTEXT = 'lambda.context'.freeze
8
- HTTP_X_APIGWSTAGE = 'HTTP_X_APIGWSTAGE'.freeze
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
@@ -1,3 +1,3 @@
1
1
  module Lamby
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.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: 0.3.1
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-03-29 00:00:00.000000000 Z
11
+ date: 2019-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack