arvados-cli 0.1.20140513124920 → 0.1.20140513131358

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arv-run-pipeline-instance +29 -17
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f75639dd66d78703f43e464f71a0fa4197eea6a
4
- data.tar.gz: 165f01aa2735ffb873d27f35d6e67ae3031f3972
3
+ metadata.gz: af2790ca4c3acf7859b5a681e98d678400801e4b
4
+ data.tar.gz: bc485942263396f534edb805c5a4cde6d09b8796
5
5
  SHA512:
6
- metadata.gz: ef618b9a448bd96f4434e10cba58e437c9575adc4c898109b67d4710c93d7e189a605d45153d39396513e0bda0a69b9e8960b2b82c3ebf2020c9b68947c95a7e
7
- data.tar.gz: 4a75201136a8a3786950bcc4a31afb61cc0b42c32f31204d62f7cff9fd03f5e5f78e511e0f038c67406f1db82a2bf89fd584f39b01f3547eed0f7cd5439e9876
6
+ metadata.gz: a3ddee95b6bab6a8b04ed2da17f30a214216a38da8bf2bebcc34e8d650ce7c2dc73950faed84c882bcaf4efba0599dbc7076b39738aab34eb92d630a30bc6f3b
7
+ data.tar.gz: e9bb843f22e3f5e6fefcea14736dd4a591de4a1204c6c70f5044e2faa5d85b90dc361c3504324f2c17c1915902f53e9eea138852f8f4a06b6f15ffaf907f3f4c
@@ -226,10 +226,10 @@ class PipelineInstance
226
226
  :parameters => {
227
227
  :uuid => uuid
228
228
  },
229
- :body => {
230
- :api_token => ENV['ARVADOS_API_TOKEN']
231
- },
232
- :authenticated => false)
229
+ :authenticated => false,
230
+ :headers => {
231
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
232
+ })
233
233
  j = JSON.parse result.body, :symbolize_names => true
234
234
  unless j.is_a? Hash and j[:uuid]
235
235
  debuglog "Failed to get pipeline_instance: #{j[:errors] rescue nil}", 0
@@ -242,10 +242,12 @@ class PipelineInstance
242
242
  def self.create(attributes)
243
243
  result = $client.execute(:api_method => $arvados.pipeline_instances.create,
244
244
  :body => {
245
- :api_token => ENV['ARVADOS_API_TOKEN'],
246
245
  :pipeline_instance => attributes
247
246
  },
248
- :authenticated => false)
247
+ :authenticated => false,
248
+ :headers => {
249
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
250
+ })
249
251
  j = JSON.parse result.body, :symbolize_names => true
250
252
  unless j.is_a? Hash and j[:uuid]
251
253
  abort "Failed to create pipeline_instance: #{j[:errors] rescue nil} #{j.inspect}"
@@ -259,10 +261,12 @@ class PipelineInstance
259
261
  :uuid => @pi[:uuid]
260
262
  },
261
263
  :body => {
262
- :api_token => ENV['ARVADOS_API_TOKEN'],
263
264
  :pipeline_instance => @attributes_to_update.to_json
264
265
  },
265
- :authenticated => false)
266
+ :authenticated => false,
267
+ :headers => {
268
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
269
+ })
266
270
  j = JSON.parse result.body, :symbolize_names => true
267
271
  unless j.is_a? Hash and j[:uuid]
268
272
  debuglog "Failed to save pipeline_instance: #{j[:errors] rescue nil}", 0
@@ -291,20 +295,24 @@ class JobCache
291
295
  @cache ||= {}
292
296
  result = $client.execute(:api_method => $arvados.jobs.get,
293
297
  :parameters => {
294
- :api_token => ENV['ARVADOS_API_TOKEN'],
295
298
  :uuid => uuid
296
299
  },
297
- :authenticated => false)
300
+ :authenticated => false,
301
+ :headers => {
302
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
303
+ })
298
304
  @cache[uuid] = JSON.parse result.body, :symbolize_names => true
299
305
  end
300
306
  def self.where(conditions)
301
307
  result = $client.execute(:api_method => $arvados.jobs.list,
302
308
  :parameters => {
303
- :api_token => ENV['ARVADOS_API_TOKEN'],
304
309
  :limit => 10000,
305
310
  :where => conditions.to_json
306
311
  },
307
- :authenticated => false)
312
+ :authenticated => false,
313
+ :headers => {
314
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
315
+ })
308
316
  list = JSON.parse result.body, :symbolize_names => true
309
317
  if list and list[:items].is_a? Array
310
318
  list[:items]
@@ -315,11 +323,13 @@ class JobCache
315
323
  def self.create(job, create_params)
316
324
  @cache ||= {}
317
325
  result = $client.execute(:api_method => $arvados.jobs.create,
318
- :parameters => {
319
- :api_token => ENV['ARVADOS_API_TOKEN'],
326
+ :body => {
320
327
  :job => job.to_json
321
328
  }.merge(create_params),
322
- :authenticated => false)
329
+ :authenticated => false,
330
+ :headers => {
331
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
332
+ })
323
333
  j = JSON.parse result.body, :symbolize_names => true
324
334
  if j.is_a? Hash and j[:uuid]
325
335
  @cache[j[:uuid]] = j
@@ -348,10 +358,12 @@ class WhRunPipelineInstance
348
358
  else
349
359
  result = $client.execute(:api_method => $arvados.pipeline_templates.get,
350
360
  :parameters => {
351
- :api_token => ENV['ARVADOS_API_TOKEN'],
352
361
  :uuid => template
353
362
  },
354
- :authenticated => false)
363
+ :authenticated => false,
364
+ :headers => {
365
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
366
+ })
355
367
  @template = JSON.parse result.body, :symbolize_names => true
356
368
  if !@template[:uuid]
357
369
  abort "#{$0}: fatal: failed to retrieve pipeline template #{template} #{@template[:errors].inspect rescue nil}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvados-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20140513124920
4
+ version: 0.1.20140513131358
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvados Authors
@@ -146,7 +146,7 @@ dependencies:
146
146
  - - "~>"
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0.8'
149
- description: This is the Arvados SDK CLI gem, git revision d0b6bb76a0a7478794faebd3e1e5ab94b717596d
149
+ description: This is the Arvados SDK CLI gem, git revision 67f17818338153fc6f7b0c65f51e97bbb16f0cc7
150
150
  email: gem-dev@curoverse.com
151
151
  executables:
152
152
  - arv