aggkit 0.4.1 → 0.4.2

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: de3b3e58fad75455718b669cb92d79fa8f1e786f403291e6692ce381ba8ac8c3
4
- data.tar.gz: 9ee14a7a2d706199556dac49acc1e52273f1bd574de7122022295d5991cdd560
3
+ metadata.gz: ab6cac22dac0249fc83d081f2113c683582356457421f8732133b34806cbd080
4
+ data.tar.gz: 2b6d02dd149c8f22a0e7be48714b63c301f5774d573eb45df458b167608dbecc
5
5
  SHA512:
6
- metadata.gz: 791214ae9804d7bb28332c6aa5c5c8eb4d244ac5464a1a83250a6a9ae2fb400c261720cb1cb9e2b43401f2ce2eee15ea692b8966ee9632e87ffccddfad03ef54
7
- data.tar.gz: 9b8f555454809b7198ff16a6cf13195eb64e99447ec2577f3856a5ffe41cc6d3c127562d0583eaa79c1604da601d8896ba8e6813d456b5adb3ec6324c31b4fd7
6
+ metadata.gz: 7af45ebae48ebc2a27f3b5b15e9626e9f77bfb088bf3ecea41cfa3d942051e2985fe07472e0d5a30089b7c811b1368a7e9a105d9054f8e6854adfbc97eb552a6
7
+ data.tar.gz: c0371249778a7691ac6c055ae7a54eb8dd9006cff7a7d80068e6e8afdf9115eeca4351eb44562766299feb94d15d6ccebba3ad79e89d476aebe17833578c842d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aggkit (0.4.1)
4
+ aggkit (0.4.2)
5
5
  diplomat
6
6
  dotenv
7
7
  json
data/bin/aggstart CHANGED
@@ -4,6 +4,8 @@ require 'aggkit'
4
4
 
5
5
  UTIL = File.basename(__FILE__)
6
6
 
7
+ include Aggkit::Runner
8
+
7
9
  if ENV['CONSUL_HTTP_ADDR'].to_s.empty?
8
10
  ENV['CONSUL_HTTP_ADDR'] = "http://#{ENV['CONSUL_HOST'] || 'localhost'}:8500"
9
11
  end
@@ -13,7 +15,7 @@ end
13
15
  consul: ENV['CONSUL_HTTP_ADDR'],
14
16
  consulconf: [],
15
17
  depends: [],
16
- watch: true,
18
+ watch: true
17
19
  }
18
20
 
19
21
  @opts[:exec] = (begin
@@ -60,8 +62,6 @@ end
60
62
  parser.parse!
61
63
 
62
64
 
63
- include Aggkit::Runner
64
-
65
65
  die 'service name must be provided' if @opts[:service].to_s.empty?
66
66
 
67
67
  die 'exec script must be provided' if @opts[:exec].empty?
@@ -93,7 +93,8 @@ if @opts[:watch]
93
93
  "-config-dir #{folder}"
94
94
  end.join(' ').strip
95
95
 
96
- watcher.add *%W{"consul agent #{configs} -node #{@opts[:node_name]}}
96
+ consulcmd = %W["consul agent #{configs} -node #{@opts[:node_name]}]
97
+ watcher.add *consulcmd
97
98
  @opts[:consul] = ENV['CONSUL_HTTP_ADDR'] = 'localhost'
98
99
  end
99
100
 
@@ -105,5 +106,3 @@ else
105
106
  exec *@opts[:exec]
106
107
  end
107
108
 
108
-
109
-
data/bin/aggwait CHANGED
@@ -60,7 +60,6 @@ OptionParser.new do |o|
60
60
  end
61
61
 
62
62
  @opts[:consul_addr] = ENV['CONSUL_HTTP_ADDR']
63
-
64
63
  end
65
64
 
66
65
  o.on('--consul', 'Wait for local consul agent to be ready') do
data/bin/aggwrap CHANGED
@@ -58,6 +58,8 @@ STDOUT.sync
58
58
 
59
59
  UTIL = File.basename(__FILE__)
60
60
 
61
+ include Aggkit::Runner
62
+
61
63
  if ENV['CONSUL_HTTP_ADDR'].to_s.empty?
62
64
  ENV['CONSUL_HTTP_ADDR'] = "http://#{ENV['CONSUL_HOST'] || 'localhost'}:8500"
63
65
  end
@@ -1,6 +1,6 @@
1
1
  module Aggkit
2
2
 
3
- VERSION = '0.4.1'.freeze
3
+ VERSION = '0.4.2'.freeze
4
4
 
5
5
  end
6
6
 
@@ -40,7 +40,7 @@ module Aggkit
40
40
 
41
41
  def add(*cmd)
42
42
  log "Starting #{cmd}..."
43
- @procs.push ProcessHandler.new(self, *cmd)
43
+ @procs.push ProcessHandler.new(self, *cmd.flatten)
44
44
  log " * PID: #{@procs.last.pid}"
45
45
  @procs.last
46
46
  end
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.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Godko Ivan