trailblazer 2.1.0.beta5 → 2.1.0.beta6

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: 67b2416a21aa39d031596bd5f301f8f84c8dd19978404e1ea2bdfd7a08eeb9fc
4
- data.tar.gz: 942f65a213e4a7cf6ca7607f3f1e811ac2b01d86a3cbba5f35107a6ab6d4192c
3
+ metadata.gz: d9c583449b74afae6004cbba4994c44c509c378756e5cac39d3c0ed0979fc583
4
+ data.tar.gz: 1730091f6a3ffcc87cd6f2c548899d347db6d3e2a62e9850a07e5d9ed2c91cab
5
5
  SHA512:
6
- metadata.gz: 47ada0d5e002f653d3ed0e06f8c566d315f62ee4cea8d1c04a0514517a79bbf7838042e4e80111f3378fc54ea9363b43fb9c42d8df9feccbf53d978bed215639
7
- data.tar.gz: 521ab294e4a93a2ad6c24ecf931aa53ad6d40e2d5f90b22e18855d07f62583f4ba8bb4ed1c1ea8c2d1f4249274c903916e5a2c6f6897fe83bfa4823ce999aa03
6
+ metadata.gz: c5eaafc11c6c4e8b14ab62089564e7372304fc4482396301f4f1c2fd6a0228f4d18a3d50d0352974ee81584353128f9de1f2db78883f8cfa80dad2786c28a4d9
7
+ data.tar.gz: 91a20c9bc960ecb65805a1c4aba086ef5c65f44915f446ba7b0b8a322f2e7d466928444c474426b925011a8f687f81165962fba7a43e15ee3764da3cbca62470
data/CHANGES.md CHANGED
@@ -30,6 +30,10 @@ document Task API and define step API
30
30
  deprecate step->(options) ?
31
31
  injectable, per-operation step arguments strategy?
32
32
 
33
+ # 2.1.0.beta6
34
+
35
+ * Use new `activity-0.3.0`.
36
+
33
37
  # 2.1.0.beta5
34
38
 
35
39
  * All macros are now cleanly extracted to `trailblazer-macro` and `trailblazer-macro-contract`.
@@ -125,6 +125,15 @@ git push origin my-feature-branch -f
125
125
  #### Check on Your Pull Request
126
126
  Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
127
127
 
