arvados-cli 0.1.20131212152126 → 0.1.20140106150809

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arv +14 -2
  3. data/bin/crunch-job +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 622640ea69fde34097c84b1001d734c7d7d44e5f
4
- data.tar.gz: 2aa286553fce18a21cf7d60854daf1937aa767bc
3
+ metadata.gz: bc4b072957cfd1faca124e0deecb7bd0d49b4123
4
+ data.tar.gz: 46af868d61aaecd0fdd870d1185aae2638322a4e
5
5
  SHA512:
6
- metadata.gz: 6b9d83c8aadf5d92cc88f56ad507bee5ad84967605fdfa092a5b401fcabf61b3a616da521c8b5380599d6429d7a8117d6a68a9592361d8f77e187c9a9e108972
7
- data.tar.gz: f3218580cf5b0709d2f241d281bc03fcba5ea1302d06cc658300c05570d0159f0d4f5b1f355ff4394e2adb357a641466664d3e4328fc1dc832f62fb3b15e7c15
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)", required: is_required, type: :string
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] = JSON.parse 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
@@ -119,7 +119,7 @@ $SIG{'USR2'} = sub
119
119
 
120
120
 
121
121
 
122
- my $arv = Arvados->new;
122
+ my $arv = Arvados->new('apiVersion' => 'v1');
123
123
  my $metastream;
124
124
 
125
125
  my $User = $arv->{'users'}->{'current'}->execute;
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.20131212152126
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: 2013-12-12 00:00:00.000000000 Z
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 d9cd657b733d578ac0d2167dd75967aa4f22e0ac
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