Permalink
Browse files

Fixed instance group comparison.

Fixed comparison made between value specified by group capistrano
directive and each instance group. Former implementation used
String#include? to compare, which doesn't match only the intended
group.
  • Loading branch information...
1 parent feecd82 commit 967867fcc211dea18254c1689d9b78800af859a9 @marxarelli marxarelli committed May 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/capistrano/ec2group.rb
@@ -21,7 +21,7 @@ def group(which, *args)
@ec2_api.describe_instances.delete_if{|i| i[:aws_state] != "running"}.each do |instance|
instance[:groups].each do |group|
- server(fetch(:aws_pvt_dns) ? instance[:private_dns_name] : instance[:dns_name], *args) if group[:group_name].include?(which.to_s)
+ server(fetch(:aws_pvt_dns) ? instance[:private_dns_name] : instance[:dns_name], *args) if group[:group_name] == which.to_s
end
end
end

0 comments on commit 967867f

Please sign in to comment.