aggkit 0.3.1.8768 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +27 -4
- data/Gemfile +3 -0
- data/Gemfile.lock +12 -6
- data/aggkit.gemspec +3 -2
- data/bin/agg +52 -33
- data/bin/aggci +31 -26
- data/bin/aggconsul +16 -15
- data/bin/agggen +31 -34
- data/bin/agglock +5 -4
- data/bin/aggmerge +33 -28
- data/bin/aggstart +19 -22
- data/bin/aggterm +3 -2
- data/bin/aggwait +5 -3
- data/bin/aggwrap +250 -0
- data/lib/aggkit/ci.rb +62 -67
- data/lib/aggkit/env.rb +119 -103
- data/lib/aggkit/option_parser.rb +10 -7
- data/lib/aggkit/runner.rb +2 -3
- data/lib/aggkit/version.rb +2 -1
- data/lib/aggkit/watcher.rb +5 -4
- data/lib/aggkit.rb +1 -0
- metadata +5 -3
data/lib/aggkit/option_parser.rb
CHANGED
@@ -16,11 +16,10 @@ class OptionParser
|
|
16
16
|
|
17
17
|
# Alias the OptionParser::make_switch function
|
18
18
|
# (instead of directly modifying it like I did in 0.1.0)
|
19
|
-
alias
|
19
|
+
alias pickled_make_switch make_switch
|
20
20
|
|
21
21
|
# Wrapper for OptionParser::make_switch to allow for required switches
|
22
22
|
def make_switch(opts, block = nil)
|
23
|
-
|
24
23
|
# Test if a switch is required
|
25
24
|
required = opts.delete(:required)
|
26
25
|
|
@@ -31,22 +30,26 @@ class OptionParser
|
|
31
30
|
short = return_values[1][0].nil? ? nil : "-#{return_values[1][0]}"
|
32
31
|
long = return_values[2][0].nil? ? nil : "--#{return_values[2][0]}"
|
33
32
|
|
34
|
-
|
33
|
+
unless default_argv.include?(short) || default_argv.include?(long)
|
35
34
|
@missing_switches ||= [] # Should be placed in initialize if incorporated into Ruby proper
|
36
35
|
|
37
36
|
# Not much prettier, but a bit more readable than the previous iteration
|
38
|
-
message =
|
37
|
+
message = 'Missing switch: '
|
39
38
|
message << short unless short.nil?
|
40
|
-
message <<
|
39
|
+
message << ' or ' unless short.nil? || long.nil?
|
41
40
|
message << long unless long.nil?
|
42
41
|
@missing_switches << message
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
46
|
-
|
45
|
+
return_values
|
47
46
|
end
|
47
|
+
|
48
48
|
end
|
49
49
|
|
50
50
|
module Aggkit
|
51
|
+
|
51
52
|
OptionParser = ::OptionParser
|
52
|
-
|
53
|
+
|
54
|
+
end
|
55
|
+
|
data/lib/aggkit/runner.rb
CHANGED
@@ -11,9 +11,7 @@ module Aggkit
|
|
11
11
|
STDERR.sync = true
|
12
12
|
|
13
13
|
puts "Starting #{service}..."
|
14
|
-
if options
|
15
|
-
puts "Options: #{options.inspect}"
|
16
|
-
end
|
14
|
+
puts "Options: #{options.inspect}" if options
|
17
15
|
|
18
16
|
trap('EXIT') do
|
19
17
|
puts "Stopping #{service}..."
|
@@ -81,3 +79,4 @@ module Aggkit
|
|
81
79
|
end
|
82
80
|
|
83
81
|
end
|
82
|
+
|
data/lib/aggkit/version.rb
CHANGED
data/lib/aggkit/watcher.rb
CHANGED
@@ -104,11 +104,11 @@ module Aggkit
|
|
104
104
|
process.duplex = true
|
105
105
|
|
106
106
|
meta = {
|
107
|
-
cmd:
|
107
|
+
cmd: cmd,
|
108
108
|
process: process,
|
109
|
-
stdout:
|
110
|
-
stderr:
|
111
|
-
stdin:
|
109
|
+
stdout: rout,
|
110
|
+
stderr: rerr,
|
111
|
+
stdin: process.io.stdin,
|
112
112
|
termcmd: options[:termcmd]
|
113
113
|
}
|
114
114
|
|
@@ -237,3 +237,4 @@ module Aggkit
|
|
237
237
|
end
|
238
238
|
|
239
239
|
end
|
240
|
+
|
data/lib/aggkit.rb
CHANGED
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.3.
|
4
|
+
version: 0.3.4
|
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: 2019-02-
|
12
|
+
date: 2019-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diplomat
|
@@ -109,6 +109,7 @@ executables:
|
|
109
109
|
- aggstart
|
110
110
|
- aggterm
|
111
111
|
- aggwait
|
112
|
+
- aggwrap
|
112
113
|
extensions: []
|
113
114
|
extra_rdoc_files: []
|
114
115
|
files:
|
@@ -131,6 +132,7 @@ files:
|
|
131
132
|
- bin/aggstart
|
132
133
|
- bin/aggterm
|
133
134
|
- bin/aggwait
|
135
|
+
- bin/aggwrap
|
134
136
|
- docker/Dockerfile
|
135
137
|
- docker/docker-compose.yml
|
136
138
|
- docker/down.sh
|
@@ -189,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
191
|
version: '0'
|
190
192
|
requirements: []
|
191
193
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.7.3
|
193
195
|
signing_key:
|
194
196
|
specification_version: 4
|
195
197
|
summary: Helper scripts for work with docker and consul in Aggredator
|