128
+ ## Quality
129
+
130
+ Commiting to OSS projects is always difficult, because all maintainers will adhere to their own quality standards that you don't know. Every projects wants "good code design", and so do we, so here are a few things that you should follow when contributing.
131
+
132
+ * Good design matters: sometimes a feature could be added with a simple `if <my new case>` to an existing block of code. Usually, an `if` implies that the original design didn't plan on handling multiple cases, or in other words, **a refactoring of the code structure might be necessary**. If you're unsure: [Talk to us!](https://gitter.im/trailblazer/chat)
133
+ * Make smaller pull requests. It is so much easier to discuss something graspable and not a "37 files changed" PR. The sooner we see your code, the earlier we can decide about which way to go. It is incredibly appreciated, though, to send us a link to a branch of yours where we can see the desired changes in total. We can then help splitting those into smaller steps.
134
+ * **Never ever use `if respond_to?`** to add a feature. This is a pattern as seen a lot in Rails core that causes incredibly hard to find ~bugs~ behavior. In Trailblazer, we use "Tell, don't ask!", which means, never try to find out the type of an object via `respond_to?`. If you really have to introspect the type, use `is_a?`. Treat it as a duck, ducks don't speak.
135
+
136
+
128
137
  ## Releasing
129
138
 
130
139
  When you have release rights, please follow these rules.
data/Gemfile CHANGED
@@ -15,15 +15,14 @@ gem "dry-matcher"
15
15
  gem "dry-validation"
16
16
 
17
17
  # gem "trailblazer-operation", path: "../operation"
18
- gem "trailblazer-macro", github: "trailblazer/trailblazer-macro"
19
- gem "trailblazer-macro-contract", github: "trailblazer/trailblazer-macro-contract"
20
- gem "trailblazer-operation", path: "../operation"
21
18
  # gem "trailblazer-operation", github: "trailblazer/trailblazer-operation"
19
+ # gem "trailblazer-macro", github: "trailblazer/trailblazer-macro"
20
+ # gem "trailblazer-macro-contract", github: "trailblazer/trailblazer-macro-contract"
22
21
 
23
22
  gem "minitest-line"
24
23
 
25
24
  gem "rubocop", require: false
26
- gem "trailblazer-activity", path: "../trailblazer-circuit"
25
+ # gem "trailblazer-activity", path: "../trailblazer-circuit"
27
26
  # gem "trailblazer-activity", github: "trailblazer/trailblazer-activity"
28
27
  # gem "trailblazer-activity", path: "../trailblazer-circuit"
29
28
  # gem "trailblazer-activity", github: "trailblazer/trailblazer-activity"
@@ -29,7 +29,7 @@ class Trailblazer::Operation
29
29
 
30
30
  def define_call
31
31
  class_mod.class_exec(container, dependency_map) do |container, dependency_map|
32
- define_method :call do |ctx={}, *dependencies|
32
+ define_method :call_with_public_interface do |ctx={}, *dependencies|
33
33
  ctx_with_deps = dependency_map.to_h.each_with_object({}) { |(name, identifier), obj|
34
34
  obj[name] = ctx[name] || container[identifier]
35
35
  }.merge(ctx)
@@ -1,3 +1,3 @@
1
1
  module Trailblazer
2
- VERSION = "2.1.0.beta5"
2
+ VERSION = "2.1.0.beta6"
3
3
  end
@@ -38,10 +38,11 @@ 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 semantic=:default>
42
- |-- model.build
43
- |-- contract.build
44
- `-- #<Trailblazer::Operation::Railway::End::Success semantic=:success>}
41
+ result.wtf.gsub(/0x\w+/, "").must_equal %{`-- DocsTraceTest::Create::Present
42
+ |-- Start.default
43
+ |-- model.build
44
+ |-- contract.build
45
+ `-- End.success}
45
46
  end
46
47
 
47
48
  it do
@@ -1,4 +1,5 @@
1
1
  require "pp"
2
+ require "delegate"
2
3
  require "trailblazer"
3
4
  require "minitest/autorun"
4
5
 
@@ -141,18 +141,19 @@ 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 semantic=:default>
145
- |-- set.rumours
146
- |-- set.secret
147
- |-- Nested(VariablesTest::Whistleblower)
148
- | |-- #<Trailblazer::Activity::Start semantic=:default>
149
- | |-- edward.public_opinion
150
- | |-- edward.secret
151
- | |-- edward.test
152
- | |-- edward.read.public_knowledge
153
- | `-- #<Trailblazer::Operation::Railway::End::Success semantic=:success>
154
- |-- read.edward.rumours
155
- |-- read.edward.secret
156
- `-- #<Trailblazer::Operation::Railway::End::Failure semantic=:failure>}
144
+ result.wtf.gsub(/0x\w+/, "").gsub(/\d+/, "").must_equal %{`-- VariablesTest::DiscreetOrganization
145
+ |-- Start.default
146
+ |-- set.rumours
147
+ |-- set.secret
148
+ |-- Nested(VariablesTest::Whistleblower)
149
+ | |-- Start.default
150
+ | |-- edward.public_opinion
151
+ | |-- edward.secret
152
+ | |-- edward.test
153
+ | |-- edward.read.public_knowledge
154
+ | `-- End.success
155
+ |-- read.edward.rumours
156
+ |-- read.edward.secret
157
+ `-- End.failure}
157
158
  end
158
159
  end
@@ -17,9 +17,9 @@ 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-operation", ">= 0.2.4", "< 0.3.0"
21
- spec.add_dependency "trailblazer-macro", ">= 2.1.0.beta2", "< 2.2.0"
22
- spec.add_dependency "trailblazer-macro-contract", ">= 2.1.0.beta2", "< 2.2.0"
20
+ spec.add_dependency "trailblazer-operation", ">= 0.3.0", "< 0.4.0"
21
+ spec.add_dependency "trailblazer-macro", ">= 2.1.0.beta6", "< 2.2.0"
22
+ spec.add_dependency "trailblazer-macro-contract", ">= 2.1.0.beta4", "< 2.2.0"
23
23
 
24
24
  spec.add_dependency "declarative"
25
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.beta5
4
+ version: 2.1.0.beta6
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-03-09 00:00:00.000000000 Z
11
+ date: 2018-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-operation
@@ -16,27 +16,27 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.4
19
+ version: 0.3.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 0.3.0
22
+ version: 0.4.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.2.4
29
+ version: 0.3.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 0.3.0
32
+ version: 0.4.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: trailblazer-macro
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 2.1.0.beta2
39
+ version: 2.1.0.beta6
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.2.0
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 2.1.0.beta2
49
+ version: 2.1.0.beta6
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: 2.2.0
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 2.1.0.beta2
59
+ version: 2.1.0.beta4
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
62
  version: 2.2.0
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 2.1.0.beta2
69
+ version: 2.1.0.beta4
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
72
  version: 2.2.0