lamby 4.0.0.pre1 → 4.0.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: 426595ea251a36f8c9b7fee1897a377c6c9ab2a536f7bf19d96ba056480b9517
4
- data.tar.gz: 395458d48f89ef2f16f1f49d2516d251b24d28125b41e46f16fa4c0cac98ec93
3
+ metadata.gz: f576b9a1efb2d9ca0486e70fcb51bab087ca6555f586f74b6bc87f4aaf8ce4b0
4
+ data.tar.gz: 76b2f5f03c3b896d55012815a93f53ff5c2a02eb1248082b40513b0f067ca25e
5
5
  SHA512:
6
- metadata.gz: 8ec8bdbddce05ed77d78b5ecda1a222a515b1bbe2bfb952af923e8585d8de386e0039b9f384d96b1e40b4dc0cc4ae91c05c939240ddc0408e0c42ba10d570cc0
7
- data.tar.gz: c1832d0c6249a7e8d48c769e3f33bb1daa95154a6f5f2bd719904e0e03fc26bbe6ed06470263e615ef96975abf9a905040083f1a4c7aaacc107c00c728631393
6
+ metadata.gz: e111251628a0e30272ceaaa43f5a072a0ba2e67879d39d1fd2f5d2c557d0b22da055cfeb2c66f877ee04df4a8ce7ea6af0cbe43c792d24f88a1e12b5706fc7a2
7
+ data.tar.gz: dc78b125672bf71e4548bbe7c2de4acb498a11a166fddab0157213900d62326d43500a8ce8d4a43d9d3ce9894d5012fd51a127a70268c10f43f8168bfa1f94fd
data/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  See this http://keepachangelog.com link for information on how we want this documented formatted.
4
4
 
5
- ## v4.0.0 (unreleased)
5
+ ## v4.0.1
6
+
7
+ ### Added
8
+
9
+ - New `Lamby.config.handled_proc` called with ensure via `Lamby.cmd`
10
+
11
+ ## v4.0.0
6
12
 
7
13
  ### Added
8
14
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lamby (4.0.0.pre1)
4
+ lamby (4.0.1)
5
5
  rack
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -6,13 +6,7 @@ Lamby is an [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-a
6
6
 
7
7
  <img src="https://raw.githubusercontent.com/customink/lamby_site/master/app/assets/images/lamby-arch-hero.png" alt="Lamby: Simple Rails & AWS Lambda Integration"/>
8
8
 
9
- The goal of this project is to provide minimal code to allow your Rails application to respond to incoming [AWS Lambda Function Handler in Ruby](https://docs.aws.amazon.com/lambda/latest/dg/ruby-handler.html) `event` and `context` objects in the Lambda handler. We support Application Load Balancer integration or API Gateway.
10
-
11
- ```ruby
12
- def handler(event:, context:)
13
- Lamby.handler $app, event, context
14
- end
15
- ```
9
+ We support Lambda [Function URLs](https://docs.aws.amazon.com/lambda/latest/dg/lambda-urls.html), [API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) (HTTP or REST, all payload versions), and even [Application Load Balancer](https://docs.aws.amazon.com/lambda/latest/dg/services-alb.html) integrations.
16
10
 
17
11
  ## Quick Start
18
12
 
@@ -20,7 +14,7 @@ https://lamby.custominktech.com/docs/quick_start
20
14
 
21
15
  ## Full Documentation
22
16
 
23
- https://lamby.custominktech.com/docs/installing_aws_sam
17
+ https://lamby.custominktech.com
24
18
 
25
19
  ## Contributing
26
20
 
data/lib/lamby/config.rb CHANGED
@@ -56,5 +56,13 @@ module Lamby
56
56
  Runner::PATTERNS
57
57
  end
58
58
 
59
+ def handled_proc
60
+ @handled_proc ||= Proc.new { |_event, _context| }
61
+ end
62
+
63
+ def handled_proc=(proc)
64
+ @handled_proc = proc
65
+ end
66
+
59
67
  end
60
68
  end
data/lib/lamby/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lamby
2
- VERSION = '4.0.0.pre1'
2
+ VERSION = '4.0.1'
3
3
  end
data/lib/lamby.rb CHANGED
@@ -22,6 +22,8 @@ module Lamby
22
22
 
23
23
  def cmd(event:, context:)
24
24
  handler(config.rack_app, event, context)
25
+ ensure
26
+ config.handled_proc.call(event, context)
25
27
  end
26
28
 
27
29
  def handler(app, event, context, options = {})
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: 4.0.0.pre1
4
+ version: 4.0.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: 2022-12-01 00:00:00.000000000 Z
11
+ date: 2022-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -177,9 +177,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
177
  version: '0'
178
178
  required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  requirements:
180
- - - ">"
180
+ - - ">="
181
181
  - !ruby/object:Gem::Version
182
- version: 1.3.1
182
+ version: '0'
183
183
  requirements: []
184
184
  rubygems_version: 3.1.2
185
185
  signing_key: