rbbt-util 5.21.50 → 5.21.51
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 +4 -4
- data/lib/rbbt/workflow/step/run.rb +0 -1
- data/share/rbbt_commands/workflow/example +26 -0
- data/share/rbbt_commands/workflow/task +12 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 704546978c88f0c7e56a154fcd427e8fda23f5c1
|
4
|
+
data.tar.gz: 3f00ff9b14bde2183e8a0e7b453597a0dbd8de0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4e1f9c201d8f60c5fc1f241bd943cad20e4325d6292e2617cb83ed49cb1bc1e1b43b4af23822c62967d104f91404ab5c038236d29ff20713b35910b10808493
|
7
|
+
data.tar.gz: 8cbed4ce23fd8603b653f3ed9954a53ae8996455319df14846b48c7503759e68fa999a173ae310ffd76f59239f4d5f6cd6d4586280e56456a89e19638d26631d
|
@@ -1,9 +1,35 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'rbbt-util'
|
3
4
|
require 'rbbt/util/simpleopt'
|
4
5
|
require 'rbbt/workflow'
|
5
6
|
require 'rbbt/workflow/usage'
|
6
7
|
|
8
|
+
|
9
|
+
$0 = "rbbt #{$previous_commands*""} #{ File.basename(__FILE__) }" if $previous_commands
|
10
|
+
|
11
|
+
options = SOPT.setup <<EOF
|
12
|
+
|
13
|
+
Description
|
14
|
+
|
15
|
+
$ rbbt workflow exmaple <workflow> [<task>] [<name>] -- [<task_options>]
|
16
|
+
|
17
|
+
Run workflow examples. You can define tasks and example names. You can also override task options
|
18
|
+
|
19
|
+
-h--help Print this help
|
20
|
+
|
21
|
+
EOF
|
22
|
+
if options[:help]
|
23
|
+
if defined? rbbt_usage
|
24
|
+
rbbt_usage
|
25
|
+
else
|
26
|
+
puts SOPT.doc
|
27
|
+
end
|
28
|
+
exit 0
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
|
7
33
|
def run_task(workflow, task, name)
|
8
34
|
Log.info "Running example #{Log.color :magenta, workflow.to_s}##{Log.color :yellow, task} -- #{Log.color :cyan, name}"
|
9
35
|
|
@@ -309,6 +309,8 @@ begin
|
|
309
309
|
|
310
310
|
if do_exec or (job.respond_to?(:is_exec) and job.is_exec)
|
311
311
|
res = job.exec(:stream)
|
312
|
+
res = JSON.parse(res.read) if (defined?(WorkflowRESTClient) and WorkflowRESTClient::RemoteStep === job)
|
313
|
+
|
312
314
|
case
|
313
315
|
when res.respond_to?(:gets)
|
314
316
|
while block = res.read(2048)
|
@@ -449,7 +451,11 @@ when (defined?(WorkflowRESTClient) and WorkflowRESTClient::RemoteStep)
|
|
449
451
|
job.join
|
450
452
|
puts Open.read(job.path, :nocache => true, :nofail => true)
|
451
453
|
else
|
452
|
-
|
454
|
+
if Array === res
|
455
|
+
out.puts res * "\n"
|
456
|
+
else
|
457
|
+
out.puts res.to_s
|
458
|
+
end
|
453
459
|
end
|
454
460
|
when Step
|
455
461
|
if res.streaming?
|
@@ -485,7 +491,11 @@ when Step
|
|
485
491
|
out.puts Open.read(res.path) if File.exist? res.path
|
486
492
|
end
|
487
493
|
else
|
488
|
-
|
494
|
+
if Array === res
|
495
|
+
out.puts res * "\n"
|
496
|
+
else
|
497
|
+
out.puts res.to_s
|
498
|
+
end
|
489
499
|
end
|
490
500
|
|
491
501
|
exit 0
|
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.21.
|
4
|
+
version: 5.21.51
|
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-11-
|
11
|
+
date: 2016-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|