docker_toolkit 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/docker_toolkit.gemspec +1 -1
- data/lib/docker_toolkit.rb +2 -3
- data/lib/docker_toolkit/runner.rb +41 -0
- data/lib/docker_toolkit/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 254725d84611e9033ec506f86f0ee1c640f87866c68449234fbfcee768a9c6bf
|
4
|
+
data.tar.gz: 38fe06543fb8988a77dbc06c3aad636412f6bb82b31b8dfc30a3cfb775f75f5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff340a5aef5d4abd537b1b07c3d1e5b0cab3e82b29570ef59ce436206cb213048edfcbeb8debaa22b21482e22d329629daed9a5cb29ec52f0946c44822eaa899
|
7
|
+
data.tar.gz: 93ebdc671a9aecf8b86ef3529941791ab678b967eecbc0bb12c94808568636a3ccf163eb86d12add70a9eef3d42ff0c3707ce5ce000c9798409518f81530722a
|
data/Gemfile.lock
CHANGED
data/docker_toolkit.gemspec
CHANGED
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
|
28
28
|
|
29
29
|
spec.add_dependency 'diplomat'
|
30
|
-
spec.add_dependency 'json'
|
31
30
|
spec.add_dependency 'dotenv'
|
31
|
+
spec.add_dependency 'json'
|
32
32
|
|
33
33
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
34
34
|
spec.add_development_dependency 'rake', '~> 10.0'
|
data/lib/docker_toolkit.rb
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
require 'diplomat'
|
2
2
|
require 'English'
|
3
3
|
require 'optparse'
|
4
|
-
|
4
|
+
require 'dotenv'
|
5
5
|
|
6
6
|
|
7
7
|
require 'docker_toolkit/version'
|
8
8
|
require 'docker_toolkit/watcher'
|
9
|
+
require 'docker_toolkit/runner'
|
9
10
|
require 'docker_toolkit/childprocess'
|
10
11
|
|
11
12
|
module DockerToolkit
|
12
13
|
|
13
|
-
|
14
|
-
|
15
14
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
module DockerToolkit
|
4
|
+
|
5
|
+
module Runner
|
6
|
+
|
7
|
+
def error(message)
|
8
|
+
STDERR.puts "Error: #{message}"
|
9
|
+
end
|
10
|
+
|
11
|
+
def die(message)
|
12
|
+
error(message)
|
13
|
+
exit 1
|
14
|
+
end
|
15
|
+
|
16
|
+
def load_envs(string, env = ENV)
|
17
|
+
envs Dotenv::Parser.new(string).call
|
18
|
+
envs.each_pair do |k, v|
|
19
|
+
env[k] = v
|
20
|
+
end
|
21
|
+
envs
|
22
|
+
end
|
23
|
+
|
24
|
+
def execute(cmd)
|
25
|
+
`#{cmd}`
|
26
|
+
end
|
27
|
+
|
28
|
+
def execute!(cmd, error = nil)
|
29
|
+
output = execute(cmd)
|
30
|
+
$CHILD_STATUS.success? || die(error || "Can't execute: #{cmd}")
|
31
|
+
output
|
32
|
+
end
|
33
|
+
|
34
|
+
def ensure_env_defined!(key, env = ENV)
|
35
|
+
env.key?(key) || die("Environment variable #{key} must present!")
|
36
|
+
env[key]
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Godko Ivan
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: dotenv
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: json
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- lib/docker_toolkit/childprocess/windows/process.rb
|
139
139
|
- lib/docker_toolkit/childprocess/windows/process_builder.rb
|
140
140
|
- lib/docker_toolkit/childprocess/windows/structs.rb
|
141
|
+
- lib/docker_toolkit/runner.rb
|
141
142
|
- lib/docker_toolkit/version.rb
|
142
143
|
- lib/docker_toolkit/watcher.rb
|
143
144
|
homepage: https://github.com/RnD-Soft/docker_toolkit
|
@@ -160,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
161
|
version: '0'
|
161
162
|
requirements: []
|
162
163
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.7.
|
164
|
+
rubygems_version: 2.7.3
|
164
165
|
signing_key:
|
165
166
|
specification_version: 4
|
166
167
|
summary: Helper scripts for work with docker and consul
|