gaptool-client 0.3.1 → 0.3.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "gaptool-client"
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Bailey"]
12
- s.date = "2013-02-06"
12
+ s.date = "2013-02-07"
13
13
  s.description = "client for gaptool-server"
14
14
  s.email = "m@mdb.io"
15
15
  s.executables = ["gt"]
@@ -247,9 +247,25 @@ module Gaptool
247
247
  option [ "-s", "--service"], "SERVICE", "Name of the service, omit to show all"
248
248
  def execute
249
249
  if service.nil?
250
- puts $api.svcapi_showkeys(:all)
250
+ keyhash = $api.svcapi_showkeys(:all)
251
+ keyhash.keys.each do |service|
252
+ puts service.color(:green)
253
+ keyhash[service].keys.each do |state|
254
+ puts " ┖ #{state}".color(:cyan)
255
+ keyhash[service][state].each do |key|
256
+ puts " - #{key}"
257
+ end
258
+ end
259
+ end
251
260
  else
252
- puts $api.svcapi_showkeys(service)
261
+ keyhash = $api.svcapi_showkeys(service)
262
+ puts service.color(:green)
263
+ keyhash.keys.each do |state|
264
+ puts " ┖ #{state}".color(:cyan)
265
+ keyhash[state].each do |key|
266
+ puts " - #{key}"
267
+ end
268
+ end
253
269
  end
254
270
  end
255
271
  end
@@ -258,7 +274,9 @@ module Gaptool
258
274
  option [ "-s", "--service"], "SERVICE", "Name of the service", :required => true
259
275
  option [ "-k", "--key" ], "KEY", "string for storing as a key/deleting", :required => true
260
276
  def execute
261
- $api.svcapi_deletekey(service, key)
277
+ if $api.svcapi_deletekey(service, key)
278
+ puts "success"
279
+ end
262
280
  end
263
281
  end
264
282
 
@@ -266,7 +284,7 @@ module Gaptool
266
284
  option [ "-s", "--service"], "SERVICE", "Name of the service", :required => true
267
285
  option [ "-k", "--key" ], "KEY", "string for storing as a key/deleting", :required => true
268
286
  def execute
269
- $api.svcapi_putkey(service, key)
287
+ puts $api.svcapi_putkey(service, key)
270
288
  end
271
289
  end
272
290
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gaptool-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-06 00:00:00.000000000 Z
12
+ date: 2013-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -207,7 +207,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
207
  version: '0'
208
208
  segments:
209
209
  - 0
210
- hash: -1559600565290524055
210
+ hash: -3426192962893138905
211
211
  required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  none: false
213
213
  requirements: