digital-ocean-cli 0.5.0 → 0.5.1

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: 1be7eba963a4cdf5c1e832546d05b4a5ba57a480
4
- data.tar.gz: 1b767d8b4b81f94f81899607cb1aee2f9fed03fc
3
+ metadata.gz: 271b283c68337bd14e12888e584e3b33f522eba7
4
+ data.tar.gz: f2cf1899874c4bc6f6dc4a619f06f50096cd6bc4
5
5
  SHA512:
6
- metadata.gz: 93c3739ff4365ecbfdda3d642c604552d3c030a24e0e365166583783c31d9c649e99784122a8b64a3a738d170c9c368a03c63028bfee16f95bff609960c472fb
7
- data.tar.gz: 13381b73a4290e386a8805383c6dbff1f664da447baf2925e08d21d580d970b1d16d0a95e14f475f66fa6dc2206d1338112595030a3b33c41905310af205a73e
6
+ metadata.gz: 2c267c76dbb29b39550fc38c07bcb019e121e3b0c6375c0c20875b1599d9e419c0b1676ee072d94303133da0144da1375c02d4c10b4c7051db1295d8d61e5daf
7
+ data.tar.gz: f795f75111ed75e73455994238c7fdaaf331c8966dd2c52c5b80ae827e16d1e2981fb58eb1e6c6bd4e501aecdebf04c406737e5969156ea29987f907d6dda0c9
data/Rakefile CHANGED
@@ -8,5 +8,5 @@ end
8
8
 
9
9
  task default: [
10
10
  :rubocop,
11
- :release,
11
+ # :release,
12
12
  ]
@@ -77,7 +77,8 @@ module DigitalOcean
77
77
  "IMAGE",
78
78
  "SLUG",
79
79
  "STATUS",
80
- "IP",
80
+ "PRIVATE IP",
81
+ "PUBLIC IP",
81
82
  "MEMORY",
82
83
  "DISK",
83
84
  "REGION",
@@ -89,6 +90,7 @@ module DigitalOcean
89
90
  "#{row['image']['distribution']} #{row['image']['name']}",
90
91
  row["image"]["slug"],
91
92
  row["status"],
93
+ private_ip(row["networks"]["v4"]),
92
94
  public_ip(row["networks"]["v4"]),
93
95
  row["size"]["memory"],
94
96
  row["size"]["disk"],
@@ -125,6 +127,12 @@ module DigitalOcean
125
127
  return ip["ip_address"] if ip["type"] == "public"
126
128
  end
127
129
  end
130
+
131
+ def private_ip(ips)
132
+ ips.each do |ip|
133
+ return ip["ip_address"] if ip["type"] == "private"
134
+ end
135
+ end
128
136
  end
129
137
 
130
138
  class Account < Base
@@ -1,5 +1,5 @@
1
1
  require "digital_ocean/ext/nil_class"
2
2
 
3
3
  module DigitalOcean
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digital-ocean-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ptdorf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor