Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only spaces and commas used to separate roles and options, now.

  • Loading branch information...
commit 421304cac4988741e17840954ab13e12f6cf3b86 1 parent fd221c9
@ncantor ncantor authored
View
2  Changelog.md
@@ -1,4 +1,4 @@
-## 1.2.6 (Feb 29, 2012)
+## 1.2.6 (Mar 06, 2012)
Notes:
View
2  lib/capify-ec2.rb
@@ -57,7 +57,7 @@ def desired_instances(region = nil)
end
def get_instances_by_role(role)
- desired_instances.select {|instance| instance.tags['Roles'].split(%r{\W+}).include?(role.to_s) rescue false}
+ desired_instances.select {|instance| instance.tags['Roles'].split(%r{[, ]+}).include?(role.to_s) rescue false}
end
def get_instances_by_region(roles, region)
View
2  lib/capify-ec2/capistrano.rb
@@ -123,7 +123,7 @@ def define_role(role, instance)
options = role[:options]
new_options = {}
options.each {|key, value| new_options[key] = true if value.to_s == instance.name}
- instance.tags["Options"].split(%r{\W+}).each { |option| new_options[option.to_sym] = true} rescue false
+ instance.tags["Options"].split(%r{[, ]+}).each { |option| new_options[option.to_sym] = true} rescue false
if new_options
role role[:name].to_sym, instance.contact_point, new_options
Please sign in to comment.
Something went wrong with that request. Please try again.