trailblazer-activity 0.16.1 → 0.16.3
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/.github/workflows/ci.yml +2 -2
- data/CHANGES.md +9 -0
- data/Gemfile +1 -2
- data/lib/trailblazer/activity/schema/compiler.rb +1 -1
- data/lib/trailblazer/activity/testing.rb +6 -6
- data/lib/trailblazer/activity/version.rb +1 -1
- data/lib/trailblazer/activity.rb +0 -2
- 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: d337611d8f737a90f05b16ad72442808bb373351ff81ae908fde441492fe72f2
|
|
4
|
+
data.tar.gz: 705b4f0de152cf24b0be9dead73aa2cde4f59cce80548a4a44737b061be76e3a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77173535922167fbc51c4bcc92909dea8e263313d97ef7ce47716ddbadc0a82ece0d511deccb57badc1adecb61fe2276594cf561642931da9cc243c2960fd9b7
|
|
7
|
+
data.tar.gz: e2157a80cbfdea6cc573bec8bdbb1933667e17335229aa9690051b3cb34bd0adb4613991621332debde5b34cb00993e9595169d154c8861db8857313deba4d66
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -6,10 +6,10 @@ jobs:
|
|
|
6
6
|
fail-fast: false
|
|
7
7
|
matrix:
|
|
8
8
|
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
|
9
|
-
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, head, jruby, jruby-head]
|
|
9
|
+
ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3, head, jruby, jruby-head]
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
13
|
- uses: ruby/setup-ruby@v1
|
|
14
14
|
with:
|
|
15
15
|
ruby-version: ${{ matrix.ruby }}
|
data/CHANGES.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# 0.16.3
|
|
2
|
+
|
|
3
|
+
* Fix a bug in Ruby 3.2: `NoMethodError: undefined method `[]' for nil`. Thanks @tiagotex for finding the problem
|
|
4
|
+
and solution. This bug only occurs when compacting the memory using GC, which is only introduced with Ruby 3.2.
|
|
5
|
+
|
|
6
|
+
# 0.16.2
|
|
7
|
+
|
|
8
|
+
* Allow passing custom `:flow_options` to `Testing#assert_invoke`.
|
|
9
|
+
|
|
1
10
|
# 0.16.1
|
|
2
11
|
|
|
3
12
|
* Allow overriding `Activity.call`.
|
data/Gemfile
CHANGED
|
@@ -24,7 +24,7 @@ module Trailblazer
|
|
|
24
24
|
|
|
25
25
|
# From the intermediate "template" and the actual implementation, compile a {Circuit} instance.
|
|
26
26
|
def schema_components(intermediate, implementation, config)
|
|
27
|
-
wiring = {}
|
|
27
|
+
wiring = {}.compare_by_identity # https://ruby-doc.org/3.3.0/Hash.html#class-Hash-label-Modifying+an+Active+Hash+Key
|
|
28
28
|
nodes_attributes = []
|
|
29
29
|
|
|
30
30
|
intermediate.wiring.each do |task_ref, outs|
|
|
@@ -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
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.3
|
|
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-10-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: trailblazer-context
|