diff options
author | elijah <elijah@riseup.net> | 2013-03-10 18:06:32 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-03-10 18:06:32 -0700 |
commit | d3fcd766ea6d6a21d892f3fab264606dfacf14a7 (patch) | |
tree | 12fbde94b27fc81df6d8105bd64677fab1a73fd6 /lib/leap_cli/config | |
parent | 48fd5f813b949fb0c9c19755d8389bbfcad3999b (diff) |
fixed misc. bugs with switch to 'environment' flag.
Diffstat (limited to 'lib/leap_cli/config')
-rw-r--r-- | lib/leap_cli/config/object_list.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/leap_cli/config/object_list.rb b/lib/leap_cli/config/object_list.rb index 9001834..0c7711f 100644 --- a/lib/leap_cli/config/object_list.rb +++ b/lib/leap_cli/config/object_list.rb @@ -37,6 +37,7 @@ module LeapCli key.each do |field, match_value| field = field.is_a?(Symbol) ? field.to_s : field match_value = match_value.is_a?(Symbol) ? match_value.to_s : match_value + operator = match_value =~ /^!/ ? :not_equal : :equal each do |name, config| value = config[field] if !value.nil? @@ -45,7 +46,9 @@ module LeapCli results[name] = config end else - if value == match_value + if operator == :equal && value == match_value + results[name] = config + elsif operator == :not_equal && value != match_value results[name] = config end end |