lambda_punch 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +100 -89
- data/README.md +9 -9
- data/lambda_punch.gemspec +3 -3
- data/lib/lambda_punch/server.rb +1 -0
- data/lib/lambda_punch/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d4ec4d6103a6d697959372f1adf7e5a13aca8b060c5376f1bf799ebabe3921
|
4
|
+
data.tar.gz: 817ea0235862699edcb95b4199c76b234579d67aa81874d64617bce324c942a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6f7e2783edf78142fe43ce52abf52a0a015bb94bb98752176138e4ad6d97cbb9f41ca0bb26187c075940f8f6b0cb1ab608691ced20a19f0ad04e9c0df746dd5
|
7
|
+
data.tar.gz: 6f96ee034a38cea5636c35d73c3afc0a5345131288cf28db926fec21e5317060bc5749e436d811056e7b4a0da3785070f278826752567f95b9d8176fd84b3e22
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## [1.1.4] - 2024-06-09
|
2
|
+
|
3
|
+
### Changed
|
4
|
+
|
5
|
+
- The `LambdaPunch.start_server!` to now rescue `Errno::EADDRINUSE` errors.
|
6
|
+
|
7
|
+
## [1.1.3] - 2023-04-22
|
8
|
+
|
9
|
+
### Added
|
10
|
+
|
11
|
+
- Test for `error_handler` stack trace.
|
12
|
+
|
1
13
|
## [1.1.2] - 2023-04-22
|
2
14
|
|
3
15
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lambda_punch (1.1.
|
4
|
+
lambda_punch (1.1.4)
|
5
5
|
concurrent-ruby
|
6
6
|
rake
|
7
7
|
rb-inotify
|
@@ -10,147 +10,158 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actioncable (
|
14
|
-
actionpack (=
|
15
|
-
activesupport (=
|
13
|
+
actioncable (7.0.4.3)
|
14
|
+
actionpack (= 7.0.4.3)
|
15
|
+
activesupport (= 7.0.4.3)
|
16
16
|
nio4r (~> 2.0)
|
17
17
|
websocket-driver (>= 0.6.1)
|
18
|
-
actionmailbox (
|
19
|
-
actionpack (=
|
20
|
-
activejob (=
|
21
|
-
activerecord (=
|
22
|
-
activestorage (=
|
23
|
-
activesupport (=
|
18
|
+
actionmailbox (7.0.4.3)
|
19
|
+
actionpack (= 7.0.4.3)
|
20
|
+
activejob (= 7.0.4.3)
|
21
|
+
activerecord (= 7.0.4.3)
|
22
|
+
activestorage (= 7.0.4.3)
|
23
|
+
activesupport (= 7.0.4.3)
|
24
24
|
mail (>= 2.7.1)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
net-imap
|
26
|
+
net-pop
|
27
|
+
net-smtp
|
28
|
+
actionmailer (7.0.4.3)
|
29
|
+
actionpack (= 7.0.4.3)
|
30
|
+
actionview (= 7.0.4.3)
|
31
|
+
activejob (= 7.0.4.3)
|
32
|
+
activesupport (= 7.0.4.3)
|
30
33
|
mail (~> 2.5, >= 2.5.4)
|
34
|
+
net-imap
|
35
|
+
net-pop
|
36
|
+
net-smtp
|
31
37
|
rails-dom-testing (~> 2.0)
|
32
|
-
actionpack (
|
33
|
-
actionview (=
|
34
|
-
activesupport (=
|
35
|
-
rack (~> 2.0, >= 2.0
|
38
|
+
actionpack (7.0.4.3)
|
39
|
+
actionview (= 7.0.4.3)
|
40
|
+
activesupport (= 7.0.4.3)
|
41
|
+
rack (~> 2.0, >= 2.2.0)
|
36
42
|
rack-test (>= 0.6.3)
|
37
43
|
rails-dom-testing (~> 2.0)
|
38
44
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
39
|
-
actiontext (
|
40
|
-
actionpack (=
|
41
|
-
activerecord (=
|
42
|
-
activestorage (=
|
43
|
-
activesupport (=
|
45
|
+
actiontext (7.0.4.3)
|
46
|
+
actionpack (= 7.0.4.3)
|
47
|
+
activerecord (= 7.0.4.3)
|
48
|
+
activestorage (= 7.0.4.3)
|
49
|
+
activesupport (= 7.0.4.3)
|
50
|
+
globalid (>= 0.6.0)
|
44
51
|
nokogiri (>= 1.8.5)
|
45
|
-
actionview (
|
46
|
-
activesupport (=
|
52
|
+
actionview (7.0.4.3)
|
53
|
+
activesupport (= 7.0.4.3)
|
47
54
|
builder (~> 3.1)
|
48
55
|
erubi (~> 1.4)
|
49
56
|
rails-dom-testing (~> 2.0)
|
50
57
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
51
|
-
activejob (
|
52
|
-
activesupport (=
|
58
|
+
activejob (7.0.4.3)
|
59
|
+
activesupport (= 7.0.4.3)
|
53
60
|
globalid (>= 0.3.6)
|
54
|
-
activemodel (
|
55
|
-
activesupport (=
|
56
|
-
activerecord (
|
57
|
-
activemodel (=
|
58
|
-
activesupport (=
|
59
|
-
activestorage (
|
60
|
-
actionpack (=
|
61
|
-
activejob (=
|
62
|
-
activerecord (=
|
63
|
-
activesupport (=
|
64
|
-
marcel (~> 1.0
|
61
|
+
activemodel (7.0.4.3)
|
62
|
+
activesupport (= 7.0.4.3)
|
63
|
+
activerecord (7.0.4.3)
|
64
|
+
activemodel (= 7.0.4.3)
|
65
|
+
activesupport (= 7.0.4.3)
|
66
|
+
activestorage (7.0.4.3)
|
67
|
+
actionpack (= 7.0.4.3)
|
68
|
+
activejob (= 7.0.4.3)
|
69
|
+
activerecord (= 7.0.4.3)
|
70
|
+
activesupport (= 7.0.4.3)
|
71
|
+
marcel (~> 1.0)
|
65
72
|
mini_mime (>= 1.1.0)
|
66
|
-
activesupport (
|
73
|
+
activesupport (7.0.4.3)
|
67
74
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
68
75
|
i18n (>= 1.6, < 2)
|
69
76
|
minitest (>= 5.1)
|
70
77
|
tzinfo (~> 2.0)
|
71
|
-
zeitwerk (~> 2.3)
|
72
78
|
builder (3.2.4)
|
73
79
|
coderay (1.1.3)
|
74
|
-
concurrent-ruby (1.
|
80
|
+
concurrent-ruby (1.2.2)
|
75
81
|
crass (1.0.6)
|
76
|
-
|
82
|
+
date (3.3.3)
|
83
|
+
erubi (1.12.0)
|
77
84
|
ffi (1.15.5)
|
78
|
-
globalid (
|
85
|
+
globalid (1.1.0)
|
79
86
|
activesupport (>= 5.0)
|
80
|
-
i18n (1.
|
87
|
+
i18n (1.12.0)
|
81
88
|
concurrent-ruby (~> 1.0)
|
82
|
-
loofah (2.
|
89
|
+
loofah (2.20.0)
|
83
90
|
crass (~> 1.0.2)
|
84
91
|
nokogiri (>= 1.5.9)
|
85
|
-
mail (2.
|
92
|
+
mail (2.8.1)
|
86
93
|
mini_mime (>= 0.1.1)
|
94
|
+
net-imap
|
95
|
+
net-pop
|
96
|
+
net-smtp
|
87
97
|
marcel (1.0.2)
|
88
98
|
method_source (1.0.0)
|
89
99
|
mini_mime (1.1.2)
|
90
|
-
|
91
|
-
minitest (5.14.4)
|
100
|
+
minitest (5.18.0)
|
92
101
|
minitest-focus (1.3.1)
|
93
102
|
minitest (>= 4, < 6)
|
94
|
-
|
95
|
-
|
96
|
-
|
103
|
+
net-imap (0.3.4)
|
104
|
+
date
|
105
|
+
net-protocol
|
106
|
+
net-pop (0.1.2)
|
107
|
+
net-protocol
|
108
|
+
net-protocol (0.2.1)
|
109
|
+
timeout
|
110
|
+
net-smtp (0.3.3)
|
111
|
+
net-protocol
|
112
|
+
nio4r (2.5.9)
|
113
|
+
nokogiri (1.14.3-aarch64-linux)
|
114
|
+
racc (~> 1.4)
|
115
|
+
nokogiri (1.14.3-arm64-darwin)
|
97
116
|
racc (~> 1.4)
|
98
|
-
pry (0.14.
|
117
|
+
pry (0.14.2)
|
99
118
|
coderay (~> 1.1)
|
100
119
|
method_source (~> 1.0)
|
101
|
-
racc (1.6.
|
102
|
-
rack (2.2.
|
103
|
-
rack-test (
|
104
|
-
rack (>= 1.
|
105
|
-
rails (
|
106
|
-
actioncable (=
|
107
|
-
actionmailbox (=
|
108
|
-
actionmailer (=
|
109
|
-
actionpack (=
|
110
|
-
actiontext (=
|
111
|
-
actionview (=
|
112
|
-
activejob (=
|
113
|
-
activemodel (=
|
114
|
-
activerecord (=
|
115
|
-
activestorage (=
|
116
|
-
activesupport (=
|
120
|
+
racc (1.6.2)
|
121
|
+
rack (2.2.6.4)
|
122
|
+
rack-test (2.1.0)
|
123
|
+
rack (>= 1.3)
|
124
|
+
rails (7.0.4.3)
|
125
|
+
actioncable (= 7.0.4.3)
|
126
|
+
actionmailbox (= 7.0.4.3)
|
127
|
+
actionmailer (= 7.0.4.3)
|
128
|
+
actionpack (= 7.0.4.3)
|
129
|
+
actiontext (= 7.0.4.3)
|
130
|
+
actionview (= 7.0.4.3)
|
131
|
+
activejob (= 7.0.4.3)
|
132
|
+
activemodel (= 7.0.4.3)
|
133
|
+
activerecord (= 7.0.4.3)
|
134
|
+
activestorage (= 7.0.4.3)
|
135
|
+
activesupport (= 7.0.4.3)
|
117
136
|
bundler (>= 1.15.0)
|
118
|
-
railties (=
|
119
|
-
sprockets-rails (>= 2.0.0)
|
137
|
+
railties (= 7.0.4.3)
|
120
138
|
rails-dom-testing (2.0.3)
|
121
139
|
activesupport (>= 4.2.0)
|
122
140
|
nokogiri (>= 1.6)
|
123
|
-
rails-html-sanitizer (1.
|
124
|
-
loofah (~> 2.
|
125
|
-
railties (
|
126
|
-
actionpack (=
|
127
|
-
activesupport (=
|
141
|
+
rails-html-sanitizer (1.5.0)
|
142
|
+
loofah (~> 2.19, >= 2.19.1)
|
143
|
+
railties (7.0.4.3)
|
144
|
+
actionpack (= 7.0.4.3)
|
145
|
+
activesupport (= 7.0.4.3)
|
128
146
|
method_source
|
129
|
-
rake (>=
|
147
|
+
rake (>= 12.2)
|
130
148
|
thor (~> 1.0)
|
149
|
+
zeitwerk (~> 2.5)
|
131
150
|
rake (13.0.6)
|
132
151
|
rb-inotify (0.10.1)
|
133
152
|
ffi (~> 1.0)
|
134
|
-
|
135
|
-
concurrent-ruby (~> 1.0)
|
136
|
-
rack (> 1, < 3)
|
137
|
-
sprockets-rails (3.2.2)
|
138
|
-
actionpack (>= 4.0)
|
139
|
-
activesupport (>= 4.0)
|
140
|
-
sprockets (>= 3.0.0)
|
141
|
-
thor (1.1.0)
|
153
|
+
thor (1.2.1)
|
142
154
|
timeout (0.3.2)
|
143
|
-
tzinfo (2.0.
|
155
|
+
tzinfo (2.0.6)
|
144
156
|
concurrent-ruby (~> 1.0)
|
145
157
|
websocket-driver (0.7.5)
|
146
158
|
websocket-extensions (>= 0.1.0)
|
147
159
|
websocket-extensions (0.1.5)
|
148
|
-
zeitwerk (2.
|
160
|
+
zeitwerk (2.6.7)
|
149
161
|
|
150
162
|
PLATFORMS
|
151
163
|
aarch64-linux
|
152
164
|
arm64-darwin-22
|
153
|
-
x86_64-linux
|
154
165
|
|
155
166
|
DEPENDENCIES
|
156
167
|
lambda_punch!
|
@@ -161,4 +172,4 @@ DEPENDENCIES
|
|
161
172
|
rake
|
162
173
|
|
163
174
|
BUNDLED WITH
|
164
|
-
2.
|
175
|
+
2.4.12
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|

|
2
2
|
|
3
|
-
](https://github.com/rails-lambda/lambda_punch/actions/workflows/test.yml)
|
4
4
|
|
5
5
|
# 👊 LambdaPunch
|
6
6
|
|
7
|
-
<a href="https://lamby.
|
7
|
+
<a href="https://lamby.cloud"><img src="https://raw.githubusercontent.com/rails-lambda/lamby/master/images/social2.png" alt="Lamby: Simple Rails & AWS Lambda Integration using Rack." align="right" width="450" style="margin-left:1rem;margin-bottom:1rem;" /></a>Asynchronous background job processing for AWS Lambda with Ruby using [Lambda Extensions](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html). Inspired by the [SuckerPunch](https://github.com/brandonhilkert/sucker_punch) gem but specifically tooled to work with Lambda's invoke model.
|
8
8
|
|
9
|
-
**For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/
|
9
|
+
**For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/rails-lambda/lambdakiq) gem. A drop-in replacement for [Sidekiq](https://github.com/mperham/sidekiq) when running Rails in AWS Lambda using the [Lamby](https://lamby.cloud/) gem.**
|
10
10
|
|
11
11
|
## 🏗 Architecture
|
12
12
|
|
@@ -24,7 +24,7 @@ Add this line to your project's `Gemfile` and then make sure to `bundle install`
|
|
24
24
|
gem 'lambda_punch'
|
25
25
|
```
|
26
26
|
|
27
|
-
Within your project or [Rails application's](https://lamby.
|
27
|
+
Within your project or [Rails application's](https://lamby.cloud/docs/anatomy) `Dockerfile`, add the following. Make sure you do this before you `COPY` your code. The idea is to implicitly use the default `USER root` since it needs permission to create an `/opt/extensions` directory.
|
28
28
|
|
29
29
|
```dockerfile
|
30
30
|
RUN gem install lambda_punch && lambda_punch install
|
@@ -36,7 +36,7 @@ LambdaPunch uses the `LAMBDA_TASK_ROOT` environment variable to find your projec
|
|
36
36
|
ENV LAMBDA_TASK_ROOT=/app
|
37
37
|
```
|
38
38
|
|
39
|
-
Installation with AWS Lambda via the [Lamby](https://lamby.
|
39
|
+
Installation with AWS Lambda via the [Lamby](https://lamby.cloud/) v4 (or higher) gem can be done using Lamby's `handled_proc` config. For example, appends these to your `config/environments/production.rb` file. Here we are ensuring that the LambdaPunch DRb server is running and that after each Lamby request we notify LambdaPunch.
|
40
40
|
|
41
41
|
```ruby
|
42
42
|
config.to_prepare { LambdaPunch.start_server! }
|
@@ -78,7 +78,7 @@ end
|
|
78
78
|
|
79
79
|
### ActiveJob
|
80
80
|
|
81
|
-
You can use LambdaPunch with Rails' ActiveJob. **For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/
|
81
|
+
You can use LambdaPunch with Rails' ActiveJob. **For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/rails-lambda/lambdakiq) gem.**
|
82
82
|
|
83
83
|
```ruby
|
84
84
|
config.active_job.queue_adapter = :lambda_punch
|
@@ -90,7 +90,7 @@ Your function's timeout is the max amount to handle the request and process all
|
|
90
90
|
|
91
91
|
If your application integrates with API Gateway (which has a 30 second timeout) then it is possible your function can be set with a higher timeout to perform background work. Since work is done after each invoke, the LambdaPunch queue should be empty when your function receives the `SHUTDOWN` event. If jobs are in the queue when this happens they will have two seconds max to work them down before being lost.
|
92
92
|
|
93
|
-
**For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/
|
93
|
+
**For a more robust background job solution, please consider using AWS SQS with the [Lambdakiq](https://github.com/rails-lambda/lambdakiq) gem.**
|
94
94
|
|
95
95
|
### Logging
|
96
96
|
|
@@ -140,7 +140,7 @@ You can also run the `./bin/console` command for an interactive prompt within th
|
|
140
140
|
|
141
141
|
## 💖 Contributing
|
142
142
|
|
143
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
143
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rails-lambda/lambda_punch. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/rails-lambda/lambda_punch/blob/main/CODE_OF_CONDUCT.md).
|
144
144
|
|
145
145
|
## 👩⚖️ License
|
146
146
|
|
@@ -148,4 +148,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
148
148
|
|
149
149
|
## 🤝 Code of Conduct
|
150
150
|
|
151
|
-
Everyone interacting in the LambdaPunch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
151
|
+
Everyone interacting in the LambdaPunch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rails-lambda/lambda_punch/blob/main/CODE_OF_CONDUCT.md).
|
data/lambda_punch.gemspec
CHANGED
@@ -7,11 +7,11 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.email = ["ken@metaskills.net"]
|
8
8
|
spec.summary = "LambdaPunch: Async Processing using Lambda Extensions"
|
9
9
|
spec.description = "LambdaPunch: Async Processing using Lambda Extensions"
|
10
|
-
spec.homepage = "https://github.com/
|
10
|
+
spec.homepage = "https://github.com/rails-lambda/lambda_punch"
|
11
11
|
spec.license = "MIT"
|
12
12
|
spec.metadata["homepage_uri"] = spec.homepage
|
13
|
-
spec.metadata["source_code_uri"] = "https://github.com/
|
14
|
-
spec.metadata["changelog_uri"] = "https://github.com/
|
13
|
+
spec.metadata["source_code_uri"] = "https://github.com/rails-lambda/lambda_punch"
|
14
|
+
spec.metadata["changelog_uri"] = "https://github.com/rails-lambda/lambda_punch/blob/main/CHANGELOG.md"
|
15
15
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
16
16
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features|images)/}) }
|
17
17
|
end
|
data/lib/lambda_punch/server.rb
CHANGED
data/lib/lambda_punch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lambda_punch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -146,14 +146,14 @@ files:
|
|
146
146
|
- lib/lambda_punch/tasks/install.rake
|
147
147
|
- lib/lambda_punch/version.rb
|
148
148
|
- lib/lambda_punch/worker.rb
|
149
|
-
homepage: https://github.com/
|
149
|
+
homepage: https://github.com/rails-lambda/lambda_punch
|
150
150
|
licenses:
|
151
151
|
- MIT
|
152
152
|
metadata:
|
153
|
-
homepage_uri: https://github.com/
|
154
|
-
source_code_uri: https://github.com/
|
155
|
-
changelog_uri: https://github.com/
|
156
|
-
post_install_message:
|
153
|
+
homepage_uri: https://github.com/rails-lambda/lambda_punch
|
154
|
+
source_code_uri: https://github.com/rails-lambda/lambda_punch
|
155
|
+
changelog_uri: https://github.com/rails-lambda/lambda_punch/blob/main/CHANGELOG.md
|
156
|
+
post_install_message:
|
157
157
|
rdoc_options: []
|
158
158
|
require_paths:
|
159
159
|
- lib
|
@@ -168,8 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
|
-
rubygems_version: 3.
|
172
|
-
signing_key:
|
171
|
+
rubygems_version: 3.2.3
|
172
|
+
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: 'LambdaPunch: Async Processing using Lambda Extensions'
|
175
175
|
test_files: []
|