rbbt-util 5.32.23 → 5.32.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rbbt +2 -3
- data/lib/rbbt/tsv/manipulate.rb +10 -0
- data/lib/rbbt/workflow/examples.rb +1 -1
- data/lib/rbbt/workflow.rb +20 -14
- data/share/rbbt_commands/workflow/task +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a7eebab331a8908a290e4a3ad8db2ee3dc3c3dec07b93ec1c74f504f9f7ea29
|
4
|
+
data.tar.gz: 0f9a2ce6019676118ab439dea57f16605555d9ef850c35998704b9215c477ffb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d81532c2babaae631ca98784e7b7e36039fed68544b6bce9fc8fc2d74a155ffd98fe0752477c7ad245aaa0c65e82c47f330f65c5d70a7f5f20a77de4bc4dbd6
|
7
|
+
data.tar.gz: 2914786ec23349cabccbb6e8a1c561336b60dd5d862e89c3a95802f040c66f8107d5a2135455f00d8bc7b9e06e390fd6462a861419b78ae25bf3a58c14a33350
|
data/bin/rbbt
CHANGED
@@ -262,9 +262,8 @@ rescue ParameterException
|
|
262
262
|
puts
|
263
263
|
exit_status = -1
|
264
264
|
exit exit_status
|
265
|
-
rescue SystemExit
|
266
|
-
|
267
|
-
exit_status = $!.exit_status
|
265
|
+
rescue SystemExit,CmdStop
|
266
|
+
exit_status = $!.status
|
268
267
|
exit exit_status
|
269
268
|
rescue Exception
|
270
269
|
Log.exception $!
|
data/lib/rbbt/tsv/manipulate.rb
CHANGED
@@ -356,6 +356,16 @@ module TSV
|
|
356
356
|
elems.sort_by{|k,v| v}.collect{|k,v| k}
|
357
357
|
end
|
358
358
|
|
359
|
+
def subset(keys)
|
360
|
+
new = TSV.setup({}, :key_field => key_field, :fields => fields, :type => type, :filename => filename, :identifiers => identifiers)
|
361
|
+
self.with_unnamed do
|
362
|
+
keys.each do |k|
|
363
|
+
new[k] = self[k]
|
364
|
+
end
|
365
|
+
end
|
366
|
+
new
|
367
|
+
end
|
368
|
+
|
359
369
|
def select(method = nil, invert = false, &block)
|
360
370
|
new = TSV.setup({}, :key_field => key_field, :fields => fields, :type => type, :filename => filename, :identifiers => identifiers)
|
361
371
|
|
data/lib/rbbt/workflow.rb
CHANGED
@@ -45,14 +45,10 @@ module Workflow
|
|
45
45
|
load_remote_tasks(Rbbt.root.etc.remote_tasks.find) if Rbbt.root.etc.remote_tasks.exists?
|
46
46
|
end
|
47
47
|
|
48
|
-
def self.require_remote_workflow(wf_name, url)
|
49
|
-
require 'rbbt/workflow/remote_workflow'
|
50
|
-
eval "Object::#{wf_name} = RemoteWorkflow.new '#{ url }', '#{wf_name}'"
|
51
|
-
end
|
52
48
|
|
53
49
|
def self.require_remote_workflow(wf_name, url)
|
54
50
|
require 'rbbt/workflow/remote_workflow'
|
55
|
-
eval "Object::#{wf_name} = RemoteWorkflow.new '#{ url }', '#{wf_name}'"
|
51
|
+
eval "Object::#{wf_name.split("+").first} = RemoteWorkflow.new '#{ url }', '#{wf_name}'"
|
56
52
|
end
|
57
53
|
|
58
54
|
def self.load_workflow_libdir(filename)
|
@@ -134,9 +130,10 @@ module Workflow
|
|
134
130
|
end
|
135
131
|
|
136
132
|
def self.require_local_workflow(wf_name)
|
133
|
+
|
137
134
|
filename = local_workflow_filename(wf_name)
|
138
135
|
|
139
|
-
if filename and File.exist?
|
136
|
+
if filename and File.exist?(filename)
|
140
137
|
load_workflow_file filename
|
141
138
|
else
|
142
139
|
return false
|
@@ -194,14 +191,23 @@ module Workflow
|
|
194
191
|
end
|
195
192
|
|
196
193
|
Log.high{"Loading workflow #{wf_name}"}
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
194
|
+
|
195
|
+
first = nil
|
196
|
+
wf_name.split("+").each do |wf_name|
|
197
|
+
require_local_workflow(wf_name) or
|
198
|
+
(Workflow.autoinstall and `rbbt workflow install #{Misc.snake_case(wf_name)} || rbbt workflow install #{wf_name}` and require_local_workflow(wf_name)) or raise("Workflow not found or could not be loaded: #{ wf_name }")
|
199
|
+
|
200
|
+
workflow = begin
|
201
|
+
Misc.string2const Misc.camel_case(wf_name.split("+").first)
|
202
|
+
rescue
|
203
|
+
Workflow.workflows.last || true
|
204
|
+
end
|
205
|
+
workflow.load_documentation
|
206
|
+
|
207
|
+
first ||= workflow
|
208
|
+
end
|
209
|
+
return first
|
210
|
+
|
205
211
|
workflow
|
206
212
|
end
|
207
213
|
|
@@ -287,8 +287,8 @@ else
|
|
287
287
|
puts
|
288
288
|
puts $!.message
|
289
289
|
puts
|
290
|
-
|
291
|
-
exit
|
290
|
+
|
291
|
+
exit -1
|
292
292
|
end
|
293
293
|
end
|
294
294
|
|
@@ -572,7 +572,9 @@ when Step
|
|
572
572
|
exit! 0
|
573
573
|
else
|
574
574
|
res.join
|
575
|
-
|
575
|
+
Open.open(res.path, :mode => 'rb') do |io|
|
576
|
+
Misc.consume_stream(io, false, out)
|
577
|
+
end if Open.exist?(res.path) || Open.remote?(res.path) || Open.ssh?(res.path)
|
576
578
|
end
|
577
579
|
else
|
578
580
|
if Array === res
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.32.
|
4
|
+
version: 5.32.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09
|
11
|
+
date: 2021-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|