rascal 0.3.1 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 572abe30bc6bf324db027831465e8727645f9a3baa86099f17b183990dadc112
4
- data.tar.gz: a3f022201df4025e5f967db4482bf25b9cfc8c20b99518ce905671415610ca90
3
+ metadata.gz: f4bf3ad1b4529196db3df33c0748dcc511b334d99c02ab457c74cb821eff8a1b
4
+ data.tar.gz: c3c7f9f856febd21b23195621081c0f22c63336c1f8e0362b1864cd0d3e365d1
5
5
  SHA512:
6
- metadata.gz: bb8692dd074d0ed5f6b266df552652dafcc79e89a7cbfbf17c4c624caf7d0a8fb96760d0feb8f4aabd384bb3ae5b809c99539faba3cb36f1ef13a1ff3f259542
7
- data.tar.gz: 07e7e1980a7b275c274448c4bd4961bd5a3a33a310c65453ab604ab27f7c9d1103e3d470d693066298b596c87dd43024dc2ac41b1d0a86fd5995055f8f0d6ede
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
@@ -5,7 +5,7 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
5
5
  # Specify your gem's dependencies in rascal.gemspec
6
6
  gemspec
7
7
 
8
- gem 'rake', '~> 10.0'
8
+ gem 'rake', '~> 13.0'
9
9
  gem 'rspec'
10
10
  gem 'cucumber'
11
11
  gem 'aruba'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rascal (0.3.1)
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.1)
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 (10.5.0)
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 (~> 10.0)
104
+ rake (~> 13.0)
106
105
  rascal!
107
106
  rspec
108
107
 
109
108
  BUNDLED WITH
110
- 2.1.4
109
+ 2.2.28
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rascal [![Build Status](https://travis-ci.org/makandra/rascal.svg?branch=master)](https://travis-ci.org/makandra/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
@@ -119,6 +119,7 @@ module Rascal
119
119
  image: service_config['name'],
120
120
  volumes: volumes,
121
121
  env_variables: env_variables,
122
+ command: service_config['command'],
122
123
  )
123
124
  end
124
125
  end
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Rascal
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.4"
3
3
  end
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.1
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: 2020-10-01 00:00:00.000000000 Z
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.1.4
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}