cncflora_commons 0.0.7 → 0.0.8

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/cncflora_commons.rb +3 -3
  2. metadata +1 -1
@@ -82,17 +82,17 @@ def flatten(obj)
82
82
  flat
83
83
  end
84
84
 
85
- def etcd2config(server,prefix)
85
+ def etcd2config(server,prefix="")
86
86
  config = flatten( http_get("#{server}/v2/keys/?recursive=true")["node"] )
87
87
  config.keys.each {|k|
88
- if k.to_s.start_with?(prefix) && k.to_s.end_with?("_url") then
88
+ if k.to_s.end_with?("_url") then
89
89
  config[k.to_s.gsub(prefix,"").gsub("_url","").to_sym] = config[k]
90
90
  end
91
91
  }
92
92
  config
93
93
  end
94
94
 
95
- def etcd2settings(server,prefix)
95
+ def etcd2settings(server,prefix="")
96
96
  config = etcd2config(server,prefix)
97
97
  config.keys.each { |key| set key, config[key] }
98
98
  set :config, config
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cncflora_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: