vzcdn 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18fab49132bd61909d82170651be8528af91e964
4
- data.tar.gz: 748e2b093d6880cd40e95827becc7411b9356c5a
3
+ metadata.gz: 7215fc5e9d64d825f754f8f443b9e2bfa129ef95
4
+ data.tar.gz: c33bcc2e49781849a86b051c290eab2711299fe6
5
5
  SHA512:
6
- metadata.gz: 9cb759a95782f3a265eb5583d08c79e25f3c80f76d5eeee812d19c6fed204c512ebbfe9d730eb7b9eff1c709e1a1fa1b90adb4684d77482f75283be94c341afd
7
- data.tar.gz: ee4cf6eff8c54151643bd6d5afc6c6336668996d1096eb412a4293eae53aae2942a1b08b196828c1e4ffa38df1bb3dfb24e84d0603f7447686c419e086b6db43
6
+ metadata.gz: 475802385949d17c5dacaedf76358b28d2f41f630cf4c93e08d5370fa0c95e66c4d5ee057cdda7696808da890aafdc54b240480d365c8904ad2eeed9d818dcc1
7
+ data.tar.gz: c1236f636057b6d306d6f408db439c084c29538623d7cac08e8de0bd731ecda9922b7720b377eccee5542d58138bacf2afbc3b890a72ec7d7b28c0456f502744
@@ -0,0 +1,10 @@
1
+ #!user/bin/env/ruby
2
+
3
+ require 'vzcdn'
4
+
5
+ args = []
6
+ ARGV.each { |arg|
7
+ args << arg
8
+ }
9
+
10
+ Vzcdn.invoke(args)
@@ -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]])
@@ -18,9 +18,3 @@ class Vzcdn
18
18
  end
19
19
  end
20
20
 
21
- args = []
22
- ARGV.each { |arg|
23
- args << arg
24
- }
25
-
26
- Vzcdn.invoke(args)
@@ -1,3 +1,3 @@
1
1
  module Vzcdn
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -11,9 +11,29 @@ class Zone
11
11
  if @zname
12
12
  puts "unimplemented"
13
13
  else
14
- puts Route.new.get_all_zones
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.6
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-28 00:00:00.000000000 Z
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