trailblazer-activity 0.16.0 → 0.16.2
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 +8 -0
- data/Gemfile +1 -2
- data/Rakefile +1 -1
- data/lib/trailblazer/activity/testing.rb +6 -6
- data/lib/trailblazer/activity/version.rb +1 -1
- data/lib/trailblazer/activity.rb +8 -4
- 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: f4a5444cfd580cf5951c7a9162bfb87c1f2cba25bb1784e89fc95abd0e4adc3d
|
|
4
|
+
data.tar.gz: c10bb8bd651379e99728295c9e396f5ce8cf0c9c73802eadb65aafd6add98816
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba411bc9536d33433c619c54edc520985686e88f56f099208fac002a90631faf1d3102861ad886628e4f0b99fc77ee19ad6be4f0cb9564b7222d337d71353db3
|
|
7
|
+
data.tar.gz: 831c793c0c0515e4672dbc661ba49680dcd101ab1a6b489f88b021a7b9db546dfaf5963458f26340b23c97739e3e65d495f77c10ba3d6a58a7430e01c4d9b3f5
|
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
|
@@ -4,7 +4,7 @@ require "rake/testtask"
|
|
|
4
4
|
Rake::TestTask.new(:test) do |t|
|
|
5
5
|
t.libs << "test"
|
|
6
6
|
t.libs << "lib"
|
|
7
|
-
t.test_files = FileList["test/**/*_test.rb"]
|
|
7
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
task default: %i[test]
|
|
@@ -55,17 +55,19 @@ module Trailblazer
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
# Use {TaskWrap.invoke} to call the activity.
|
|
58
|
-
def assert_invoke(activity, terminus: :success, seq: "[]", circuit_options: {}, expected_ctx_variables: {}, **ctx_variables)
|
|
59
|
-
signal, (ctx,
|
|
58
|
+
def assert_invoke(activity, terminus: :success, seq: "[]", circuit_options: {}, flow_options: {}, expected_ctx_variables: {}, **ctx_variables)
|
|
59
|
+
signal, (ctx, returned_flow_options) = Activity::TaskWrap.invoke(
|
|
60
60
|
activity,
|
|
61
61
|
[
|
|
62
62
|
{seq: [], **ctx_variables},
|
|
63
|
-
|
|
63
|
+
flow_options,
|
|
64
64
|
],
|
|
65
65
|
**circuit_options
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
assert_call_for(signal, ctx, terminus: terminus, seq: seq, **ctx_variables, **expected_ctx_variables) # DISCUSS: ordering of variables?
|
|
69
|
+
|
|
70
|
+
return signal, [ctx, returned_flow_options]
|
|
69
71
|
end
|
|
70
72
|
|
|
71
73
|
def assert_call_for(signal, ctx, terminus: :success, seq: "[]", **ctx_variables)
|
|
@@ -80,9 +82,7 @@ module Trailblazer
|
|
|
80
82
|
def assert_process_for(process, *args)
|
|
81
83
|
semantics, circuit = args[0..-2], args[-1]
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
assert_equal %([#{inspects.join(", ")}]), process.to_h[:outputs].inspect
|
|
85
|
+
assert_equal semantics.sort, process.to_h[:outputs].collect { |output| output[:semantic] }.sort
|
|
86
86
|
|
|
87
87
|
assert_circuit(process, circuit)
|
|
88
88
|
|
data/lib/trailblazer/activity.rb
CHANGED
|
@@ -24,11 +24,15 @@ module Trailblazer
|
|
|
24
24
|
%(#<Trailblazer::Activity:0x#{object_id}>)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
module Call
|
|
28
|
+
# Canonical entry-point to invoke an {Activity} or Strategy such as {Activity::Railway}
|
|
29
|
+
# with its taskWrap.
|
|
30
|
+
def call(activity, ctx)
|
|
31
|
+
TaskWrap.invoke(activity, [ctx, {}])
|
|
32
|
+
end
|
|
31
33
|
end
|
|
34
|
+
|
|
35
|
+
extend Call # {Activity.call}.
|
|
32
36
|
end # Activity
|
|
33
37
|
end
|
|
34
38
|
|
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.16.
|
|
4
|
+
version: 0.16.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Sutterer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-03-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: trailblazer-context
|