arvados-cli 0.1.20150318175258 → 0.1.20150319151231

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arv-run-pipeline-instance +7 -46
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f2a6ec1dcf70c54e9d4c3e5c19765998bbd662e
4
- data.tar.gz: 3a73655194150d120062964dece0f49af9ba3523
3
+ metadata.gz: 707e00b4501d9a6d31a2625fcb92f831c9ec1274
4
+ data.tar.gz: a45c9df6b6c09e576822d680d260f46360a6ec9a
5
5
  SHA512:
6
- metadata.gz: 8170967ae4113d5da4f93f894c47f9a47b24c49d309712f78da07d805e955a69942ab5a75a61ef04289881042c74c4fc46ed40310099acb03644ec3a95cb25b5
7
- data.tar.gz: 39b43765b46ae46d1398c442a658114ecc43784f3449001f171b25e74d31aa9bb91952167912d69aaa7b22efa1ccd311d7b9add81004d3db34786390c3f41478
6
+ metadata.gz: 09ccbacb48017459baec47b92b91d2817e91f2988ef48cd6ddebd8be4dcdf16bc6e51615ca5a9bb5b64c900b869ecfba17741c4ab2291cfc2d4f374ed428c7de
7
+ data.tar.gz: c1f3a2469ebcb197ce10dec6e5e3bc69309aca7a85dc597ecfd2b72e4c9db7b21ed4d5e14a94a2bf92143d550a297198293fa257879e4f026754ca45bcc5b4b6
@@ -67,12 +67,6 @@ if RUBY_VERSION < '1.9.3' then
67
67
  EOS
68
68
  end
69
69
 
70
- $arvados_api_version = ENV['ARVADOS_API_VERSION'] || 'v1'
71
- $arvados_api_host = ENV['ARVADOS_API_HOST'] or
72
- abort "#{$0}: fatal: ARVADOS_API_HOST environment variable not set."
73
- $arvados_api_token = ENV['ARVADOS_API_TOKEN'] or
74
- abort "#{$0}: fatal: ARVADOS_API_TOKEN environment variable not set."
75
-
76
70
  begin
77
71
  require 'arvados'
78
72
  require 'rubygems'
@@ -93,23 +87,6 @@ def debuglog(message, verbosity=1)
93
87
  $stderr.puts "#{File.split($0).last} #{$$}: #{message}" if $debuglevel >= verbosity
94
88
  end
95
89
 
96
- module Kernel
97
- def suppress_warnings
98
- original_verbosity = $VERBOSE
99
- $VERBOSE = nil
100
- result = yield
101
- $VERBOSE = original_verbosity
102
- return result
103
- end
104
- end
105
-
106
- if $arvados_api_host.match /local/
107
- # You probably don't care about SSL certificate checks if you're
108
- # testing with a dev server.
109
- suppress_warnings { OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE }
110
- end
111
-
112
-
113
90
  # Parse command line options (the kind that control the behavior of
114
91
  # this program, that is, not the pipeline component parameters).
115
92
 
@@ -196,22 +173,6 @@ if $options[:run_pipeline_here] == $options[:submit]
196
173
  abort "#{$0}: error: you must supply --run-pipeline-here, --run-jobs-here, or --submit."
197
174
  end
198
175
 
199
- # Suppress SSL certificate checks if ARVADOS_API_HOST_INSECURE
200
-
201
- module Kernel
202
- def suppress_warnings
203
- original_verbosity = $VERBOSE
204
- $VERBOSE = nil
205
- result = yield
206
- $VERBOSE = original_verbosity
207
- return result
208
- end
209
- end
210
-
211
- if ENV['ARVADOS_API_HOST_INSECURE']
212
- suppress_warnings { OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE }
213
- end
214
-
215
176
  # Set up the API client.
216
177
 
217
178
  $arv = Arvados.new api_version: 'v1'
@@ -226,7 +187,7 @@ class PipelineInstance
226
187
  },
227
188
  :authenticated => false,
228
189
  :headers => {
229
- authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
190
+ authorization: 'OAuth2 '+$arv.config['ARVADOS_API_TOKEN']
230
191
  })
231
192
  j = JSON.parse result.body, :symbolize_names => true
232
193
  unless j.is_a? Hash and j[:uuid]
@@ -244,7 +205,7 @@ class PipelineInstance
244
205
  },
245
206
  :authenticated => false,
246
207
  :headers => {
247
- authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
208
+ authorization: 'OAuth2 '+$arv.config['ARVADOS_API_TOKEN']
248
209
  })
249
210
  j = JSON.parse result.body, :symbolize_names => true
250
211
  unless j.is_a? Hash and j[:uuid]
@@ -263,7 +224,7 @@ class PipelineInstance
263
224
  },
264
225
  :authenticated => false,
265
226
  :headers => {
266
- authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
227
+ authorization: 'OAuth2 '+$arv.config['ARVADOS_API_TOKEN']
267
228
  })
268
229
  j = JSON.parse result.body, :symbolize_names => true
269
230
  unless j.is_a? Hash and j[:uuid]
@@ -307,7 +268,7 @@ class JobCache
307
268
  },
308
269
  :authenticated => false,
309
270
  :headers => {
310
- authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
271
+ authorization: 'OAuth2 '+$arv.config['ARVADOS_API_TOKEN']
311
272
  })
312
273
  @cache[uuid] = JSON.parse result.body, :symbolize_names => true
313
274
  end
@@ -319,7 +280,7 @@ class JobCache
319
280
  },
320
281
  :authenticated => false,
321
282
  :headers => {
322
- authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
283
+ authorization: 'OAuth2 '+$arv.config['ARVADOS_API_TOKEN']
323
284
  })
324
285
  list = JSON.parse result.body, :symbolize_names => true
325
286
  if list and list[:items].is_a? Array
@@ -337,7 +298,7 @@ class JobCache
337
298
  :body_object => body,
338
299
  :authenticated => false,
339
300
  :headers => {
340
- authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
301
+ authorization: 'OAuth2 '+$arv.config['ARVADOS_API_TOKEN']
341
302
  })
342
303
  j = JSON.parse result.body, :symbolize_names => true
343
304
  if j.is_a? Hash and j[:uuid]
@@ -381,7 +342,7 @@ class WhRunPipelineInstance
381
342
  },
382
343
  :authenticated => false,
383
344
  :headers => {
384
- authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
345
+ authorization: 'OAuth2 '+$arv.config['ARVADOS_API_TOKEN']
385
346
  })
386
347
  @template = JSON.parse result.body, :symbolize_names => true
387
348
  if !@template[:uuid]
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.20150318175258
4
+ version: 0.1.20150319151231
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvados Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2015-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arvados
@@ -178,7 +178,7 @@ dependencies:
178
178
  - - "<"
179
179
  - !ruby/object:Gem::Version
180
180
  version: 1.0.0
181
- description: Arvados command line tools, git commit 1ed0df4d4b2221a06e37effce42ab5b2e23b29c8
181
+ description: Arvados command line tools, git commit 4925686f6aa7214568ebd60be3acaa49dbf9dd1a
182
182
  email: gem-dev@curoverse.com
183
183
  executables:
184
184
  - arv