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: 9623a48c51d1a7fffa815c7432857ef84e2b6fce
4
- data.tar.gz: 2afa2b4aebf772ae0c28ed392f0c55701eec19cd
3
+ metadata.gz: 3e8540d1aa73b8d8c0398465ce48026d01248a52
4
+ data.tar.gz: ece8050bdc46946040c3d4d2b07fd2f961a1fbd2
5
5
  SHA512:
6
- metadata.gz: dbc76565667a69829f480081bde6460504be8758f0853f680c48441cf36ec7e17f735a41dba853a42baad217cae97d29287c4ee27b7f10b7e3180690bc58b432
7
- data.tar.gz: cd59a0c2aa1712a7d63742f8145e710d4ec7864907650305a9d49ea23db3fa5a8b744a7d70a6a510553a52fcc84632038c8e3cf623dcf2834a157a5e11d78bff
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 |instance|
20
- puts instance.join("\t")
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
- on_demand = on_demand_instances(filters)
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
@@ -1,3 +1,3 @@
1
1
  module InstanceSelector
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
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.13
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-19 00:00:00.000000000 Z
11
+ date: 2013-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog