rascal 0.3.2 → 0.3.3
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/.github/workflows/test.yml +31 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +4 -5
- data/README.md +1 -1
- data/lib/rascal/docker/container.rb +4 -3
- data/lib/rascal/environments_definition/gitlab.rb +1 -0
- data/lib/rascal/service.rb +4 -3
- data/lib/rascal/version.rb +1 -1
- metadata +4 -4
- data/.travis.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3547e2d61b8a7dd5d5b90fa802c9c5345dfa0991765455f4c50750cf477d7ae9
|
4
|
+
data.tar.gz: cb4d2c0458ea759bab8607d6ec4a5320ffa63723701481f784482f2bbc912405
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51d36be1d236eed7397cc8b454e599e27812b8821f28ce591a1b11d8a08b1a720ccf6a51fa39b1dd32d40a85442342498f91c0323e01d5522bd838aa3f50ee60
|
7
|
+
data.tar.gz: ef6fc4a2ab0f26c660151dd83878b9ccce5a3a5504b6626e0b53718be01e03b4369491f11271ed14b6d470d5fb76efc7a01c359fe2d0c102b5e8f2b55b86e40a
|
@@ -0,0 +1,31 @@
|
|
1
|
+
name: Tests
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
pull_request:
|
7
|
+
branches:
|
8
|
+
- master
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-20.04
|
12
|
+
strategy:
|
13
|
+
fail-fast: false
|
14
|
+
matrix:
|
15
|
+
include:
|
16
|
+
- ruby: 2.5.8
|
17
|
+
gemfile: Gemfile
|
18
|
+
env:
|
19
|
+
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v2
|
22
|
+
- name: Install ruby
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: "${{ matrix.ruby }}"
|
26
|
+
- name: Bundle
|
27
|
+
run: |
|
28
|
+
gem install bundler:2.1.4
|
29
|
+
bundle install --no-deployment
|
30
|
+
- name: Run tests
|
31
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented here.
|
|
4
4
|
|
5
5
|
Rascal follows semantic versioning. This has little consequence pre 1.0, so expect breaking changes.
|
6
6
|
|
7
|
+
## 0.3.3 (2021-12-08)
|
8
|
+
|
9
|
+
- Support `command` key in services.
|
10
|
+
|
11
|
+
|
7
12
|
## 0.3.2 (2020-10-23)
|
8
13
|
|
9
14
|
- Fix broken `rascal shell` command.
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rascal (0.3.
|
4
|
+
rascal (0.3.3)
|
5
5
|
thor (~> 0.20.3)
|
6
6
|
|
7
7
|
GEM
|
@@ -16,8 +16,7 @@ GEM
|
|
16
16
|
thor (~> 0.19)
|
17
17
|
backports (3.12.0)
|
18
18
|
builder (3.2.3)
|
19
|
-
childprocess (1.0.
|
20
|
-
rake (< 13.0)
|
19
|
+
childprocess (1.0.0)
|
21
20
|
coderay (1.1.2)
|
22
21
|
contracts (0.16.0)
|
23
22
|
cucumber (3.1.2)
|
@@ -73,7 +72,7 @@ GEM
|
|
73
72
|
pry (0.12.2)
|
74
73
|
coderay (~> 1.1.0)
|
75
74
|
method_source (~> 0.9.0)
|
76
|
-
rake (
|
75
|
+
rake (13.0.1)
|
77
76
|
rb-fsevent (0.10.3)
|
78
77
|
rb-inotify (0.10.0)
|
79
78
|
ffi (~> 1.0)
|
@@ -102,7 +101,7 @@ DEPENDENCIES
|
|
102
101
|
cucumber
|
103
102
|
guard-cucumber
|
104
103
|
guard-rspec
|
105
|
-
rake (~>
|
104
|
+
rake (~> 13.0)
|
106
105
|
rascal!
|
107
106
|
rspec
|
108
107
|
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Rascal [](https://github.com/makandra/rascal/actions)
|
2
2
|
|
3
3
|
### Use CI environments locally. Not quite a vagrant.
|
4
4
|
|
@@ -40,9 +40,9 @@ module Rascal
|
|
40
40
|
!!id
|
41
41
|
end
|
42
42
|
|
43
|
-
def start(network: nil, network_alias: nil, volumes: [], env: {})
|
43
|
+
def start(network: nil, network_alias: nil, volumes: [], env: {}, command: [])
|
44
44
|
say "Starting container for #{@name}"
|
45
|
-
create(network: network, network_alias: network_alias, volumes: volumes, env: env) unless exists?
|
45
|
+
create(network: network, network_alias: network_alias, volumes: volumes, env: env, command: command) unless exists?
|
46
46
|
Docker.interface.run(
|
47
47
|
'container',
|
48
48
|
'start',
|
@@ -50,7 +50,7 @@ module Rascal
|
|
50
50
|
)
|
51
51
|
end
|
52
52
|
|
53
|
-
def create(network: nil, network_alias: nil, volumes: [], env: {})
|
53
|
+
def create(network: nil, network_alias: nil, volumes: [], env: {}, command: [])
|
54
54
|
@id = Docker.interface.run(
|
55
55
|
'container',
|
56
56
|
'create',
|
@@ -60,6 +60,7 @@ module Rascal
|
|
60
60
|
*(['--network', network.id] if network),
|
61
61
|
*(['--network-alias', network_alias] if network_alias),
|
62
62
|
@image,
|
63
|
+
*command,
|
63
64
|
output: :id,
|
64
65
|
)
|
65
66
|
end
|
data/lib/rascal/service.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
module Rascal
|
2
2
|
class Service
|
3
|
-
attr_reader :name, :container, :alias, :env_variables
|
3
|
+
attr_reader :name, :container, :alias, :env_variables, :command
|
4
4
|
|
5
|
-
def initialize(name, env_variables: {}, image:, alias_name:, volumes: [])
|
5
|
+
def initialize(name, env_variables: {}, image:, alias_name:, volumes: [], command: nil)
|
6
6
|
@name = name
|
7
7
|
@container = Docker::Container.new(name, image)
|
8
8
|
@alias = alias_name
|
9
9
|
@volumes = volumes
|
10
10
|
@env_variables = env_variables
|
11
|
+
@command = [*command]
|
11
12
|
end
|
12
13
|
|
13
14
|
def download_missing
|
@@ -16,7 +17,7 @@ module Rascal
|
|
16
17
|
|
17
18
|
def start_if_stopped(network: nil)
|
18
19
|
unless @container.running?
|
19
|
-
@container.start(network: network, network_alias: @alias, volumes: @volumes, env: @env_variables)
|
20
|
+
@container.start(network: network, network_alias: @alias, volumes: @volumes, env: @env_variables, command: @command)
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
data/lib/rascal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rascal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Kraze
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -32,10 +32,10 @@ executables:
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
+
- ".github/workflows/test.yml"
|
35
36
|
- ".gitignore"
|
36
37
|
- ".rspec"
|
37
38
|
- ".ruby-version"
|
38
|
-
- ".travis.yml"
|
39
39
|
- CHANGELOG.md
|
40
40
|
- Gemfile
|
41
41
|
- Gemfile.lock
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
rubygems_version: 3.
|
94
|
+
rubygems_version: 3.2.33
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Spin up CI environments locally.
|
data/.travis.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# yes, we use travis for open source gems
|
2
|
-
|
3
|
-
language: ruby
|
4
|
-
rvm:
|
5
|
-
- '2.5.4'
|
6
|
-
gemfile:
|
7
|
-
- Gemfile
|
8
|
-
script: bundle exec rake
|
9
|
-
sudo: false
|
10
|
-
cache: vendor/bundler
|
11
|
-
notifications:
|
12
|
-
email:
|
13
|
-
- fail@makandra.de
|
14
|
-
install:
|
15
|
-
- gem install bundler:2.1.4
|
16
|
-
- bundle install --no-deployment --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|