Skip to content
Browse files

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

  • Loading branch information...
1 parent fd221c9 commit 421304cac4988741e17840954ab13e12f6cf3b86 @ncantor ncantor committed
Showing with 3 additions and 3 deletions.
  1. +1 −1 Changelog.md
  2. +1 −1 lib/capify-ec2.rb
  3. +1 −1 lib/capify-ec2/capistrano.rb
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

0 comments on commit 421304c

Please sign in to comment.
Something went wrong with that request. Please try again.