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 +4 -4
- data/Rakefile +1 -1
- data/bin/digital-ocean +9 -1
- data/lib/digital_ocean.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 271b283c68337bd14e12888e584e3b33f522eba7
|
4
|
+
data.tar.gz: f2cf1899874c4bc6f6dc4a619f06f50096cd6bc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c267c76dbb29b39550fc38c07bcb019e121e3b0c6375c0c20875b1599d9e419c0b1676ee072d94303133da0144da1375c02d4c10b4c7051db1295d8d61e5daf
|
7
|
+
data.tar.gz: f795f75111ed75e73455994238c7fdaaf331c8966dd2c52c5b80ae827e16d1e2981fb58eb1e6c6bd4e501aecdebf04c406737e5969156ea29987f907d6dda0c9
|
data/Rakefile
CHANGED
data/bin/digital-ocean
CHANGED
@@ -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
|
data/lib/digital_ocean.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|