instance_selector 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e8540d1aa73b8d8c0398465ce48026d01248a52
|
4
|
+
data.tar.gz: ece8050bdc46946040c3d4d2b07fd2f961a1fbd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba5a5537ff8455b7583d3f4b29573e3fbdf1da7863328df6deb226d5e97f2d5796aafc7edbfc1003654443bcdf63041c41d5ebe524a6d2317d82f28d6f1123a3
|
7
|
+
data.tar.gz: 45253fcdd8c1492baae31b828309943ee3be3d23ab7405f2900f6851afa944e5f6e44091877f75730b732681561c5e6e42e8ed278dcdccafe2746f67c9b645f9
|
@@ -16,8 +16,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
16
16
|
desc "List all cloud instances for a stage"
|
17
17
|
task :instance_selector_list do
|
18
18
|
puts
|
19
|
-
@instance_selector_instances.sort_by {|k,v| v}.each do |
|
20
|
-
puts
|
19
|
+
@instance_selector_instances.sort_by {|k,v| v[:name]}.each do |k, v|
|
20
|
+
puts k + "\t" + v.values.join("\t")
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -19,9 +19,8 @@ module InstanceSelector
|
|
19
19
|
# Each instancesSet can have multiple instances
|
20
20
|
# Odd, but explains why it's plural.
|
21
21
|
i['instancesSet'].each do |instance|
|
22
|
-
# instance = i['instancesSet'][0]
|
23
22
|
key = instance['dnsName'].empty? ? instance['ipAddress'] : instance['dnsName']
|
24
|
-
memo[key] = instance['tagSet']['Name']
|
23
|
+
memo[key] = {name: instance['tagSet']['Name'], instance_id: instance['instanceId']}
|
25
24
|
end
|
26
25
|
|
27
26
|
memo
|
@@ -49,9 +48,7 @@ module InstanceSelector
|
|
49
48
|
|
50
49
|
|
51
50
|
def instances(filters={})
|
52
|
-
|
53
|
-
spot = spot_instances(filters)
|
54
|
-
on_demand.merge(spot)
|
51
|
+
on_demand_instances(filters).merge(spot_instances(filters))
|
55
52
|
end
|
56
53
|
|
57
54
|
def connect
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instance_selector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin McFadden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|