gaptool-client 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gaptool-client.gemspec +2 -2
- data/lib/gaptool-client.rb +22 -4
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/gaptool-client.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "gaptool-client"
|
8
|
-
s.version = "0.3.
|
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-
|
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"]
|
data/lib/gaptool-client.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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.
|
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-
|
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: -
|
210
|
+
hash: -3426192962893138905
|
211
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
212
|
none: false
|
213
213
|
requirements:
|