instance_selector 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,23 @@
|
|
1
1
|
require 'instance_selector'
|
2
2
|
|
3
3
|
Capistrano::Configuration.instance(:must_exist).load do
|
4
|
+
# Yes, this is a hack
|
5
|
+
@instance_selector_instances = {}
|
6
|
+
|
4
7
|
def instance_selector(cap_role, provider, args={})
|
5
8
|
client = InstanceSelector::Connection.factory(provider)
|
6
9
|
instances = client.instances(client.args_to_filters(args))
|
7
|
-
|
8
|
-
|
10
|
+
role(cap_role, *instances.keys)
|
11
|
+
|
12
|
+
@instance_selector_instances.merge!(instances)
|
9
13
|
end
|
10
14
|
|
11
15
|
# Not namespaced due to collision with the above method.
|
12
16
|
desc "List all cloud instances for a stage"
|
13
17
|
task :instance_selector_list do
|
14
|
-
|
18
|
+
puts
|
19
|
+
@instance_selector_instances.sort_by {|k,v| v}.each do |instance|
|
15
20
|
puts instance.join("\t")
|
16
21
|
end
|
17
22
|
end
|
18
|
-
|
19
23
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: instance_selector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kevin McFadden
|
@@ -108,7 +108,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
segments:
|
110
110
|
- 0
|
111
|
-
hash:
|
111
|
+
hash: -2823604603377087715
|
112
112
|
version: '0'
|
113
113
|
none: false
|
114
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
segments:
|
119
119
|
- 0
|
120
|
-
hash:
|
120
|
+
hash: -2823604603377087715
|
121
121
|
version: '0'
|
122
122
|
none: false
|
123
123
|
requirements: []
|