trailblazer-activity 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -0
- data/Gemfile +1 -1
- data/LICENSE +9 -0
- data/lib/trailblazer/activity/task_wrap/inject.rb +2 -2
- data/lib/trailblazer/activity/task_wrap/variable_mapping.rb +3 -5
- data/lib/trailblazer/activity/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f50cd0494bec7054e6dda24aaf8d2a2aff9575aa4c6a0e5a4ee2a526ba01eb3
|
4
|
+
data.tar.gz: 0ed8764ab5f77fceeae9c097c151514e797146f755672434ea38dfcf521c95ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40da5dd6bd2ff3379609261e4270e4071cee4cac78d710300d043e11b8780b90dff4bd898fb8b0972410d0d19f92967c90e1141931e96737e35bbe510a925092
|
7
|
+
data.tar.gz: '00863321ebfb71d0b2799e88c0c7b9af9bc7781b44887bbbc5566720633f5c650de8992332eac6b75cf25438d9d6204da89c7d1d118d166b1a30da41da1b1aa2'
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 0.9.0
|
2
|
+
|
3
|
+
* Change API of `Input`/`Output` filters. Instead of calling them with `original_ctx, circuit_options` they're now called with the complete (original!) circuit interface. This simplifies calling and provides all circuit arguments to the filter which can then filter-out what is not needed.
|
4
|
+
* `:input` is now called with `((original_ctx, flow_options), circuit_options)`
|
5
|
+
* `:output` is now called with `(new_ctx, (original_ctx, flow_options), circuit_options)`
|
6
|
+
|
1
7
|
# 0.8.4
|
2
8
|
* Update `Present` to render `Developer.wtf?` for given activity fearlessly
|
3
9
|
|
data/Gemfile
CHANGED
@@ -8,6 +8,6 @@ gem "minitest-line"
|
|
8
8
|
|
9
9
|
gem "rubocop", require: false
|
10
10
|
|
11
|
-
|
11
|
+
gem "trailblazer-context", path: "../trailblazer-context"
|
12
12
|
# gem "trailblazer-developer", path: "../trailblazer-developer"
|
13
13
|
# gem "trailblazer-developer", github: "trailblazer/trailblazer-developer", branch: "exception-tracing"
|
data/LICENSE
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
Copyright (c) 2018 Trailblazer GmbH
|
2
|
+
|
3
|
+
Trailblazer is an Open Source project licensed under the terms of
|
4
|
+
the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
|
5
|
+
for license text.
|
6
|
+
|
7
|
+
Trailblazer PRO has a commercial-friendly license allowing private forks
|
8
|
+
and modifications of Trailblazer. Please see http://trailblazer.to/pro for
|
9
|
+
more detail.
|
@@ -8,7 +8,7 @@ class Trailblazer::Activity
|
|
8
8
|
|
9
9
|
def Extension(defaults)
|
10
10
|
# Returns new ctx.
|
11
|
-
input = ->(original_ctx) do
|
11
|
+
input = ->((original_ctx, flow_options), circuit_options) do
|
12
12
|
defaulted_options = defaults_for(defaults, original_ctx)
|
13
13
|
|
14
14
|
ctx = original_ctx.merge(defaulted_options)
|
@@ -16,7 +16,7 @@ class Trailblazer::Activity
|
|
16
16
|
Trailblazer::Context.for(ctx, [original_ctx, {}], {})
|
17
17
|
end
|
18
18
|
|
19
|
-
output = ->(original_ctx,
|
19
|
+
output = ->(new_ctx, (original_ctx, flow_options), circuit_options) { # FIXME: use Unscope
|
20
20
|
_, mutable_data = new_ctx.decompose
|
21
21
|
|
22
22
|
# we are only interested in the {mutable_data} part since the disposed part
|
@@ -9,9 +9,6 @@ class Trailblazer::Activity
|
|
9
9
|
module VariableMapping
|
10
10
|
# The taskWrap extension that's included into the static taskWrap for a task.
|
11
11
|
def self.Extension(input, output, id: input.object_id)
|
12
|
-
input = Trailblazer::Option(input)
|
13
|
-
output = Trailblazer::Option(output)
|
14
|
-
|
15
12
|
Trailblazer::Activity::TaskWrap::Extension(
|
16
13
|
merge: merge_for(input, output, id: id),
|
17
14
|
)
|
@@ -58,8 +55,9 @@ class Trailblazer::Activity
|
|
58
55
|
|
59
56
|
private
|
60
57
|
|
58
|
+
# Invoke the @filter callable with the original circuit interface.
|
61
59
|
def apply_filter((ctx, original_flow_options), original_circuit_options)
|
62
|
-
@filter.(
|
60
|
+
@filter.([ctx, original_flow_options], original_circuit_options) # returns {new_ctx}.
|
63
61
|
end
|
64
62
|
end
|
65
63
|
|
@@ -78,7 +76,7 @@ class Trailblazer::Activity
|
|
78
76
|
returned_ctx, _ = wrap_ctx[:return_args] # this is the Context returned from {call}ing the wrapped user task.
|
79
77
|
original_ctx = wrap_ctx[@id] # grab the original ctx from before which was set in the {:input} filter.
|
80
78
|
# let user compute the output.
|
81
|
-
output_ctx = @filter.(original_ctx,
|
79
|
+
output_ctx = @filter.(returned_ctx, [original_ctx, original_flow_options], original_circuit_options)
|
82
80
|
|
83
81
|
wrap_ctx = wrap_ctx.merge( return_args: [output_ctx, original_flow_options] )
|
84
82
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-activity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.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: 2019-
|
11
|
+
date: 2019-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trailblazer-context
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- ".travis.yml"
|
95
95
|
- CHANGES.md
|
96
96
|
- Gemfile
|
97
|
+
- LICENSE
|
97
98
|
- NOTES
|
98
99
|
- README.md
|
99
100
|
- Rakefile
|