trailblazer-activity-dsl-linear 0.2.9 → 0.3.0
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/CHANGES.md +4 -0
- data/lib/trailblazer/activity/dsl/linear/normalizer.rb +16 -12
- data/lib/trailblazer/activity/dsl/linear/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb92b49935156ee66dcf347cfe7b803cc3be0222ebf84ee676923e48bfb20ea2
|
4
|
+
data.tar.gz: 802be96cb11290483f4b326d9251933b7783f230dbf8cf6f6bf6781b64bb6a4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b408a672b9ad2ccbd09352ede7f47938f3506c687a7204ac762da44abd949a9788f61fd7dce096e41c222dafcbc6ee67c4ee304aede850f7f7ffcae90b42137
|
7
|
+
data.tar.gz: 4f13684ec5f770e321f713747460b095033ff39e2c1e9b67f9afc82ac69bec057d4f5e32f4342d88fb763344be9f710aa42e04026fcc44dd824d66a7517e4c69
|
data/CHANGES.md
CHANGED
@@ -54,22 +54,26 @@ module Trailblazer
|
|
54
54
|
# Specific to the "step DSL": if the first argument is a callable, wrap it in a {step_interface_builder}
|
55
55
|
# since its interface expects the step interface, but the circuit will call it with circuit interface.
|
56
56
|
def normalize_step_interface((ctx, flow_options), *)
|
57
|
-
options = case
|
57
|
+
options = case ctx[:options]
|
58
58
|
when Hash
|
59
|
-
#
|
60
|
-
|
59
|
+
# Circuit Interface
|
60
|
+
task = ctx[:options].fetch(:task)
|
61
|
+
|
62
|
+
if task.is_a?(Symbol)
|
63
|
+
# step task: :find
|
64
|
+
{ options: { task: Trailblazer::Option( task ) } }
|
65
|
+
else
|
66
|
+
# step task: Callable, ... (Subprocess, Proc, macros etc)
|
67
|
+
{ task: task }
|
68
|
+
end
|
61
69
|
else
|
62
|
-
|
70
|
+
# Step Interface
|
71
|
+
# step :find, ...
|
72
|
+
# step Callable, ... (Method, Proc etc)
|
73
|
+
{ options: { task: ctx[:options], wrap_task: true } }
|
63
74
|
end
|
64
75
|
|
65
|
-
|
66
|
-
# task = wrap_with_step_interface(task: options, step_interface_builder: ctx[:user_options][:step_interface_builder]) # TODO: make this optional with appropriate wiring.
|
67
|
-
task = options
|
68
|
-
|
69
|
-
ctx = ctx.merge(options: {task: task, wrap_task: true})
|
70
|
-
end
|
71
|
-
|
72
|
-
return Trailblazer::Activity::Right, [ctx, flow_options]
|
76
|
+
return Trailblazer::Activity::Right, [ctx.merge(options), flow_options]
|
73
77
|
end
|
74
78
|
|
75
79
|
def wrap_task_with_step_interface((ctx, flow_options), **)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-activity-dsl-linear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trailblazer-activity
|
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.7.6
|
138
|
+
rubygems_version: 3.0.8
|
140
139
|
signing_key:
|
141
140
|
specification_version: 4
|
142
141
|
summary: Simple DSL to define Trailblazer activities.
|