civo 0.2.3 → 0.2.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: 6fdb705d39dfa6436e984982063107727e9f3a16
4
- data.tar.gz: d04538cd67b01259e32e720f6a3b7e0e38788bb0
3
+ metadata.gz: a71e62e2cd740dab1e47236bcdd514bc5b314904
4
+ data.tar.gz: b89b383475caa6c84854d8f60e856601f7855b1e
5
5
  SHA512:
6
- metadata.gz: 6b8b4873b6423559c59fad7bf2dba6b678b7a1d7154e3ea76e041cc60394b82f2bff4291024973e5b83c0f4670b952756b7c3267dda3b7a9aa90d945f03aa5fa
7
- data.tar.gz: 33a5cc58c528e31399644e5949ca9cdd6610bc14b5817267ee40eec1c2a3640591213cff3da0e30c9b078083f5f31363b003ef6cce7ca7f5bbb7a0b2608eae9c
6
+ metadata.gz: 4057d7cea1e00129e2468864c2ac26acf8c2b3613af9fe9b562fd61c0904c4f74a5bfd296bed76955e428ac481f7753f0a12b4a3211af1a0094dd98d5a2100f6
7
+ data.tar.gz: d963f127d7b567ae382330c95a1a8ae2bd225f20ea2a7c08ae26e29f6a60b1a3c6a413a9b60e2244b76e6ea6da05380289ebcccc77125ff8ccbbb75d36587335
@@ -8,7 +8,13 @@ module Civo
8
8
  put :upgrade, "/v1/instances/:id", requires: [:size, :id]
9
9
 
10
10
  def ip_addresses
11
- self._attributes[:ip_addresses].items rescue ""
11
+ @ip_addresses ||= (self._attributes[:ip_addresses].items rescue []).map do |ip|
12
+ if ip.public_ip
13
+ "#{ip.private_ip}=>#{ip.public_ip}"
14
+ else
15
+ "#{ip.private_ip}"
16
+ end
17
+ end.join(", ")
12
18
  end
13
19
  end
14
20
  end
@@ -27,6 +27,9 @@ module Civo
27
27
 
28
28
  data.each do |record|
29
29
  columns.each do |k, v|
30
+ if block_given?
31
+ yield record
32
+ end
30
33
  length = record.send(k).to_s.length
31
34
  if record.send(k).to_s.length > v[:max_width]
32
35
  v[:max_width] = length
data/lib/civo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries