capify-ec2 1.2.3 → 1.2.4.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +1 -1
- data/lib/capify-ec2.rb +3 -3
- data/lib/capify-ec2/capistrano.rb +1 -1
- data/lib/capify-ec2/version.rb +1 -1
- metadata +11 -8
data/Changelog.md
CHANGED
data/lib/capify-ec2.rb
CHANGED
@@ -31,7 +31,7 @@ class CapifyEc2
|
|
31
31
|
desired_instances.each_with_index do |instance, i|
|
32
32
|
puts sprintf "%-11s: %-40s %-20s %-20s %-62s %-20s (%s)",
|
33
33
|
i.to_s.magenta, instance.name, instance.id.red, instance.flavor_id.cyan,
|
34
|
-
instance.dns_name.blue, instance.availability_zone.green, (instance.
|
34
|
+
instance.dns_name.blue, instance.availability_zone.green, (instance.roles rescue "").yellow
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
@@ -43,8 +43,8 @@ class CapifyEc2
|
|
43
43
|
instances = @ec2_config[:project_tag].nil? ? @instances : project_instances
|
44
44
|
end
|
45
45
|
|
46
|
-
def get_instances_by_role(
|
47
|
-
desired_instances.select {|instance| instance.roles ==
|
46
|
+
def get_instances_by_role(role)
|
47
|
+
desired_instances.select {|instance| instance.roles == role.to_s rescue false}
|
48
48
|
end
|
49
49
|
|
50
50
|
def get_instances_by_region(roles, region)
|
@@ -56,7 +56,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
56
56
|
task named_instance.name.to_sym do
|
57
57
|
remove_default_roles
|
58
58
|
server_address = named_instance.dns_name
|
59
|
-
named_instance.
|
59
|
+
named_instance.roles.each do |role|
|
60
60
|
define_role({:name => role, :options => {:on_no_matching_servers => :continue}}, named_instance)
|
61
61
|
end
|
62
62
|
end unless named_instance.nil?
|
data/lib/capify-ec2/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capify-ec2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 961915988
|
5
|
+
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
|
9
|
+
- 4
|
10
|
+
- pre
|
11
|
+
version: 1.2.4.pre
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Noah Cantor
|
@@ -107,12 +108,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
109
|
none: false
|
109
110
|
requirements:
|
110
|
-
- - "
|
111
|
+
- - ">"
|
111
112
|
- !ruby/object:Gem::Version
|
112
|
-
hash:
|
113
|
+
hash: 25
|
113
114
|
segments:
|
114
|
-
-
|
115
|
-
|
115
|
+
- 1
|
116
|
+
- 3
|
117
|
+
- 1
|
118
|
+
version: 1.3.1
|
116
119
|
requirements: []
|
117
120
|
|
118
121
|
rubyforge_project: capify-ec2
|