arvados 2.0.3 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arvados.rb +17 -16
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6126e67d588ee7eed3b467357cdd13fbace3c46740460eac7cb824ccfbf76ae
|
4
|
+
data.tar.gz: 5168370d9c487d572931b13f64654f88aa15c81b4d986817b6307e1baf2e0ed5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bbe189487f2a675ba3b4d0cc80b0a90f8ed77b8404ba044b21e6540b9345c4e00bdc4f8323566b011284f61e3b8631dc394e062f74c39a17b90fdfd7f625e06
|
7
|
+
data.tar.gz: 13386d6c2b88e678e8bf21a30b88ebe8abd7b6e08803698d3ee65baa4626b8df8fcc93ec44c9105692611ab116e545370e65c4a90b7ed41f2da4efbe05ae63d6
|
data/lib/arvados.rb
CHANGED
@@ -19,7 +19,6 @@ class Arvados
|
|
19
19
|
class TransactionFailedError < StandardError
|
20
20
|
end
|
21
21
|
|
22
|
-
@@config = nil
|
23
22
|
@@debuglevel = 0
|
24
23
|
class << self
|
25
24
|
attr_accessor :debuglevel
|
@@ -31,12 +30,16 @@ class Arvados
|
|
31
30
|
|
32
31
|
@arvados_api_version = opts[:api_version] || 'v1'
|
33
32
|
|
34
|
-
@
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
@config = nil
|
34
|
+
[[:api_host, 'ARVADOS_API_HOST'],
|
35
|
+
[:api_token, 'ARVADOS_API_TOKEN']].each do |op, en|
|
36
|
+
if opts[op]
|
37
|
+
config[en] = opts[op]
|
38
|
+
end
|
39
|
+
if !config[en]
|
40
|
+
raise "#{$0}: no :#{op} or ENV[#{en}] provided."
|
41
|
+
end
|
42
|
+
end
|
40
43
|
|
41
44
|
if (opts[:suppress_ssl_warnings] or
|
42
45
|
%w(1 true yes).index(config['ARVADOS_API_HOST_INSECURE'].
|
@@ -91,17 +94,15 @@ class Arvados
|
|
91
94
|
# result looks like Arvados::A26949680::Job.
|
92
95
|
namespace_class.const_set classname, klass
|
93
96
|
|
94
|
-
self.
|
95
|
-
|
96
|
-
klass
|
97
|
-
end
|
97
|
+
self.define_singleton_method classname.underscore do
|
98
|
+
klass
|
98
99
|
end
|
99
100
|
end
|
100
101
|
end
|
101
102
|
|
102
103
|
def client
|
103
104
|
@client ||= Google::APIClient.
|
104
|
-
new(:host =>
|
105
|
+
new(:host => config["ARVADOS_API_HOST"],
|
105
106
|
:application_name => @application_name,
|
106
107
|
:application_version => @application_version.to_s)
|
107
108
|
end
|
@@ -119,7 +120,7 @@ class Arvados
|
|
119
120
|
end
|
120
121
|
|
121
122
|
def config(config_file_path="~/.config/arvados/settings.conf")
|
122
|
-
return
|
123
|
+
return @config if @config
|
123
124
|
|
124
125
|
# Initialize config settings with environment variables.
|
125
126
|
config = {}
|
@@ -137,7 +138,7 @@ class Arvados
|
|
137
138
|
# Note: If we start using additional configuration settings from
|
138
139
|
# this file in the future, we might have to read the file anyway
|
139
140
|
# instead of returning here.
|
140
|
-
return (
|
141
|
+
return (@config = config)
|
141
142
|
end
|
142
143
|
|
143
144
|
begin
|
@@ -164,7 +165,7 @@ class Arvados
|
|
164
165
|
debuglog "Ignoring error reading #{config_file_path}: #{e}", 0
|
165
166
|
end
|
166
167
|
|
167
|
-
|
168
|
+
@config = config
|
168
169
|
end
|
169
170
|
|
170
171
|
class Model
|
@@ -202,7 +203,7 @@ class Arvados
|
|
202
203
|
:parameters => parameters,
|
203
204
|
:body_object => body,
|
204
205
|
:headers => {
|
205
|
-
:authorization => '
|
206
|
+
:authorization => 'Bearer '+arvados.config['ARVADOS_API_TOKEN']
|
206
207
|
})
|
207
208
|
resp = JSON.parse result.body, :symbolize_names => true
|
208
209
|
if resp[:errors]
|
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: 2.
|
4
|
+
version: 2.1.2
|
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: 2021-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -132,8 +132,8 @@ dependencies:
|
|
132
132
|
- - "<"
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '2'
|
135
|
-
description: Arvados client library, git commit
|
136
|
-
email:
|
135
|
+
description: Arvados client library, git commit 78096170b070a9eb17b37f913798397744fa1ff5
|
136
|
+
email: packaging@arvados.org
|
137
137
|
executables: []
|
138
138
|
extensions: []
|
139
139
|
extra_rdoc_files: []
|