rbbt-util 5.21.125 → 5.21.126
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/workflow/accessor.rb +1 -0
- data/lib/rbbt/workflow/examples.rb +15 -1
- data/share/rbbt_commands/workflow/info +4 -4
- 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: b25c57ba759c64c90f84606b1903060f3551cf20
|
4
|
+
data.tar.gz: d11206948af6273c56a6ac051a1ca3e064214a72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a79b14310fb16641876d4b84629f3af35a783a42c7785019ff7bdd9c44492930f80c3293e36fb966b66e4ff86c668a2823c48465da7ad011e0bf7bb6958e625b
|
7
|
+
data.tar.gz: 78ef5d0e917fe5c5be16b453cb94a757397c46c3d20d38fe2a67b0c2ea26800cdb3f33e0e223444b0b5c2371e173c0d6a654f5005d9f0e6b21997178bd56fc49
|
@@ -49,9 +49,11 @@ module Workflow
|
|
49
49
|
IndiferentHash.setup(inputs)
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
52
|
+
def example_inputs(task_name, example)
|
53
53
|
inputs = {}
|
54
|
+
IndiferentHash.setup(input)
|
54
55
|
example(task_name, example).each do |input,type,file|
|
56
|
+
next if new_inputs.include? input
|
55
57
|
|
56
58
|
case type
|
57
59
|
when :tsv, :array, :text
|
@@ -64,6 +66,18 @@ module Workflow
|
|
64
66
|
inputs[input.to_sym] = file.read.strip
|
65
67
|
end
|
66
68
|
end
|
69
|
+
inputs
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
def example_step(task_name, example, new_inputs = {})
|
74
|
+
inputs = example_inputs(task_name, example)
|
75
|
+
|
76
|
+
if new_inputs and new_inputs.any?
|
77
|
+
IndiferentHash.setup(new_inputs)
|
78
|
+
inputs = inputs.merge(new_inputs)
|
79
|
+
end
|
80
|
+
|
67
81
|
self.job(task_name, example, inputs)
|
68
82
|
end
|
69
83
|
end
|
@@ -87,14 +87,14 @@ if inputs and inputs.any?
|
|
87
87
|
inputs.each do |input,value|
|
88
88
|
case value
|
89
89
|
when nil
|
90
|
-
puts " "
|
90
|
+
puts Misc.format_definition_list_item(" " + input.to_s, 'nil', 80, 20, :blue)
|
91
91
|
when Array
|
92
|
-
puts " "
|
92
|
+
puts Misc.format_definition_list_item(" " + input.to_s, (value.length > 6 ? value[0..5]*"\n" << "\n" << "..." : value * "\n" ), 80, 20, :blue)
|
93
93
|
when TrueClass, FalseClass
|
94
|
-
puts " "
|
94
|
+
puts Misc.format_definition_list_item(" " + input.to_s, value.to_s, 80, 20, :blue)
|
95
95
|
else
|
96
96
|
text = value.to_s.split("\n")[0..5].compact * "\n\n"
|
97
|
-
puts " "
|
97
|
+
puts Misc.format_definition_list_item(" " + input.to_s, text, 80, 20, :blue)
|
98
98
|
end
|
99
99
|
end
|
100
100
|
end
|
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.126
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|