From e8533d45bf99036952e2465bde0e79faee1dda7c Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 7 Feb 2014 00:00:12 -0800 Subject: added support for custom /etc/hosts files, fixed bug in ObjectList filters (when using negative value on an array attribute). --- lib/leap_cli/config/object_list.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/leap_cli/config/object_list.rb') diff --git a/lib/leap_cli/config/object_list.rb b/lib/leap_cli/config/object_list.rb index 830e96d..9ca4697 100644 --- a/lib/leap_cli/config/object_list.rb +++ b/lib/leap_cli/config/object_list.rb @@ -46,7 +46,9 @@ module LeapCli each do |name, config| value = config[field] if value.is_a? Array - if value.include?(match_value) + if operator == :equal && value.include?(match_value) + results[name] = config + elsif operator == :not_equal && !value.include?(match_value) results[name] = config end else -- cgit v1.2.3