diff options
author | elijah <elijah@riseup.net> | 2013-03-08 23:08:42 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-03-08 23:08:42 -0800 |
commit | 8e9d2ada3bf0599ab160bd070c6fb214224d5228 (patch) | |
tree | 9ef15e40d72d0a2c046bb22999e44360d3dfd323 /lib/leap_cli/config | |
parent | ebc1724821ea91b488a8289079d5fff605b03e3e (diff) |
replace local and production values with 'environment'.
Diffstat (limited to 'lib/leap_cli/config')
-rw-r--r-- | lib/leap_cli/config/object.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/leap_cli/config/object.rb b/lib/leap_cli/config/object.rb index e4fe619..4f5afe1 100644 --- a/lib/leap_cli/config/object.rb +++ b/lib/leap_cli/config/object.rb @@ -124,8 +124,8 @@ module LeapCli # merge hashes if old_value.is_a?(Hash) || new_value.is_a?(Hash) value = Config::Object.new(@manager, @node) - old_value.is_a?(Hash) ? value.deep_merge!(old_value) : (value[key] = old_value if old_value.any?) - new_value.is_a?(Hash) ? value.deep_merge!(new_value, prefer_self) : (value[key] = new_value if new_value.any?) + old_value.is_a?(Hash) ? value.deep_merge!(old_value) : (value[key] = old_value if !old_value.nil?) + new_value.is_a?(Hash) ? value.deep_merge!(new_value, prefer_self) : (value[key] = new_value if !new_value.nil?) # merge arrays elsif old_value.is_a?(Array) || new_value.is_a?(Array) @@ -184,10 +184,10 @@ module LeapCli end # - # returns a list of nodes that match similar production level (production, local, development, etc) + # returns a list of nodes that match the same environment # def nodes_like_me - nodes[:production => @node.production, :local => @node.local, :development => @node.development] + nodes[:environment => @node.environment] end class FileMissing < Exception |