From: elijah Date: Wed, 22 May 2013 23:36:49 +0000 (-0700) Subject: fixed bug with config list not supporting correctly not filters (eg nodes[:name ... X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=109a3700ac9f7dc62482d9c3e54e4de0396b2fe5;p=leap%2Fleap_cli.git fixed bug with config list not supporting correctly not filters (eg nodes[:name => '!sloth']) --- diff --git a/lib/leap_cli/config/object_list.rb b/lib/leap_cli/config/object_list.rb index 0c0da14..ebb0bb0 100644 --- a/lib/leap_cli/config/object_list.rb +++ b/lib/leap_cli/config/object_list.rb @@ -37,7 +37,12 @@ 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 + if match_value.is_a?(String) && match_value =~ /^!/ + operator = :not_equal + match_value = match_value.sub(/^!/, '') + else + operator = :equal + end each do |name, config| value = config[field] if value.is_a? Array