trailblazer-endpoint 0.0.3 → 0.0.4
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 +5 -0
- data/lib/trailblazer/endpoint.rb +4 -3
- data/lib/trailblazer/endpoint/options.rb +3 -2
- data/lib/trailblazer/endpoint/version.rb +1 -1
- data/trailblazer-endpoint.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2333c41e1962d218d94a14572f7c8c955e5510b294ca0ea27ac2828898719c9
|
4
|
+
data.tar.gz: 0a4fc49084a5e359ec3a0780d4f63a839a25fd0d63006c02c462224ee65d3f71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 606002eb9724eee10e09459b4d47e0802ba84287a822283fcb1145f8b2097580e5d99942f7702d79145556226c2524112a1007f3dfa5201f8453dd5dd3ba704a
|
7
|
+
data.tar.gz: 3916c8bfe99dbba20f8b6f9aed7a3d2c300b7f2bcc868ab751c00f22cd6db949ea6b77977a511366cdd89a04409ae84a96a92c9987133e454cf6e500a3720a45
|
data/CHANGES.md
CHANGED
data/lib/trailblazer/endpoint.rb
CHANGED
@@ -49,10 +49,11 @@ module Trailblazer
|
|
49
49
|
|
50
50
|
# Runtime
|
51
51
|
# Invokes the endpoint for you and runs one of the three outcome blocks.
|
52
|
-
def self.with_or_etc(activity, args, failure_block:, success_block:, protocol_failure_block:)
|
52
|
+
def self.with_or_etc(activity, args, failure_block:, success_block:, protocol_failure_block:, invoke: Trailblazer::Developer.method(:wtf?))
|
53
53
|
# args[1] = args[1].merge(focus_on: { variables: [:returned], steps: :invoke_workflow })
|
54
54
|
|
55
|
-
signal, (endpoint_ctx, _ ) = Trailblazer::Developer.wtf?(activity, args)
|
55
|
+
# signal, (endpoint_ctx, _ ) = Trailblazer::Developer.wtf?(activity, args)
|
56
|
+
signal, (endpoint_ctx, _ ) = invoke.call(activity, args) # translates to Trailblazer::Developer.wtf?(activity, args)
|
56
57
|
|
57
58
|
# this ctx is passed to the controller block.
|
58
59
|
block_ctx = endpoint_ctx[:domain_ctx].merge(endpoint_ctx: endpoint_ctx, signal: signal, errors: endpoint_ctx[:errors]) # DISCUSS: errors? status?
|
@@ -77,7 +78,7 @@ module Trailblazer
|
|
77
78
|
|
78
79
|
#@ For WORKFLOW and operations. not sure this method will stay here.
|
79
80
|
def self.arguments_for(domain_ctx:, flow_options:, circuit_options: {}, **endpoint_options)
|
80
|
-
domain_ctx = Trailblazer::Context
|
81
|
+
domain_ctx = Trailblazer::Context(domain_ctx, {}, flow_options[:context_options])
|
81
82
|
|
82
83
|
[
|
83
84
|
[
|
@@ -51,9 +51,10 @@ module Trailblazer
|
|
51
51
|
def options_for(directive_name, runtime_options)
|
52
52
|
normalizer = @normalizers[directive_name]
|
53
53
|
|
54
|
-
ctx = Trailblazer::Context
|
54
|
+
ctx = Trailblazer::Context(runtime_options, {})
|
55
55
|
|
56
|
-
signal, (ctx, ) = Trailblazer::Developer.wtf?(normalizer, [ctx])
|
56
|
+
# signal, (ctx, ) = Trailblazer::Developer.wtf?(normalizer, [ctx])
|
57
|
+
signal, (ctx, ) = Trailblazer::Activity::TaskWrap.invoke(normalizer, [ctx])
|
57
58
|
|
58
59
|
_, options = ctx.decompose
|
59
60
|
options
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "trailblazer-activity-dsl-linear", ">= 0.
|
20
|
+
spec.add_dependency "trailblazer-activity-dsl-linear", ">= 0.3.0", "< 0.4.0"
|
21
21
|
|
22
22
|
spec.add_development_dependency "bundler"
|
23
23
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-endpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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-
|
11
|
+
date: 2020-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trailblazer-activity-dsl-linear
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.3.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 0.4.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.3.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 0.4.0
|