Skip to content

Commit b505a0e

Browse files
committed
Fix installer. Devcontainer.
1 parent d44e3a5 commit b505a0e

File tree

17 files changed

+62
-57
lines changed

17 files changed

+62
-57
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM mcr.microsoft.com/devcontainers/ruby:3.1

.devcontainer/devcontainer.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
}

.devcontainer/postCreate.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/test.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ name: Test
22
on: [push]
33
jobs:
44
test:
5-
runs-on: ubuntu-latest
5+
runs-on: ubuntu-20.04
66
steps:
77
- 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

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.1.1] - 2023-04-16
2+
3+
### Fixed
4+
5+
- The `lambda_punch` install file.
6+
17
## [1.1.0] - 2023-04-16
28

39
### Added

Dockerfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

Gemfile.lock

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
lambda_punch (1.0.3)
4+
lambda_punch (1.1.1)
55
concurrent-ruby
66
rake
77
rb-inotify
@@ -74,7 +74,7 @@ GEM
7474
concurrent-ruby (1.1.9)
7575
crass (1.0.6)
7676
erubi (1.10.0)
77-
ffi (1.15.4)
77+
ffi (1.15.5)
7878
globalid (0.5.2)
7979
activesupport (>= 5.0)
8080
i18n (1.8.10)
@@ -87,11 +87,13 @@ GEM
8787
marcel (1.0.2)
8888
method_source (1.0.0)
8989
mini_mime (1.1.2)
90+
mini_portile2 (2.6.1)
9091
minitest (5.14.4)
9192
minitest-focus (1.3.1)
9293
minitest (>= 4, < 6)
9394
nio4r (2.5.8)
94-
nokogiri (1.12.5-x86_64-linux)
95+
nokogiri (1.12.5)
96+
mini_portile2 (~> 2.6.1)
9597
racc (~> 1.4)
9698
pry (0.14.1)
9799
coderay (~> 1.1)
@@ -137,7 +139,7 @@ GEM
137139
activesupport (>= 4.0)
138140
sprockets (>= 3.0.0)
139141
thor (1.1.0)
140-
timeout (0.2.0)
142+
timeout (0.3.2)
141143
tzinfo (2.0.4)
142144
concurrent-ruby (~> 1.0)
143145
websocket-driver (0.7.5)
@@ -146,6 +148,8 @@ GEM
146148
zeitwerk (2.5.1)
147149

148150
PLATFORMS
151+
aarch64-linux
152+
arm64-darwin-22
149153
x86_64-linux
150154

151155
DEPENDENCIES

bin/_setup

Lines changed: 0 additions & 6 deletions
This file was deleted.

bin/_test

Lines changed: 0 additions & 4 deletions
This file was deleted.

bin/bootstrap

Lines changed: 0 additions & 6 deletions
This file was deleted.

bin/run

Lines changed: 0 additions & 6 deletions
This file was deleted.

bin/setup

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
set -e
33

4-
docker-compose run \
5-
lambdapunch \
6-
./bin/_setup
4+
echo '== Installing dependencies =='
5+
bundle config set --local path 'vendor/bundle'
6+
bundle install

bin/test

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/bin/sh
22
set -e
33

4-
docker-compose run \
5-
lambdapunch \
6-
./bin/_test
4+
bundle exec rake test

docker-compose.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

exe/lambda_punch

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require 'rubygems'
44
require 'rake'
55

6+
spec = Gem::Specification.find_by_name 'lambda_punch'
67
load "#{spec.gem_dir}/lib/lambda_punch/tasks/install.rake"
78

89
command = ARGV[0] || 'install'

lib/lambda_punch/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module LambdaPunch
2-
VERSION = "1.1.0"
2+
VERSION = "1.1.1"
33
end

test/cases/rake_test.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
load 'lambda_punch/tasks/install.rake'
33

44
class RakeTest < LambdaPunchSpec
5-
65
before do
76
FileUtils.rm_rf '/opt/extensions'
87
end
@@ -13,4 +12,10 @@ class RakeTest < LambdaPunchSpec
1312
assert File.exist?('/opt/extensions/lambdapunch')
1413
end
1514

15+
it 'has an exec installer' do
16+
root = File.expand_path(File.join __FILE__, '..', '..', '..')
17+
exe = "#{root}/exe/lambda_punch"
18+
`#{exe} install`
19+
assert File.exist?('/opt/extensions/lambdapunch')
20+
end
1621
end

0 commit comments

Comments
 (0)