small-ops 0.0.14 → 0.0.15

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 (2) hide show
  1. data/lib/small-setup.rb +7 -1
  2. metadata +1 -1
data/lib/small-setup.rb CHANGED
@@ -41,7 +41,13 @@ OptionParser.new do |opts|
41
41
  end.parse!
42
42
 
43
43
  @host = options[:host] || ENV['HOST'] || `hostname -I | awk '{ print $1 }'`.gsub("\n","")
44
- @etcd = options[:etcd] || "http://#{ENV["ETCD_PORT_4001_TCP_ADDR"]}:#{ENV["ETCD_PORT_4001_TCP_PORT"]}" || ENV['ETCD'] || "http://#{@host}:4001"
44
+ if options[:etcd] then
45
+ @etcd = options[:etcd]
46
+ elsif ENV["ETCD_PORT_4001_TCP_ADDR"] then
47
+ @etcd = "http://#{ENV["ETCD_PORT_4001_TCP_ADDR"]}:#{ENV["ETCD_PORT_4001_TCP_PORT"]}"
48
+ else
49
+ @etcd = ENV['ETCD'] || "http://#{@host}:4001"
50
+ end
45
51
  @prefix = options[:prefix] || ENV['PREFIX'] || ""
46
52
  @foreground = !options[:daemon]
47
53
  @output = options[:output] || false
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.14
4
+ version: 0.0.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: