rascal 0.3.1 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +31 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +5 -6
- data/README.md +1 -1
- data/lib/rascal/docker/container.rb +5 -4
- data/lib/rascal/environments_definition/gitlab.rb +1 -0
- data/lib/rascal/service.rb +4 -3
- data/lib/rascal/version.rb +1 -1
- data/rascal.gemspec +1 -0
- metadata +5 -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: f4bf3ad1b4529196db3df33c0748dcc511b334d99c02ab457c74cb821eff8a1b
|
4
|
+
data.tar.gz: c3c7f9f856febd21b23195621081c0f22c63336c1f8e0362b1864cd0d3e365d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56f02d5f64b911abde9dcc6ee44def8fec82ab78705b3879f171589f68b4aa662473e0bc8e372bb1122dc739c9762c9b3d8ba9295817410224951b226e044cfd
|
7
|
+
data.tar.gz: dec85393c9074c9ad305962e051e5b0dc49671d5e84a2acba653840ed11c33e60cbed83a8975ef824485c5becfeea9261e4d88a84a358ffe9bf12035b61a6f25
|
@@ -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,21 @@ 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.4 (2022-03-16)
|
8
|
+
|
9
|
+
- Activate Rubygems MFA
|
10
|
+
|
11
|
+
|
12
|
+
## 0.3.3 (2021-12-08)
|
13
|
+
|
14
|
+
- Support `command` key in services.
|
15
|
+
|
16
|
+
|
17
|
+
## 0.3.2 (2020-10-23)
|
18
|
+
|
19
|
+
- Fix broken `rascal shell` command.
|
20
|
+
|
21
|
+
|
7
22
|
## 0.3.1 (2020-10-01)
|
8
23
|
|
9
24
|
- Pass env variables to service containers.
|
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.4)
|
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,9 +101,9 @@ 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
|
|
109
108
|
BUNDLED WITH
|
110
|
-
2.
|
109
|
+
2.2.28
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Rascal [![
|
1
|
+
# Rascal [![Tests](https://github.com/makandra/rascal/workflows/Tests/badge.svg)](https://github.com/makandra/rascal/actions)
|
2
2
|
|
3
3
|
### Use CI environments locally. Not quite a vagrant.
|
4
4
|
|
@@ -40,26 +40,27 @@ 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) 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',
|
49
|
-
*env_args(env),
|
50
49
|
id,
|
51
50
|
)
|
52
51
|
end
|
53
52
|
|
54
|
-
def create(network: nil, network_alias: nil, volumes: [])
|
53
|
+
def create(network: nil, network_alias: nil, volumes: [], env: {}, command: [])
|
55
54
|
@id = Docker.interface.run(
|
56
55
|
'container',
|
57
56
|
'create',
|
58
57
|
'--name', @prefixed_name,
|
59
58
|
*(volumes.flat_map { |v| ['-v', v.to_param] }),
|
59
|
+
*env_args(env),
|
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
data/rascal.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.metadata["homepage_uri"] = spec.homepage
|
20
20
|
spec.metadata["source_code_uri"] = "https://github.com/makandra/rascal"
|
21
21
|
spec.metadata["changelog_uri"] = "https://github.com/makandra/rascal/blob/master/CHANGELOG.md"
|
22
|
+
spec.metadata["rubygems_mfa_required"] = 'true'
|
22
23
|
else
|
23
24
|
raise "RubyGems 2.0 or newer is required to protect against " \
|
24
25
|
"public gem pushes."
|
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.4
|
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: 2022-03-16 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
|
@@ -76,6 +76,7 @@ metadata:
|
|
76
76
|
homepage_uri: https://github.com/makandra/rascal
|
77
77
|
source_code_uri: https://github.com/makandra/rascal
|
78
78
|
changelog_uri: https://github.com/makandra/rascal/blob/master/CHANGELOG.md
|
79
|
+
rubygems_mfa_required: 'true'
|
79
80
|
post_install_message:
|
80
81
|
rdoc_options: []
|
81
82
|
require_paths:
|
@@ -91,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
92
|
- !ruby/object:Gem::Version
|
92
93
|
version: '0'
|
93
94
|
requirements: []
|
94
|
-
rubygems_version: 3.
|
95
|
+
rubygems_version: 3.3.9
|
95
96
|
signing_key:
|
96
97
|
specification_version: 4
|
97
98
|
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}
|