trailblazer-activity 0.16.1 → 0.16.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4aface39f365f86ef2fdc9c271821747c47724ff939e3b2d9ff9c914e67fe42
4
- data.tar.gz: 0b9ad9c43f7d1194d6d36be9a52b18f64ea2153eb08002c7ae6d90afca21c1a9
3
+ metadata.gz: f4a5444cfd580cf5951c7a9162bfb87c1f2cba25bb1784e89fc95abd0e4adc3d
4
+ data.tar.gz: c10bb8bd651379e99728295c9e396f5ce8cf0c9c73802eadb65aafd6add98816
5
5
  SHA512:
6
- metadata.gz: f1327d35677ed3fcc721aaf12dd58c8f54f253303b1eb27a01dcf02446c10e1f63ef3004ca1cda4ec7146839029077072893b149c365d3d88e5eb9c7b5f471d2
7
- data.tar.gz: 25caa1eece8642ed5d564a3f6acc958c0498f1aff016cc1b61a6cb54c3761f60f8a52ab23b6e0cbed00c714196b821091bd96edce17f6fcb0ab0d69667fd1154
6
+ metadata.gz: ba411bc9536d33433c619c54edc520985686e88f56f099208fac002a90631faf1d3102861ad886628e4f0b99fc77ee19ad6be4f0cb9564b7222d337d71353db3
7
+ data.tar.gz: 831c793c0c0515e4672dbc661ba49680dcd101ab1a6b489f88b021a7b9db546dfaf5963458f26340b23c97739e3e65d495f77c10ba3d6a58a7430e01c4d9b3f5
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.16.2
2
+
3
+ * Allow passing custom `:flow_options` to `Testing#assert_invoke`.
4
+
1
5
  # 0.16.1
2
6
 
3
7
  * Allow overriding `Activity.call`.
data/Gemfile CHANGED
@@ -2,5 +2,4 @@ source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
4
  # gem "trailblazer-developer", path: "../trailblazer-developer"
5
- gem "benchmark-ips"
6
- gem "standard"
5
+ # gem "benchmark-ips"
@@ -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, _flow_options) = Activity::TaskWrap.invoke(
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
- {} # flow_options
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
- inspects = semantics.collect { |semantic| %(#<struct Trailblazer::Activity::Output signal=#<Trailblazer::Activity::End semantic=#{semantic.inspect}>, semantic=#{semantic.inspect}>) }
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
 
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  module Version
3
3
  module Activity
4
- VERSION = "0.16.1"
4
+ VERSION = "0.16.2"
5
5
  end
6
6
  end
7
7
  end
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.1
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: 2023-08-09 00:00:00.000000000 Z
11
+ date: 2024-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-context