Skip to content

Commit 57df4a6

Browse files
author
Noah Cantor
committed
Updated to allow any number of non-whitespace characters after a comma.
1 parent 9394dcf commit 57df4a6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/capify-ec2.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def project_instances
5353
end
5454

5555
def desired_instances(region = nil)
56-
instances = @ec2_config[:project_tag].nil? ? @instances : project_instances
56+
@ec2_config[:project_tag].nil? ? @instances : project_instances
5757
end
5858

5959
def get_instances_by_role(role)

lib/capify-ec2/capistrano.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def define_role(role, instance)
123123
options = role[:options]
124124
new_options = {}
125125
options.each {|key, value| new_options[key] = true if value.to_s == instance.name}
126-
instance.tags["Options"].split(%r{[, ]+}).each { |option| new_options[option.to_sym] = true} rescue false
126+
instance.tags["Options"].split(%r{,\s*}).each { |option| new_options[option.to_sym] = true} rescue false
127127

128128
if new_options
129129
role role[:name].to_sym, instance.contact_point, new_options

0 commit comments

Comments
 (0)