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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1f9924623a3e82ffce7398379c645bc0d6502e66d1d827231fb12b108e40978
4
- data.tar.gz: 8a2f575d512c830e3ea29d2cff65ac8aed6f86cf75364a516102664c2928c928
3
+ metadata.gz: f2333c41e1962d218d94a14572f7c8c955e5510b294ca0ea27ac2828898719c9
4
+ data.tar.gz: 0a4fc49084a5e359ec3a0780d4f63a839a25fd0d63006c02c462224ee65d3f71
5
5
  SHA512:
6
- metadata.gz: 9b817a46e644b31127385bcac23a5ec122a5bdd4cb9fd3a425f4d92a1be3d4e2fb35a70f28d13850902116a892bd445df3e4c795b895557bdf085de7505f2c71
7
- data.tar.gz: fc0f421d1bcfa2c3ccf08f599ffa503c7d0cf7b8a64a387d88270ad68466e00f2cd79654b4a71ead8bf4425a231272b6ef6089dd5e5416d56f4961c7cba0f97d
6
+ metadata.gz: 606002eb9724eee10e09459b4d47e0802ba84287a822283fcb1145f8b2097580e5d99942f7702d79145556226c2524112a1007f3dfa5201f8453dd5dd3ba704a
7
+ data.tar.gz: 3916c8bfe99dbba20f8b6f9aed7a3d2c300b7f2bcc868ab751c00f22cd6db949ea6b77977a511366cdd89a04409ae84a96a92c9987133e454cf6e500a3720a45
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.0.4
2
+
3
+ * Use new `context-0.3.1`.
4
+ * Don't use `wtf?`.
5
+
1
6
  # 0.0.3
2
7
 
3
8
  * Introduce `Options`.
@@ -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::IndifferentAccess.build(domain_ctx, {}, [domain_ctx, flow_options], circuit_options)
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::IndifferentAccess.build(runtime_options, {}, [{}, {}], {}) # FIXME: easier {::build}, please!
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
@@ -1,5 +1,5 @@
1
1
  module Trailblazer
2
2
  class Endpoint
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -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.2.9", "< 0.4.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.3
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-07-31 00:00:00.000000000 Z
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.2.9
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.2.9
29
+ version: 0.3.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 0.4.0