small-ops 0.0.3 → 0.0.4

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 (3) hide show
  1. data/bin/etcd2conf +4 -0
  2. data/lib/small-setup.rb +4 -0
  3. metadata +1 -1
data/bin/etcd2conf CHANGED
@@ -44,6 +44,10 @@ while run do
44
44
  File.open(@output, 'w') { |file| file.write(result) }
45
45
 
46
46
  last = actual
47
+
48
+ if @cmd then
49
+ puts `#{@cmd}`
50
+ end
47
51
  end
48
52
 
49
53
  run = false
data/lib/small-setup.rb CHANGED
@@ -26,6 +26,9 @@ OptionParser.new do |opts|
26
26
  opts.on("-i","--input file","Input file") do |o|
27
27
  options[:input]=o
28
28
  end
29
+ opts.on("-c","--command cmd","A command to execute at certain point") do |c|
30
+ options[:cmd]=c
31
+ end
29
32
  end.parse!
30
33
 
31
34
 
@@ -35,6 +38,7 @@ end.parse!
35
38
  @foreground = !options[:daemon]
36
39
  @output = options[:output] || false
37
40
  @input = options[:input] || false
41
+ @cmd = options[:cmd] || false
38
42
 
39
43
  def http_get(uri)
40
44
  JSON.parse(Net::HTTP.get(URI(uri)))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: small-ops
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: