aggkit 0.4.0.9101 → 0.4.0.9107

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/bin/aggwait +14 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4048b6adcf959efa8454bea668f16e9a5b3adb6
4
- data.tar.gz: 42fff410370f0d416adef25c2bcc953f097f174a
3
+ metadata.gz: 8738f257fab1dc505137762ef9bd39443ae56a83
4
+ data.tar.gz: 4315e9cd08473e44945d69e2bd8b11ec103421cf
5
5
  SHA512:
6
- metadata.gz: 532caf25290567f43dec1c6053189c8312d76158d146b1a770311063dd9372046ef4d27394c61eebe3f9202fa0c940b59d0485b0edf9e9d8437787bb8e760ea0
7
- data.tar.gz: 8bc491435b84e27029d7408a29d01394b4687c020d77b5b975edd8bf6a110fc3d13c501636bf74db3cb2c57ed0e37aeac2de388efe772b770025a62e740bfdd5
6
+ metadata.gz: 1790ae7a61b2d2932b644879c96d35fdc2f9fefd05f28093b1da30420f8ef2f69687edaf07a6fc73813416f37bce42ef81dbf830ace30c9525d694f699e6ef67
7
+ data.tar.gz: 2a40a3725bb183954d8b0f66b36f60a22053e0aff1fdcc3d5c89c65e715ebe0fb90720895038c3202aa695813efaa784682ca2ed3da33b574a485c50497a8535
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aggkit (0.4.0.9101)
4
+ aggkit (0.4.0.9107)
5
5
  diplomat
6
6
  dotenv
7
7
  json
data/bin/aggwait CHANGED
@@ -15,6 +15,10 @@ INTERVAL = 3
15
15
 
16
16
  @opts = {}
17
17
 
18
+ if ENV['CONSUL_HTTP_ADDR'].to_s.empty?
19
+ ENV['CONSUL_HTTP_ADDR'] = "http://#{ENV['CONSUL_HOST'] || 'localhost'}:8500"
20
+ end
21
+
18
22
  @opts[:exec] = (begin
19
23
  ARGV.join(' ').split(' -- ')[1].strip
20
24
  rescue StandardError
@@ -22,7 +26,7 @@ INTERVAL = 3
22
26
  end)
23
27
  @opts[:timeout] = TIMEOUT
24
28
  @opts[:interval] = INTERVAL
25
- @opts[:consul_addr] = 'http://localhost:8500'
29
+ @opts[:consul_addr] = ENV['CONSUL_HTTP_ADDR']
26
30
  @opts[:consul_service_count] = 1
27
31
 
28
32
 
@@ -48,8 +52,15 @@ OptionParser.new do |o|
48
52
  @opts[:file] = file.strip
49
53
  end
50
54
 
51
- o.on("--consul-addr addr=#{@opts[:consul_addr]}", 'HTTP addres to connect to consul') do |addr|
52
- @opts[:consul_addr] = addr.strip
55
+ o.on("--consul-addr addr=#{@opts[:consul_addr]}", 'HTTP addres to connect to consul') do |consul|
56
+ ENV['CONSUL_HTTP_ADDR'] = if consul.to_s['http']
57
+ consul.to_s
58
+ else
59
+ "http://#{consul}:8500"
60
+ end
61
+
62
+ @opts[:consul_addr] = ENV['CONSUL_HTTP_ADDR']
63
+
53
64
  end
54
65
 
55
66
  o.on('--consul', 'Wait for local consul agent to be ready') do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aggkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.9101
4
+ version: 0.4.0.9107
5
5
  platform: ruby
6
6
  authors:
7
7
  - Godko Ivan