opsicle 2.9.3 → 2.9.4

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: 68fb538f3c30323d782949bb6873d25f954e1a4c
4
- data.tar.gz: d60460ab9f7ff89eae00eb3a554f9d70ca129488
3
+ metadata.gz: 9c75ff97a867184874e1f843479835ce6132cb52
4
+ data.tar.gz: 2b56df550482ea9d5e6bd7d9c0f562622e943a63
5
5
  SHA512:
6
- metadata.gz: 3e26a5fe8ff33488e2b687629857243b8bd082d481f249627b45bf5e2147cfa37f994b3d29626276b4c558bc380556abff165f519963ba1e9e54b7c09079750a
7
- data.tar.gz: db8290a71cb8e17b738b0b1814993a7c1787f5a602f29b3aca6d0ce969f63556d33420ffdde93e614e2878c98a95b24660550af939fcff7276e49a469d0fb587
6
+ metadata.gz: 9c265d345b1975c90adb0fef8dd19ef5006fba43554494e9d66b109a8b008fedad842aa5b80778dbbb3e79da1f77bf1026ddf75129bd0dd116223433ad682cec
7
+ data.tar.gz: 02f166794f08a4a7ecb1db1f687163a77b211dd3eb274cdc233acb7d3ba74427cd30f01677d014a99038a5383e55a0e7f5f45dd667b8d1fca593a7dc34844fa5
@@ -18,12 +18,12 @@ module Opsicle
18
18
  end
19
19
 
20
20
  def print(instances)
21
- puts Terminal::Table.new headings: ['Hostname', 'Layers', 'Status', 'IP', 'Instance ID'], rows: instance_data(instances)
21
+ puts Terminal::Table.new headings: ['Hostname', 'Layers', 'Status', 'Public IP', 'Private ID'], rows: instance_data(instances)
22
22
  end
23
23
 
24
24
  def instance_data(instances)
25
25
  instances.sort { |a,b| a[:hostname] <=> b[:hostname] }.map { |instance|
26
- [instance[:hostname], layer_names(instance), instance[:status], Opsicle::Instances::pretty_ip(instance), instance[:instance_id]]
26
+ [instance[:hostname], layer_names(instance), instance[:status], Opsicle::Instances::pretty_ip(instance), Opsicle::Instances::private_ip(instance)]
27
27
  }
28
28
  end
29
29
 
@@ -18,9 +18,13 @@ module Opsicle
18
18
  instance[:elastic_ip] ? "#{instance[:elastic_ip]} EIP" : instance[:public_ip]
19
19
  end
20
20
 
21
+ def self.private_ip(instance)
22
+ instance[:private_ip]
23
+ end
24
+
21
25
  def self.find_by_ip(client, ips)
22
26
  instances = new(client).data.reject { |instance| instances_matching_ips(instance, ips) }
23
- instances.empty? ? nil : instances
27
+ instances.empty? ? nil : instances
24
28
  end
25
29
 
26
30
  def self.instances_matching_ips(instance, ip_addresses)
@@ -32,7 +36,7 @@ module Opsicle
32
36
 
33
37
  def self.find_by_eip(client)
34
38
  instances = new(client).data.reject { |instance| instance[:elastic_ip] == nil }
35
- instances.empty? ? nil : instances
39
+ instances.empty? ? nil : instances
36
40
  end
37
41
 
38
42
  def instances(options={})
@@ -1,3 +1,3 @@
1
1
  module Opsicle
2
- VERSION = "2.9.3"
2
+ VERSION = "2.9.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsicle
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.3
4
+ version: 2.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Fleener
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-19 00:00:00.000000000 Z
12
+ date: 2017-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
@@ -282,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
282
  version: '0'
283
283
  requirements: []
284
284
  rubyforge_project:
285
- rubygems_version: 2.4.8
285
+ rubygems_version: 2.6.12
286
286
  signing_key:
287
287
  specification_version: 4
288
288
  summary: An opsworks specific abstraction on top of the aws sdk