flow_object 0.3.0 → 0.3.1
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/Gemfile.lock +2 -1
- data/lib/flow_object/base.rb +6 -11
- data/lib/flow_object/version.rb +1 -1
- 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: db5d4237447ea9da647afab9214f2a37e10e3446353933dd6dd9f929d1b4a021
|
|
4
|
+
data.tar.gz: 0ca51ffecc9b02fe9f6a92f9382b0a91d18812645e844cfc02e22dc95997e4a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fe85a38185bc79f41c3000ca80e8079578e591317dede9a2615a632a3e5756eb0c50b6f9a2def175bf781d50d9c00c50a645c2b623b8e8796a7904a3bb3dcf4
|
|
7
|
+
data.tar.gz: a63a10e4d35e722f28cb641711509653c44dfc0763c8cee77fc9f3da7b790f6bf49cf5c1a945dbedb395261aaa4d7e87096e071b8f4dd602c5f43d22b20111ff
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
flow_object (0.3.
|
|
4
|
+
flow_object (0.3.1)
|
|
5
5
|
hospodar (~> 1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -13,6 +13,7 @@ GEM
|
|
|
13
13
|
docile (1.3.5)
|
|
14
14
|
dry-inflector (0.2.0)
|
|
15
15
|
hospodar (1.0.1)
|
|
16
|
+
dry-inflector (~> 0.1)
|
|
16
17
|
json (2.5.1)
|
|
17
18
|
method_source (1.0.0)
|
|
18
19
|
dry-inflector (~> 0.1)
|
data/lib/flow_object/base.rb
CHANGED
|
@@ -9,7 +9,7 @@ module FlowObject
|
|
|
9
9
|
produces :stages, :inputs, :outputs
|
|
10
10
|
|
|
11
11
|
class << self
|
|
12
|
-
attr_reader :in, :out
|
|
12
|
+
attr_reader :in, :out
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
extend Forwardable
|
|
@@ -54,13 +54,8 @@ module FlowObject
|
|
|
54
54
|
self
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
def
|
|
58
|
-
|
|
59
|
-
self
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def call(flow: :main, &block)
|
|
63
|
-
fo_resolve(fo_process(flow: flow, &block))
|
|
57
|
+
def call(input:, flow: :main, &block)
|
|
58
|
+
fo_resolve(fo_process(input, flow: flow, &block))
|
|
64
59
|
end
|
|
65
60
|
|
|
66
61
|
def flow(name = :main, &block)
|
|
@@ -73,8 +68,8 @@ module FlowObject
|
|
|
73
68
|
false
|
|
74
69
|
end
|
|
75
70
|
|
|
76
|
-
def fo_process(flow: :main, &block)
|
|
77
|
-
plan = fo_build_flow(flow, self.in, :input, fo_wrap_input)
|
|
71
|
+
def fo_process(input, flow: :main, &block)
|
|
72
|
+
plan = fo_build_flow(flow, self.in, :input, fo_wrap_input(input))
|
|
78
73
|
callbacks = Callbacks.new(@callbacks_allowlist)
|
|
79
74
|
block.call(callbacks) if block_given?
|
|
80
75
|
Runner.new(plan, callbacks, method(:halt_flow?)).execute_plan
|
|
@@ -86,7 +81,7 @@ module FlowObject
|
|
|
86
81
|
send(:"hospodar_execute_plan_for_#{flow}", plan)
|
|
87
82
|
end
|
|
88
83
|
|
|
89
|
-
def fo_wrap_input
|
|
84
|
+
def fo_wrap_input(*initial_values)
|
|
90
85
|
return initial_values if self.in.nil?
|
|
91
86
|
|
|
92
87
|
input_class = public_send(:"#{self.in}_input_class")
|
data/lib/flow_object/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flow_object
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrii Baran
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-11-
|
|
11
|
+
date: 2021-11-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: hospodar
|