trailblazer 2.1.0.beta2 → 2.1.0.beta3

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
  SHA1:
3
- metadata.gz: 06ab38e2e1e0ab6f3f33f99c67339bdac6968899
4
- data.tar.gz: 99665d7f89a35e6233be5b60840b3fc9bf9371c3
3
+ metadata.gz: 36d27170113024b0c2af51f22fc1abc6042c6a68
4
+ data.tar.gz: 7483dd6c7482d06e332dd4b0ff9b74dd6afe4d91
5
5
  SHA512:
6
- metadata.gz: 054a5b83293c9f19cf84503a8b250f48efd0f3c981c83bb74270bbd4995ac7e069ba7d71c0f813fad6a20bb17cb31dc732e3961753cfc119c4bf6431ca5ee5b4
7
- data.tar.gz: 11013047208e46130eeed97575ec35b80825f59136e3ce188ffe00b1e855b46e7b34718d177959bfba36b1cd880fc244ee6dc7cd35e7dd11674d10862df543e9
6
+ metadata.gz: b05d29959550818ae9103231ac9716f3ebb8a074139d1b4a0e5b0f3a8e48e724dfe348e09fc18356412b9874dd4be930ba91148736b49c930946316fa54e358a
7
+ data.tar.gz: e5d373cd46eb4b2823df61256e03aa68ed98df9ad84a58b6ac96add3520fafc5577cfbcfa9adcf1dd460698db6219f9aa4136430f2ff8d632eaa0a01f6b6d744
data/CHANGES.md CHANGED
@@ -29,6 +29,10 @@ document Task API and define step API
29
29
  deprecate step->(options) ?
30
30
  injectable, per-operation step arguments strategy?
31
31
 
32
+ # 2.1.0.beta3
33
+
34
+ * More simplifications because of `activity`.
35
+
32
36
  # 2.1.0.beta2
33
37
 
34
38
  * Simplify `Nested` and several other internals by using the new `Activity` API.
@@ -20,10 +20,10 @@ module Trailblazer
20
20
  end
21
21
 
22
22
  {
23
- task: task,
24
- id: id,
25
- extension: [ Trailblazer::Activity::TaskWrap::Merge.new(task_wrap_extensions) ],
26
- plus_poles: Activity::Magnetic::DSL::PlusPoles.from_outputs(operation.outputs) # @needs operation#outputs
23
+ task: task,
24
+ id: id,
25
+ extension: [ Trailblazer::Activity::TaskWrap::Merge.new(task_wrap_extensions) ],
26
+ outputs: operation.outputs
27
27
  }
28
28
  end
29
29
 
@@ -56,8 +56,8 @@ module Trailblazer
56
56
  def initialize(nested_activity)
57
57
  @nested_activity = Trailblazer::Option::KW(nested_activity)
58
58
  @outputs = {
59
- :success => Activity::Output( Railway::End::Success.new(:success), :success ),
60
- :failure => Activity::Output( Railway::End::Failure.new(:failure), :failure ),
59
+ :success => Activity::Output( Railway::End::Success.new(semantic: :success), :success ),
60
+ :failure => Activity::Output( Railway::End::Failure.new(semantic: :failure), :failure ),
61
61
  }
62
62
  end
63
63
 
@@ -22,7 +22,7 @@ module Trailblazer
22
22
  # activity, _ = activity.decompose
23
23
 
24
24
  # DISCUSS: use Nested here?
25
- { task: activity, id: "contract.#{name}.validate", plus_poles: Activity::Magnetic::DSL::PlusPoles.from_outputs(activity.outputs) }
25
+ { task: activity, id: "contract.#{name}.validate", outputs: activity.outputs }
26
26
  end
27
27
 
28
28
  class Validate
@@ -8,7 +8,7 @@ class Trailblazer::Operation
8
8
 
9
9
  # connect `false` as an end event, when an exception stopped the wrap, for example.
10
10
 
11
- { task: wrapped, id: id, plus_poles: Trailblazer::Activity::Magnetic::DSL::PlusPoles.from_outputs(operation_class.outputs) }
11
+ { task: wrapped, id: id, outputs: operation_class.outputs }
12
12
  # TODO: Nested could have a better API and do the "merge" for us!
13
13
  end
14
14
 
@@ -28,7 +28,7 @@ class Trailblazer::Operation
28
28
 
29
29
  def call( (options, flow_options), **circuit_options )
30
30
  block_calling_wrapped = -> {
31
- activity = @operation.decompose[:activity]
31
+ activity = @operation.to_h[:activity]
32
32
 
33
33
  activity.( [options, flow_options], **circuit_options )
34
34
  }
@@ -1,3 +1,3 @@
1
1
  module Trailblazer
2
- VERSION = "2.1.0.beta2"
2
+ VERSION = "2.1.0.beta3"
3
3
  end
@@ -62,15 +62,15 @@ class DocsContractOverviewTest < Minitest::Spec
62
62
 
63
63
  it "shows 2-level tracing" do
