From 44708fde0c3cd04be0b9f9deefcee3bc4bedc8da Mon Sep 17 00:00:00 2001 From: igayoso Date: Mon, 9 Mar 2015 11:21:39 +0100 Subject: [PATCH] Add non case sensitive search --- lib/ec2ssh.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ec2ssh.rb b/lib/ec2ssh.rb index c887683..21ac077 100644 --- a/lib/ec2ssh.rb +++ b/lib/ec2ssh.rb @@ -67,17 +67,17 @@ def get_all_ec2_instances def check_filter_tag( filter, instance ) return true unless filter - instance[:tags]["Name"].to_s.include? filter + instance[:tags]["Name"].to_s.downcase.include? filter.downcase end def check_filter_ip( filter, instance ) return true unless filter - instance[:aws_private_ip_address].to_s.include? filter + instance[:aws_private_ip_address].to_s.downcase.include? filter.downcase end def check_filter_sg( filter, instance ) return true unless filter - instance[:aws_groups].to_s.include? filter + instance[:aws_groups].to_s.downcase.include? filter.downcase end end