cncflora_commons 0.0.34 → 0.0.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/cncflora_commons.rb +8 -8
  2. metadata +1 -1
@@ -79,6 +79,14 @@ def setup(file)
79
79
 
80
80
  @config = YAML.load_file(file)[ENV['RACK_ENV'] || 'development']
81
81
 
82
+ @config.each {|ck,cv|
83
+ ENV.each {|ek,ev|
84
+ if cv =~ /\$#{ek}/ then
85
+ @config[ck] = cv.gsub(/\$#{ek}/,ev)
86
+ end
87
+ }
88
+ }
89
+
82
90
  if @config["etcd"] || ENV["ETCD"] then
83
91
  etcd_cfg = etcd2config(@config["etcd"] || ENV["ETCD"])
84
92
  onchange(@config["etcd"] || ENV["ETCD"]) do |newconfig|
@@ -90,14 +98,6 @@ def setup(file)
90
98
  etcd_cfg.each {|k,v| @config[k] = v }
91
99
  end
92
100
 
93
- @config.each {|ck,cv|
94
- ENV.each {|ek,ev|
95
- if cv =~ /\$#{ek}/ then
96
- @config[ck] = cv.gsub(/\$#{ek}/,ev)
97
- end
98
- }
99
- }
100
-
101
101
  ENV.each {|k,v| @config[k]=v }
102
102
 
103
103
  if @config["lang"] then
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.34
4
+ version: 0.0.35
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: