trailblazer-activity-dsl-linear 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb92b49935156ee66dcf347cfe7b803cc3be0222ebf84ee676923e48bfb20ea2
4
- data.tar.gz: 802be96cb11290483f4b326d9251933b7783f230dbf8cf6f6bf6781b64bb6a4e
3
+ metadata.gz: 7165d0ed5fb1156889d053820bc33458a48311b06c94f3672916d7c44918584b
4
+ data.tar.gz: 34bca5249048b8d2a29ee21e8e02d85b8bc82b013cca5fce4b571a6c47b04de9
5
5
  SHA512:
6
- metadata.gz: 3b408a672b9ad2ccbd09352ede7f47938f3506c687a7204ac762da44abd949a9788f61fd7dce096e41c222dafcbc6ee67c4ee304aede850f7f7ffcae90b42137
7
- data.tar.gz: 4f13684ec5f770e321f713747460b095033ff39e2c1e9b67f9afc82ac69bec057d4f5e32f4342d88fb763344be9f710aa42e04026fcc44dd824d66a7517e4c69
6
+ metadata.gz: 30dc6d36f2fe0758bd880f961754bc0ba11e926e39414c33b6f39f8a9234251d18914c1701203a3a83c5604d4cd0ee07716c270f661b77440de88e642566738c
7
+ data.tar.gz: a0b6d296d7fb3bbe5dc64c0c7bfcfea8586a0aad590730456efaaa2536c18dcebfe0d7d440377c20bde6978b99dfced5908898e66ced2c11f4cee4eae4c2bc65
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.3.1
2
+
3
+ * Fixes in circuit interface normalization when given task is a {Symbol}, consider additional {task} options (like {id}) and assign {task} symbol as an {id}.
4
+
1
5
  # 0.3.0
2
6
 
3
7
  * Fix circuit interface callable to make `step task: :instance_method` use circuit signature.
@@ -57,23 +57,24 @@ module Trailblazer
57
57
  options = case ctx[:options]
58
58
  when Hash
59
59
  # Circuit Interface
60
- task = ctx[:options].fetch(:task)
60
+ task = ctx[:options].fetch(:task)
61
+ id = ctx[:options][:id]
61
62
 
62
63
  if task.is_a?(Symbol)
63
- # step task: :find
64
- { options: { task: Trailblazer::Option( task ) } }
64
+ # step task: :find, id: :load
65
+ { **ctx[:options], id: (id || task), task: Trailblazer::Option( task ) }
65
66
  else
66
67
  # step task: Callable, ... (Subprocess, Proc, macros etc)
67
- { task: task }
68
+ ctx[:options] # NOOP
68
69
  end
69
70
  else
70
71
  # Step Interface
71
72
  # step :find, ...
72
73
  # step Callable, ... (Method, Proc etc)
73
- { options: { task: ctx[:options], wrap_task: true } }
74
+ { task: ctx[:options], wrap_task: true }
74
75
  end
75
76
 
76
- return Trailblazer::Activity::Right, [ctx.merge(options), flow_options]
77
+ return Trailblazer::Activity::Right, [ctx.merge(options: options), flow_options]
77
78
  end
78
79
 
79
80
  def wrap_task_with_step_interface((ctx, flow_options), **)
@@ -3,7 +3,7 @@ module Trailblazer
3
3
  module Activity
4
4
  module DSL
5
5
  module Linear
6
- VERSION = "0.3.0"
6
+ VERSION = "0.3.1"
7
7
  end
8
8
  end
9
9
  end
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.3.0
4
+ version: 0.3.1
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-08-10 00:00:00.000000000 Z
11
+ date: 2020-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-activity