From 109a3700ac9f7dc62482d9c3e54e4de0396b2fe5 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 22 May 2013 16:36:49 -0700 Subject: fixed bug with config list not supporting correctly not filters (eg nodes[:name => '!sloth']) --- lib/leap_cli/config/object_list.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3