hierarchical_config 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hierarchical_config.rb +3 -3
- metadata +3 -3
data/lib/hierarchical_config.rb
CHANGED
@@ -95,11 +95,11 @@ module HierarchicalConfig
|
|
95
95
|
def fill_in_env_vars(hash)
|
96
96
|
r = {}
|
97
97
|
hash.each do |key,value|
|
98
|
-
if
|
99
|
-
r[key]=ENV[value]
|
100
|
-
elsif value.is_a? Hash
|
98
|
+
if value.is_a? Hash
|
101
99
|
leaf_hash = fill_in_env_vars(value)
|
102
100
|
r[key]=leaf_hash unless leaf_hash.keys.empty?
|
101
|
+
elsif !value.nil? && ENV.key?(value)
|
102
|
+
r[key]=ENV[value]
|
103
103
|
end
|
104
104
|
end
|
105
105
|
r
|
metadata
CHANGED