lambda_punch 1.1.0 → 1.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad3d3b5bc8d71f3ec550dc01f998e4df18c77b839b9dd4c44d010a08b5bf25d5
4
- data.tar.gz: 106ecd9404fe6a570166f5a2dfc6e7654f427aec9fc1e77df2154d4031409982
3
+ metadata.gz: b826578d6414ae21136aaf6fded729bdad3e8371a9188893ddf19b4fda605c4a
4
+ data.tar.gz: 5b48b72138fd2ffa9fb652a211cf3ae3381d4c683cc8332c7c1282731e259c83
5
5
  SHA512:
6
- metadata.gz: e9526b2c0ec7490eeb323df242a0b2537cc3c783aad1c6bd622bdec58354abb1f5b0230833947ded1f8242eacd1d15625cc581a34e6d822e3343adc3732124cb
7
- data.tar.gz: 105223ed92a8f3782e376f9d3d472d70d0a807a984a5f94425d3332450fae150dcf20c67771898741dc2134efa67c8db262dd8efb14ddfe89dc46d6cc2214870
6
+ metadata.gz: b9a83c78d41c2da7b6c6383052742820a7ac75cd7fe196de72034c7ae9a3cd65b6aa0d65005f311845e3af92464663efd97e7cdc8abb96cb47449795c11f62bd
7
+ data.tar.gz: ecc1490c19bf505e14c0957de2570d59c54ebccd9158d96d9e24d388b4abc54cb4960676bdcbb0df71ae00e9e9b60967643aacddf64c71dcd4ab841138b21d04
@@ -0,0 +1 @@
1
+ FROM mcr.microsoft.com/devcontainers/ruby:3.1
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "lambda_punch",
3
+ "build": {
4
+ "dockerfile": "Dockerfile"
5
+ },
6
+ "features": {
7
+ "ghcr.io/devcontainers/features/sshd:latest": {}
8
+ },
9
+ "customizations": {
10
+ "vscode": {
11
+ "settings": {
12
+ "editor.formatOnSave": true
13
+ },
14
+ "extensions": []
15
+ }
16
+ },
17
+ "postCreateCommand": ".devcontainer/postCreate.sh",
18
+ "remoteUser": "vscode"
19
+ }
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ sudo rm -rf /opt
5
+ sudo mkdir /opt
6
+ sudo chown -R $USER /opt
@@ -2,16 +2,15 @@ name: Test
2
2
  on: [push]
3
3
  jobs:
4
4
  test:
5
- runs-on: ubuntu-latest
5
+ runs-on: ubuntu-20.04
6
6
  steps:
7
7
  - name: Checkout
8
- uses: actions/checkout@v2
9
- - name: Bootstrap
10
- run: |
11
- ./bin/bootstrap
12
- - name: Setup
13
- run: |
14
- ./bin/setup
15
- - name: Test
16
- run: |
17
- ./bin/test
8
+ uses: actions/checkout@v3
9
+ - name: Setup & Test
10
+ uses: devcontainers/ci@v0.3
11
+ with:
12
+ env: |
13
+ CI
14
+ runCmd: |
15
+ ./bin/setup
16
+ ./bin/test
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [1.1.2] - 2023-04-22
2
+
3
+ ### Added
4
+
5
+ - The `error_handler` will now print the first 10 lines of a stack trace.
6
+
7
+ ## [1.1.1] - 2023-04-16
8
+
9
+ ### Fixed
10
+
11
+ - The `lambda_punch` install file.
12
+
1
13
  ## [1.1.0] - 2023-04-16
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.0.3)
4
+ lambda_punch (1.1.1)
5
5
  concurrent-ruby
6
6
  rake
7
7
  rb-inotify
@@ -74,7 +74,7 @@ GEM
74
74
  concurrent-ruby (1.1.9)
75
75
  crass (1.0.6)
76
76
  erubi (1.10.0)
77
- ffi (1.15.4)
77
+ ffi (1.15.5)
78
78
  globalid (0.5.2)
79
79
  activesupport (>= 5.0)
80
80
  i18n (1.8.10)
@@ -87,11 +87,13 @@ GEM
87
87
  marcel (1.0.2)
88
88
  method_source (1.0.0)
89
89
  mini_mime (1.1.2)
90
+ mini_portile2 (2.6.1)
90
91
  minitest (5.14.4)
91
92
  minitest-focus (1.3.1)
92
93
  minitest (>= 4, < 6)
93
94
  nio4r (2.5.8)
94
- nokogiri (1.12.5-x86_64-linux)
95
+ nokogiri (1.12.5)
96
+ mini_portile2 (~> 2.6.1)
95
97
  racc (~> 1.4)
96
98
  pry (0.14.1)
97
99
  coderay (~> 1.1)
@@ -137,7 +139,7 @@ GEM
137
139
  activesupport (>= 4.0)
138
140
  sprockets (>= 3.0.0)
139
141
  thor (1.1.0)
140
- timeout (0.2.0)
142
+ timeout (0.3.2)
141
143
  tzinfo (2.0.4)
142
144
  concurrent-ruby (~> 1.0)
143
145
  websocket-driver (0.7.5)
@@ -146,6 +148,8 @@ GEM
146
148
  zeitwerk (2.5.1)
147
149
 
148
150
  PLATFORMS
151
+ aarch64-linux
152
+ arm64-darwin-22
149
153
  x86_64-linux
150
154
 
151
155
  DEPENDENCIES
data/README.md CHANGED
@@ -24,12 +24,18 @@ 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.custominktech.com/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 permissions to create an `/opt/extensions` directory.
27
+ Within your project or [Rails application's](https://lamby.custominktech.com/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
31
31
  ```
32
32
 
33
+ LambdaPunch uses the `LAMBDA_TASK_ROOT` environment variable to find your project's Gemfile. If you are using a provided AWS Runtime container, this should be set for you to `/var/task`. However, if you are using your own base image, make sure to set this to your project directory.
34
+
35
+ ```dockerfile
36
+ ENV LAMBDA_TASK_ROOT=/app
37
+ ```
38
+
33
39
  Installation with AWS Lambda via the [Lamby](https://lamby.custominktech.com/) 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.
34
40
 
35
41
  ```ruby
data/bin/setup CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/bin/sh
2
2
  set -e
3
3
 
4
- docker-compose run \
5
- lambdapunch \
6
- ./bin/_setup
4
+ echo '== Installing dependencies =='
5
+ bundle config set --local path 'vendor/bundle'
6
+ bundle install
data/bin/test CHANGED
@@ -1,6 +1,4 @@
1
1
  #!/bin/sh
2
2
  set -e
3
3
 
4
- docker-compose run \
5
- lambdapunch \
6
- ./bin/_test
4
+ bundle exec rake test
data/exe/lambda_punch CHANGED
@@ -3,6 +3,7 @@
3
3
  require 'rubygems'
4
4
  require 'rake'
5
5
 
6
+ spec = Gem::Specification.find_by_name 'lambda_punch'
6
7
  load "#{spec.gem_dir}/lib/lambda_punch/tasks/install.rake"
7
8
 
8
9
  command = ARGV[0] || 'install'
@@ -1,3 +1,3 @@
1
1
  module LambdaPunch
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.2"
3
3
  end
data/lib/lambda_punch.rb CHANGED
@@ -51,6 +51,7 @@ module LambdaPunch
51
51
  def error_handler
52
52
  @error_handler ||= lambda do |e|
53
53
  logger.error "Queue#call::error => #{e.message}"
54
+ logger.error e.backtrace[0..10].join("\n")
54
55
  end
55
56
  end
56
57
 
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.0
4
+ version: 1.1.2
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: 2023-04-16 00:00:00.000000000 Z
11
+ date: 2023-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -116,24 +116,21 @@ executables:
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
+ - ".devcontainer/Dockerfile"
120
+ - ".devcontainer/devcontainer.json"
121
+ - ".devcontainer/postCreate.sh"
119
122
  - ".github/workflows/test.yml"
120
123
  - ".gitignore"
121
124
  - CHANGELOG.md
122
125
  - CODE_OF_CONDUCT.md
123
- - Dockerfile
124
126
  - Gemfile
125
127
  - Gemfile.lock
126
128
  - LICENSE.txt
127
129
  - README.md
128
130
  - Rakefile
129
- - bin/_setup
130
- - bin/_test
131
- - bin/bootstrap
132
131
  - bin/console
133
- - bin/run
134
132
  - bin/setup
135
133
  - bin/test
136
- - docker-compose.yml
137
134
  - exe/lambda_punch
138
135
  - lambda_punch.gemspec
139
136
  - lib/lambda_punch.rb
@@ -156,7 +153,7 @@ metadata:
156
153
  homepage_uri: https://github.com/customink/lambda_punch
157
154
  source_code_uri: https://github.com/customink/lambda_punch
158
155
  changelog_uri: https://github.com/customink/lambda_punch/blob/main/CHANGELOG.md
159
- post_install_message:
156
+ post_install_message:
160
157
  rdoc_options: []
161
158
  require_paths:
162
159
  - lib
@@ -171,8 +168,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
168
  - !ruby/object:Gem::Version
172
169
  version: '0'
173
170
  requirements: []
174
- rubygems_version: 3.4.7
175
- signing_key:
171
+ rubygems_version: 3.0.3.1
172
+ signing_key:
176
173
  specification_version: 4
177
174
  summary: 'LambdaPunch: Async Processing using Lambda Extensions'
178
175
  test_files: []
data/Dockerfile DELETED
@@ -1,2 +0,0 @@
1
- FROM public.ecr.aws/sam/build-ruby2.7
2
- WORKDIR /var/task
data/bin/_setup DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/sh
2
- set -e
3
-
4
- echo '== Installing dependencies =='
5
- bundle config set --local path 'vendor/bundle'
6
- bundle install
data/bin/_test DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- set -e
3
-
4
- bundle exec rake test
data/bin/bootstrap DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/sh
2
- set -e
3
-
4
- echo '== Building containers =='
5
- docker pull public.ecr.aws/sam/build-ruby2.7
6
- docker-compose build
data/bin/run DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/sh
2
- set -e
3
-
4
- docker-compose run \
5
- lambdapunch \
6
- $@
data/docker-compose.yml DELETED
@@ -1,10 +0,0 @@
1
- version: '3.7'
2
- services:
3
- lambdapunch:
4
- build:
5
- context: .
6
- dockerfile: Dockerfile
7
- environment:
8
- - CI=${CI}
9
- volumes:
10
- - ${PWD}:/var/task:delegated