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.
@@ -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 :pickled_make_switch :make_switch
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
- if !(default_argv.include?(short) || default_argv.include?(long))
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 = "Missing switch: "
37
+ message = 'Missing switch: '
39
38
  message << short unless short.nil?
40
- message << " or " unless (short.nil? || long.nil?)
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
- return return_values
45
+ return_values
47
46
  end
47
+
48
48
  end
49
49
 
50
50
  module Aggkit
51
+
51
52
  OptionParser = ::OptionParser
52
- end
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
+
@@ -1,5 +1,6 @@
1
1
  module Aggkit
2
2
 
3
- VERSION = '0.3.1'.freeze
3
+ VERSION = '0.3.4'.freeze
4
4
 
5
5
  end
6
+
@@ -104,11 +104,11 @@ module Aggkit
104
104
  process.duplex = true
105
105
 
106
106
  meta = {
107
- cmd: cmd,
107
+ cmd: cmd,
108
108
  process: process,
109
- stdout: rout,
110
- stderr: rerr,
111
- stdin: process.io.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
@@ -13,3 +13,4 @@ require 'aggkit/childprocess'
13
13
  module Aggkit
14
14
 
15
15
  end
16
+
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.1.8768
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-20 00:00:00.000000000 Z
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.6.3
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