arvados 0.1.20130710104038 → 0.1.20131216133021

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/lib/arvados.rb +10 -4
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d7c1cb8a7fff8ec45639d829c70eb65d0d616d4
4
- data.tar.gz: 5b32f5898194493fa09d6878a02bfcec6e139cc3
3
+ metadata.gz: 473d588a0d21ba2ce8329ae2a1e80cd5dd98726b
4
+ data.tar.gz: ffba6fc8b9111fbde0bf79d5fd06204f654b325b
5
5
  SHA512:
6
- metadata.gz: c41312728026cbff9b70ae5ef7890bd57ca2c820283a39d1e9bbe7f319f29ff40fb8a80f3817fbb9c88b876053512037d27856db2a8b8663eba9076d2995f229
7
- data.tar.gz: 5986f162a1dc2bd777aa3ba4182bb1a51b8214df808de7b3ca146d0a12421d73aa3823eda5a688b736412c9ce0ccfc997dd0d3afa52f98b7c6f9dfa29363bfff
6
+ metadata.gz: 7612dbb518fc8a73e2eed92b988d0f9680a69135ad9b26ea4130ddc398f031c4e847b748729b54491dc744fad5911da51eb2b381304e9f89e706fa772537354d
7
+ data.tar.gz: 2770179cc6eb03dcac86b7c1ec069dc44b535e2bd368cd8aad375591b76ac3698b6f525c57fab16b059577b6f80bcd4910943bed15b27c063607325007d91417
@@ -20,6 +20,9 @@ end
20
20
 
21
21
  class Arvados
22
22
 
23
+ class TransactionFailedError < StandardError
24
+ end
25
+
23
26
  @@debuglevel = 0
24
27
  class << self
25
28
  attr_accessor :debuglevel
@@ -39,9 +42,8 @@ class Arvados
39
42
  ENV['ARVADOS_API_TOKEN'] or
40
43
  raise "#{$0}: no :api_token or ENV[ARVADOS_API_TOKEN] provided."
41
44
 
42
- @suppress_ssl_warnings = opts[:suppress_ssl_warnings] || false
43
-
44
- if @suppress_ssl_warnings
45
+ if (opts[:api_host] ? opts[:suppress_ssl_warnings] :
46
+ ENV['ARVADOS_API_HOST_INSECURE'])
45
47
  suppress_warnings do
46
48
  OpenSSL::SSL.const_set 'VERIFY_PEER', OpenSSL::SSL::VERIFY_NONE
47
49
  end
@@ -152,7 +154,11 @@ class Arvados
152
154
  execute(:api_method => arvados_api.send(api_models_sym).send(method),
153
155
  :authenticated => false,
154
156
  :parameters => parameters)
155
- JSON.parse result.body, :symbolize_names => true
157
+ resp = JSON.parse result.body, :symbolize_names => true
158
+ if resp[:errors]
159
+ raise Arvados::TransactionFailedError.new(resp[:errors])
160
+ end
161
+ resp
156
162
  end
157
163
 
158
164
  def []=(x,y)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvados
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20130710104038
4
+ version: 0.1.20131216133021
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-07-10 00:00:00.000000000 Z
11
+ date: 2013-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.7.7
55
- description: This is the Arvados SDK gem, git revision 7a5ae650df19557a5fa88a8a1ae73ae07cad01cf
55
+ description: This is the Arvados SDK gem, git revision 527255236b66380bd50bda0f42e8e4bf56397386
56
56
  email: gem-dev@clinicalfuture.com
57
57
  executables: []
58
58
  extensions: []
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.0.0
82
+ rubygems_version: 2.1.11
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Arvados SDK Ruby