arvados-cli 0.1.20131212152126 → 0.1.20140106150809
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 +4 -4
- data/bin/arv +14 -2
- data/bin/crunch-job +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc4b072957cfd1faca124e0deecb7bd0d49b4123
|
4
|
+
data.tar.gz: 46af868d61aaecd0fdd870d1185aae2638322a4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc0d5dafbb03cca986e1efe48860e1a232c8260be722e8be9568d3577ae4e4a20149c608de61184ecc51ac8d1c891fb8874171f7403e349b70e85676c4326583
|
7
|
+
data.tar.gz: 8740a3172fbd10213e3143ba9681158ce31c94d3e17156a3aac9eed384fa43ffcc0e25d954992cc610a6047c26fdb6f7458ea9540d1e847bf46a596ee1f358a8
|
data/bin/arv
CHANGED
@@ -60,6 +60,7 @@ begin
|
|
60
60
|
require 'andand'
|
61
61
|
require 'oj'
|
62
62
|
require 'active_support/inflector'
|
63
|
+
require 'yaml'
|
63
64
|
rescue LoadError
|
64
65
|
abort <<-EOS
|
65
66
|
|
@@ -177,6 +178,7 @@ def parse_arguments(discovery_document)
|
|
177
178
|
opt :json, "Return the entire response received from the API server, as a JSON object", :short => "-j"
|
178
179
|
opt :human, "Return the response received from the API server, as a JSON object with whitespace added for human consumption", :short => "-h"
|
179
180
|
opt :pretty, "Synonym of --human", :short => nil
|
181
|
+
opt :yaml, "Return the response received from the API server, in YAML format", :short => "-y"
|
180
182
|
stop_on resource_types
|
181
183
|
end
|
182
184
|
|
@@ -215,12 +217,20 @@ def parse_arguments(discovery_document)
|
|
215
217
|
if body_object["required"] == false
|
216
218
|
is_required = false
|
217
219
|
end
|
218
|
-
opt resource.to_sym, "#{resource} (request body)",
|
220
|
+
opt resource.to_sym, "#{resource} (request body)", {
|
221
|
+
required: is_required,
|
222
|
+
type: :string
|
223
|
+
}
|
224
|
+
discovered_params[resource.to_sym] = body_object
|
219
225
|
end
|
220
226
|
end
|
227
|
+
|
221
228
|
discovered_params.each do |k,v|
|
229
|
+
k = k.to_sym
|
222
230
|
if ['object', 'array'].index(v["type"]) and method_opts.has_key? k
|
223
|
-
method_opts[k]
|
231
|
+
if method_opts[k].match /^\//
|
232
|
+
method_opts[k] = File.open method_opts[k], 'rb' do |f| f.read end
|
233
|
+
end
|
224
234
|
end
|
225
235
|
end
|
226
236
|
return resource, method, method_opts, global_opts, ARGV
|
@@ -291,6 +301,8 @@ end
|
|
291
301
|
|
292
302
|
if global_opts[:human] or global_opts[:pretty] then
|
293
303
|
puts Oj.dump(results, :indent => 1)
|
304
|
+
elsif global_opts[:yaml] then
|
305
|
+
puts results.to_yaml
|
294
306
|
elsif global_opts[:json] then
|
295
307
|
puts Oj.dump(results)
|
296
308
|
elsif results["items"] and results["kind"].match /list$/i
|
data/bin/crunch-job
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arvados-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20140106150809
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvados Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.8'
|
111
|
-
description: This is the Arvados SDK CLI gem, git revision
|
111
|
+
description: This is the Arvados SDK CLI gem, git revision 5cf53c5f133040aa21ebfb4e7687e8759cfea636
|
112
112
|
email: gem-dev@clinicalfuture.com
|
113
113
|
executables:
|
114
114
|
- arv
|