vzcdn 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/vzcdn +10 -0
- data/lib/clui_config.rb +2 -2
- data/lib/vzcdn.rb +0 -6
- data/lib/vzcdn/version.rb +1 -1
- data/lib/zone.rb +22 -2
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7215fc5e9d64d825f754f8f443b9e2bfa129ef95
|
4
|
+
data.tar.gz: c33bcc2e49781849a86b051c290eab2711299fe6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 475802385949d17c5dacaedf76358b28d2f41f630cf4c93e08d5370fa0c95e66c4d5ee057cdda7696808da890aafdc54b240480d365c8904ad2eeed9d818dcc1
|
7
|
+
data.tar.gz: c1236f636057b6d306d6f408db439c084c29538623d7cac08e8de0bd731ecda9922b7720b377eccee5542d58138bacf2afbc3b890a72ec7d7b28c0456f502744
|
data/bin/vzcdn
ADDED
data/lib/clui_config.rb
CHANGED
@@ -52,9 +52,9 @@ class Configure
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def init(args)
|
55
|
-
puts "init called with args: " + args.to_s
|
56
55
|
if (args.length != 2)
|
57
|
-
|
56
|
+
puts "usage: init <account-num> <token>"
|
57
|
+
puts "go to my.edgecast.com --> Settings to find it"
|
58
58
|
else
|
59
59
|
set(["acct-num", args[0]])
|
60
60
|
set(["token", args[1]])
|
data/lib/vzcdn.rb
CHANGED
data/lib/vzcdn/version.rb
CHANGED
data/lib/zone.rb
CHANGED
@@ -11,9 +11,29 @@ class Zone
|
|
11
11
|
if @zname
|
12
12
|
puts "unimplemented"
|
13
13
|
else
|
14
|
-
|
14
|
+
zones = Route.new.get_all_zones
|
15
|
+
lines = []
|
16
|
+
lines << ["ZONE", "ID"]
|
17
|
+
zones.each {|zone|
|
18
|
+
lines << [zone["DomainName"], zone["ZoneId"].to_s]
|
19
|
+
}
|
20
|
+
pp_table lines
|
15
21
|
end
|
16
22
|
end
|
17
23
|
|
18
|
-
|
24
|
+
def pp_table(lines)
|
25
|
+
ncols = lines[0].length
|
26
|
+
maxwidths = Array.new(ncols, 0)
|
27
|
+
lines.each { |line|
|
28
|
+
line.each_with_index { |col, index|
|
29
|
+
maxwidths[index] = [col.length, maxwidths[index]].max
|
30
|
+
}
|
31
|
+
}
|
32
|
+
lines.each { |line|
|
33
|
+
line.each_with_index {|col, index|
|
34
|
+
printf("%#{maxwidths[index]}s ", col)
|
35
|
+
}
|
36
|
+
printf("\n")
|
37
|
+
}
|
38
|
+
end
|
19
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vzcdn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Preston
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-03-
|
13
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
@@ -59,7 +59,8 @@ email:
|
|
59
59
|
- steven.c.preston@verizon.com
|
60
60
|
- thomas.goes@verizon.com
|
61
61
|
- nitin.khanna@verizon.com
|
62
|
-
executables:
|
62
|
+
executables:
|
63
|
+
- vzcdn
|
63
64
|
extensions: []
|
64
65
|
extra_rdoc_files: []
|
65
66
|
files:
|
@@ -67,6 +68,7 @@ files:
|
|
67
68
|
- LICENSE.txt
|
68
69
|
- README.md
|
69
70
|
- Rakefile
|
71
|
+
- bin/vzcdn
|
70
72
|
- lib/clui_config.rb
|
71
73
|
- lib/command_proc.rb
|
72
74
|
- lib/common.rb
|