hierarchical_config 0.3 → 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.
- 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