rbbt-rest 1.8.32 → 1.8.34
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aff555891484b75d38d4b59f6fa94aa7308bf824
|
|
4
|
+
data.tar.gz: f9207a7c427fd0382fa2fb886b1e6dc47fb73e2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de4e9a33eaebbe627dc1868ad942326c496f5a85ecf9373ad27294aa6f9d4a052e8f85506d62f05d2a69969101cfa6733fde3ad7af6ca2722f281d2e4efad468
|
|
7
|
+
data.tar.gz: 6ec43b3fe9076f12557731445113ab27634299e45fb9dc641fc6ae104de2de3a5447d26adce2a48ae6fe343f6930d2d11bfae721b386132fddb14fc0e27dd368
|
|
@@ -24,7 +24,16 @@ module WorkflowRESTHelpers
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def complete_input_set(workflow, task, inputs)
|
|
27
|
-
|
|
27
|
+
given = []
|
|
28
|
+
inputs.each do |key,value|
|
|
29
|
+
next if value.nil?
|
|
30
|
+
given << key.to_s
|
|
31
|
+
end
|
|
32
|
+
given = given.sort
|
|
33
|
+
|
|
34
|
+
taken = (workflow.task_info(task.to_sym)[:inputs].collect{|i| i.to_s} + ['jobname']).uniq.sort
|
|
35
|
+
|
|
36
|
+
given === taken
|
|
28
37
|
end
|
|
29
38
|
|
|
30
39
|
def type_of_export(workflow, task)
|
|
@@ -57,7 +66,8 @@ module WorkflowRESTHelpers
|
|
|
57
66
|
task_inputs = {}
|
|
58
67
|
inputs.each do |input|
|
|
59
68
|
stream = input_options.include?(input) and input_options[input][:stream]
|
|
60
|
-
|
|
69
|
+
value = prepare_input(params, input, input_types[input], stream)
|
|
70
|
+
task_inputs[input] = value
|
|
61
71
|
end
|
|
62
72
|
|
|
63
73
|
task_inputs
|
|
@@ -135,7 +145,16 @@ module WorkflowRESTHelpers
|
|
|
135
145
|
job.path ? send_file(job.path) : halt(200, job.load.to_s)
|
|
136
146
|
when :literal, :raw
|
|
137
147
|
content_type "text/plain"
|
|
138
|
-
|
|
148
|
+
path = job.path
|
|
149
|
+
if job.path
|
|
150
|
+
if Open.remote? job.path
|
|
151
|
+
Open.open(job.path, :nocache => true)
|
|
152
|
+
else
|
|
153
|
+
send_file(job.path)
|
|
154
|
+
end
|
|
155
|
+
else
|
|
156
|
+
halt(200, job.load.to_s)
|
|
157
|
+
end
|
|
139
158
|
when :binary
|
|
140
159
|
content_type "application/octet-stream"
|
|
141
160
|
job.path ? send_file(job.path) : halt(200, job.load.to_s)
|
|
@@ -203,9 +222,6 @@ module WorkflowRESTHelpers
|
|
|
203
222
|
end
|
|
204
223
|
|
|
205
224
|
begin
|
|
206
|
-
job_url = to(File.join("/", workflow.to_s, task, job.name))
|
|
207
|
-
job_url += "?_format=#{@format}" if @format
|
|
208
|
-
|
|
209
225
|
if not job.started?
|
|
210
226
|
job.run
|
|
211
227
|
job.join
|
|
@@ -214,6 +230,8 @@ module WorkflowRESTHelpers
|
|
|
214
230
|
if format == :jobname
|
|
215
231
|
job.name
|
|
216
232
|
else
|
|
233
|
+
job_url = job.respond_to?(:url)? job.url : to(File.join("/", workflow.to_s, task, job.name))
|
|
234
|
+
job_url += "?_format=#{@format}" if @format
|
|
217
235
|
redirect job_url
|
|
218
236
|
end
|
|
219
237
|
rescue Exception
|
|
@@ -229,16 +247,14 @@ module WorkflowRESTHelpers
|
|
|
229
247
|
begin
|
|
230
248
|
job.fork(true) unless job.started?
|
|
231
249
|
|
|
232
|
-
job_url = to(File.join("/", workflow.to_s, task, job.name))
|
|
233
|
-
job_url += "?_format=#{@format}" if @format
|
|
234
250
|
if format == :jobname
|
|
235
|
-
|
|
236
|
-
sleep 1
|
|
237
|
-
end
|
|
251
|
+
job.soft_grace
|
|
238
252
|
content_type :text
|
|
239
253
|
job.name
|
|
240
254
|
else
|
|
241
255
|
job.soft_grace
|
|
256
|
+
job_url = job.respond_to?(:url)? job.url : to(File.join("/", workflow.to_s, task, job.name))
|
|
257
|
+
job_url += "?_format=#{@format}" if @format
|
|
242
258
|
redirect job_url
|
|
243
259
|
end
|
|
244
260
|
rescue Exception
|
|
@@ -164,6 +164,10 @@ rbbt.job = function(workflow, task, inputs,json){
|
|
|
164
164
|
return job.run(json)
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
rbbt_job = function(workflow, task, inputs, complete){
|
|
168
|
-
|
|
167
|
+
rbbt_job = function(workflow, task, inputs, json, complete){
|
|
168
|
+
if (undefined === complete && typeof json === 'function'){
|
|
169
|
+
complete = json
|
|
170
|
+
json = undefined
|
|
171
|
+
}
|
|
172
|
+
rbbt.job(workflow, task, inputs, json).then(complete)
|
|
169
173
|
}
|
|
@@ -143,6 +143,7 @@ rbbt.plots.graph.consolidate = function(graph_model){
|
|
|
143
143
|
})
|
|
144
144
|
|
|
145
145
|
var edges = []
|
|
146
|
+
|
|
146
147
|
forHash(graph_model.associations, function(database, list){
|
|
147
148
|
var list_edges = rbbt.plots.graph.consolidate_associations(list,database)
|
|
148
149
|
for (i in list_edges) edges.push(list_edges[i])
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbbt-rest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.
|
|
4
|
+
version: 1.8.34
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miguel Vazquez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-09-
|
|
11
|
+
date: 2016-09-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|