lamby 5.1.0 → 5.2.1

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: 940f2329a4503c79e8c2c48908b3f1c2d22445c16ebb0dc71ee0802e54e7c560
4
- data.tar.gz: 708b36a037b00b3f66dfa3239a8060ae6b00177628a1e1cd38ba0a8ed8988a94
3
+ metadata.gz: c2c9807f202b6afbc3e9070abe372dc32f8927731f0378ed21b3c638e0e1b8c3
4
+ data.tar.gz: a1a3e5acfb60c21f772f19be43f599772d32cd808a60a3024ba3e856d2dc8b59
5
5
  SHA512:
6
- metadata.gz: e2d135f4d5cab367171030c98c2126f57e9a9542b2b802535677450e47f8be6dc4c99d8865871978d73c184269c7a806d61c0b48f1fd54642ceda76289b96474
7
- data.tar.gz: 472144850f8dd607c2709d74d6a240ea6949ce640a6e2ddc748e49a31db8f94b04cfa1b3aae842bb9fc465c798e47bc13020571dd8d611b01523e9f8378852cc
6
+ metadata.gz: beb9bac3adbffb93a727f48fab1cc855ac3439065850e3f3068cd41c6f57a6e51239e7ab92e35ad6ab17e7f5cf224f7a6f6b4f572a1cde7039ae12d7c9f53c57
7
+ data.tar.gz: 6b3dd2e45a3a1d434e4d9aa3276869777a1ed15d6de2c6b59cd913125336c0d8d63a39d3a962b37898ae931ce56bd0000030ed9780a05a40562ef3e5693e73a4
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  See this http://keepachangelog.com link for information on how we want this documented formatted.
4
4
 
5
+ ## v5.2.1
6
+
7
+ - Rack v6 compatibility.
8
+ - Exit gracefully when SIGTERM error happens.
9
+
10
+ ## v5.2.0
11
+
12
+ ### Fixed
13
+
14
+ - Safely Pass Percent Symbols in Paths Fixes #170
15
+
5
16
  ## v5.1.0
6
17
 
7
18
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lamby (5.1.0)
4
+ lamby (5.2.1)
5
5
  lambda-console-ruby
6
6
  rack
7
7
 
@@ -183,7 +183,9 @@ GEM
183
183
 
184
184
  PLATFORMS
185
185
  aarch64-linux
186
+ arm64-darwin-21
186
187
  arm64-darwin-22
188
+ arm64-darwin-23
187
189
 
188
190
  DEPENDENCIES
189
191
  aws-sdk-ssm
@@ -47,9 +47,6 @@ module Lamby
47
47
  ::Rack::RACK_URL_SCHEME => headers['x-forwarded-proto'],
48
48
  ::Rack::RACK_INPUT => StringIO.new(body || ''),
49
49
  ::Rack::RACK_ERRORS => $stderr,
50
- ::Rack::RACK_MULTITHREAD => false,
51
- ::Rack::RACK_MULTIPROCESS => false,
52
- ::Rack::RACK_RUNONCE => false,
53
50
  LAMBDA_EVENT => event,
54
51
  LAMBDA_CONTEXT => context
55
52
  }.tap do |env|
@@ -42,9 +42,6 @@ module Lamby
42
42
  ::Rack::RACK_URL_SCHEME => 'https',
43
43
  ::Rack::RACK_INPUT => StringIO.new(body || ''),
44
44
  ::Rack::RACK_ERRORS => $stderr,
45
- ::Rack::RACK_MULTITHREAD => false,
46
- ::Rack::RACK_MULTIPROCESS => false,
47
- ::Rack::RACK_RUNONCE => false,
48
45
  LAMBDA_EVENT => event,
49
46
  LAMBDA_CONTEXT => context
50
47
  }.tap do |env|
@@ -78,6 +75,7 @@ module Lamby
78
75
  def path_info
79
76
  stage = event.dig('requestContext', 'stage')
80
77
  spath = event.dig('requestContext', 'http', 'path') || event.dig('requestContext', 'path')
78
+ spath = event['rawPath'] if spath != event['rawPath'] && !payload_version_one?
81
79
  spath.sub /\A\/#{stage}/, ''
82
80
  end
83
81
 
@@ -36,9 +36,6 @@ module Lamby
36
36
  ::Rack::RACK_URL_SCHEME => 'https',
37
37
  ::Rack::RACK_INPUT => StringIO.new(body || ''),
38
38
  ::Rack::RACK_ERRORS => $stderr,
39
- ::Rack::RACK_MULTITHREAD => false,
40
- ::Rack::RACK_MULTIPROCESS => false,
41
- ::Rack::RACK_RUNONCE => false,
42
39
  LAMBDA_EVENT => event,
43
40
  LAMBDA_CONTEXT => context
44
41
  }.tap do |env|
data/lib/lamby/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lamby
2
- VERSION = '5.1.0'
2
+ VERSION = '5.2.1'
3
3
  end
data/lib/lamby.rb CHANGED
@@ -40,3 +40,14 @@ module Lamby
40
40
  autoload :ProxyServer, 'lamby/proxy_server'
41
41
 
42
42
  end
43
+
44
+ # Add signal traps for clean exit
45
+ Signal.trap("TERM") do
46
+ puts "Received SIGTERM, exiting gracefully..."
47
+ exit!(0) # exit! ensures no exception is raised
48
+ end
49
+
50
+ Signal.trap("INT") do
51
+ puts "Received SIGINT, exiting gracefully..."
52
+ exit!(0) # exit! ensures no exception is raised
53
+ 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: 5.1.0
4
+ version: 5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-07 00:00:00.000000000 Z
11
+ date: 2024-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  - !ruby/object:Gem::Version
227
227
  version: '0'
228
228
  requirements: []
229
- rubygems_version: 3.4.6
229
+ rubygems_version: 3.3.27
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: Simple Rails & AWS Lambda Integration using Rack