docker_toolkit 0.1.20 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bf86f05ad92b1bc8a9d2c716f4d43ed623822704d6b2f7f2cb1cd450bba045b
4
- data.tar.gz: 633486188aa3b061625e24d3e8b4b854a9e59b7ac2ca773a041ef6fef0b45c1c
3
+ metadata.gz: f203e1bb70de96bcdfdcb341bc0e4eb3466a2a2a8aa6ebc00653c9e26427674f
4
+ data.tar.gz: cbd053c7089875d83694327eea6bf0f7c19e6cb2912777fd6c7156f0bcf7d44f
5
5
  SHA512:
6
- metadata.gz: 1b228ca1cee6f826eadf20eb7fc8b1eeae3dd7a50b5e2e636e130904a5811107fde91f211324378510113b2ffb9bfdd39926a240e5089c51b18dab55eeaf1211
7
- data.tar.gz: 8cacc284e037a69dec8f61046c9b85cfdd0c2e02ca4399b6d4094d15293aff4bd4deed4b958b83ce564442a8bf0f11b049ad753ec44d0d01c042cc789e0dfa3e
6
+ metadata.gz: 64d05ccf038c5f4ed63de2c09071632065399f23f34bf3a6ad13d7ff7a877ee00d7c879596df4819a81676e910beb827fd9a4709f658d74c07f81825540cdce8
7
+ data.tar.gz: 38aac6414f3106ec403f8570314774c2de7d0b548400f9c6eb4d3ee53b382675253e1aa6788ec814ac63eb3283aabebac5974fd96effc70bf323c1c460dc3693
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- docker_toolkit (0.1.20)
4
+ docker_toolkit (0.1.21)
5
5
  diplomat
6
6
  dotenv
7
7
  json
data/bin/waiter.rb CHANGED
@@ -64,7 +64,7 @@ OptionParser.new do |o|
64
64
  @opts[:consul_service_count] = count.to_i
65
65
  end
66
66
 
67
- o.on("--consul-tag tag", 'Filter consul service by tag') do |tag|
67
+ o.on('--consul-tag tag', 'Filter consul service by tag') do |tag|
68
68
  @opts[:consul_tag] = tag.to_s
69
69
  end
70
70
 
@@ -156,7 +156,11 @@ def wait_for_consul_service(service)
156
156
  cmd = "curl -s #{@opts[:consul_addr]}/v1/health/service/#{service}?passing"
157
157
  cmd += "&tag=#{@opts[:consul_tag]}" if @opts[:consul_tag]
158
158
  result = `#{cmd}`
159
- result = JSON.parse(result) rescue []
159
+ result = begin
160
+ JSON.parse(result)
161
+ rescue StandardError
162
+ []
163
+ end
160
164
  result.count >= @opts[:consul_service_count]
161
165
  end
162
166
 
@@ -6,7 +6,7 @@ module DockerToolkit
6
6
 
7
7
  module Runner
8
8
 
9
- def init_service service
9
+ def init_service(service)
10
10
  STDOUT.sync = true
11
11
  STDERR.sync = true
12
12
 
@@ -34,6 +34,11 @@ module DockerToolkit
34
34
  envs
35
35
  end
36
36
 
37
+ def load_envs_from_consul(consul, service)
38
+ envs = execute!("consul.rb --consul=http://#{consul}:8500 --env services/env/#{service} --pristine -d", "Can't load envs")
39
+ load_envs(envs)
40
+ end
41
+
37
42
  def execute(cmd)
38
43
  puts "Executing: #{cmd}"
39
44
  output = `#{cmd}`
@@ -1,5 +1,5 @@
1
1
  module DockerToolkit
2
2
 
3
- VERSION = '0.1.20'.freeze
3
+ VERSION = '0.1.21'.freeze
4
4
 
5
5
  end
@@ -109,7 +109,7 @@ module DockerToolkit
109
109
  stdout: rout,
110
110
  stderr: rerr,
111
111
  stdin: process.io.stdin,
112
- termcmd: options[:termcmd],
112
+ termcmd: options[:termcmd]
113
113
  }
114
114
 
115
115
  @threads << Thread.new(meta[:stdout], STDOUT) do |io, out|
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.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Godko Ivan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-12 00:00:00.000000000 Z
12
+ date: 2018-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diplomat