64
64
  result = Create.trace( params: { length: "A" } )
65
- result.wtf.gsub(/0x\w+/, "").must_equal %{|-- #<Trailblazer::Activity::Start:>
65
+ result.wtf.gsub(/0x\w+/, "").must_equal %{|-- #<Trailblazer::Activity::Start semantic=:default>
66
66
  |-- model.build
67
67
  |-- contract.build
68
68
  |-- contract.default.validate
69
- | |-- #<Trailblazer::Activity::Start:>
69
+ | |-- #<Trailblazer::Activity::Start semantic=:default>
70
70
  | |-- contract.default.params_extract
71
71
  | |-- contract.default.call
72
- | `-- #<Trailblazer::Activity::End:>
73
- `-- #<Trailblazer::Operation::Railway::End::Failure:>}
72
+ | `-- #<Trailblazer::Activity::End semantic=:failure>
73
+ `-- #<Trailblazer::Operation::Railway::End::Failure semantic=:failure>}
74
74
  end
75
75
  end
76
76
 
@@ -38,10 +38,10 @@ class DocsTraceTest < Minitest::Spec
38
38
  # `-- End.success
39
39
  #:trace end
40
40
 
41
- result.wtf.gsub(/0x\w+/, "").must_equal %{|-- #<Trailblazer::Activity::Start:>
41
+ result.wtf.gsub(/0x\w+/, "").must_equal %{|-- #<Trailblazer::Activity::Start semantic=:default>
42
42
  |-- model.build
43
43
  |-- contract.build
44
- `-- #<Trailblazer::Operation::Railway::End::Success:>}
44
+ `-- #<Trailblazer::Operation::Railway::End::Success semantic=:success>}
45
45
  end
46
46
 
47
47
  it do
@@ -141,18 +141,18 @@ the scoping.
141
141
  it "with tracing" do
142
142
  result = DiscreetOrganization.trace("public_opinion" => "Freedom!")
143
143
 
144
- result.wtf.gsub(/0x\w+/, "").gsub(/\d+/, "").must_equal %{|-- #<Trailblazer::Activity::Start:>
144
+ result.wtf.gsub(/0x\w+/, "").gsub(/\d+/, "").must_equal %{|-- #<Trailblazer::Activity::Start semantic=:default>
145
145
  |-- set.rumours
146
146
  |-- set.secret
147
147
  |-- Nested(VariablesTest::Whistleblower)
148
- | |-- #<Trailblazer::Activity::Start:>
148
+ | |-- #<Trailblazer::Activity::Start semantic=:default>
149
149
  | |-- edward.public_opinion
150
150
  | |-- edward.secret
151
151
  | |-- edward.test
152
152
  | |-- edward.read.public_knowledge
153
- | `-- #<Trailblazer::Operation::Railway::End::Success:>
153
+ | `-- #<Trailblazer::Operation::Railway::End::Success semantic=:success>
154
154
  |-- read.edward.rumours
155
155
  |-- read.edward.secret
156
- `-- #<Trailblazer::Operation::Railway::End::Failure:>}
156
+ `-- #<Trailblazer::Operation::Railway::End::Failure semantic=:failure>}
157
157
  end
158
158
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.version = Trailblazer::VERSION
8
8
  spec.authors = ["Nick Sutterer"]
9
9
  spec.email = ["apotonick@gmail.com"]
10
- spec.description = %q{A high-level architecture for Ruby introducing new abstractions such as operations, form objects or policies.}
10
+ spec.description = %q{A high-level architecture introducing new abstractions such as control flow, operations, form objects or policies.}
11
11
  spec.summary = %q{A high-level architecture for Ruby and Rails.}
12
12
  spec.homepage = "http://trailblazer.to"
13
13
  spec.license = "LGPL-3.0"
@@ -18,6 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_dependency "trailblazer-operation", ">= 0.2.0", "< 0.3.0"
21
+ spec.add_dependency "trailblazer-activity", ">= 0.4.3", "< 0.6.0"
22
+
21
23
  spec.add_dependency "reform", ">= 2.2.0", "< 3.0.0"
22
24
  spec.add_dependency "declarative"
23
25
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.beta2
4
+ version: 2.1.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-23 00:00:00.000000000 Z
11
+ date: 2018-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-operation
@@ -30,6 +30,26 @@ dependencies:
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 0.3.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: trailblazer-activity
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.4.3
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: 0.6.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.4.3
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: 0.6.0
33
53
  - !ruby/object:Gem::Dependency
34
54
  name: reform
35
55
  requirement: !ruby/object:Gem::Requirement
@@ -148,8 +168,8 @@ dependencies:
148
168
  - - ">="
149
169
  - !ruby/object:Gem::Version
150
170
  version: '0'
151
- description: A high-level architecture for Ruby introducing new abstractions such
152
- as operations, form objects or policies.
171
+ description: A high-level architecture introducing new abstractions such as control
172
+ flow, operations, form objects or policies.
153
173
  email:
154
174
  - apotonick@gmail.com
155
175
  executables: []