trailblazer-operation 0.7.0 → 0.7.1

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: 5a184243cc5650f8905e96a29d4abd248f463dcf8e2c5ec28d3a68de6391ae4e
4
- data.tar.gz: 8c8eeb9c36d0065096e1c9be60872254c0776ecd6dd617d439aa55c3896f020e
3
+ metadata.gz: 63f655777a97401ddf1ae5b1706757a7b284efbc6d5545397c00da0b4904a606
4
+ data.tar.gz: 71b308182ed3ad9c27333c0fd818ec017309002a1c7588adf64a85b54fde714e
5
5
  SHA512:
6
- metadata.gz: c1abb34f87e18425f77c6189ded96dd0f02c39f9e2ce178b1d2bfff3d2b2e8c2c4dd4d37e88a770ffc8b8457613dbc4e334b8e2e7924395c07bd4a59c6bd3376
7
- data.tar.gz: 68fb2740d396b174c7eaa62e0145049755ff593fbf7bdba66825b79caa7908b35b954b8508528b6a6f93883fee3f372e2043a860f968bf5699cb2bceea1c3f17
6
+ metadata.gz: d2372fb0f13931fb7e08a2e60cff6d9f4850b74a3d17b5661ad3a9853a460fd855656117387d685d6135306d1f67e27e26350c5e1ef07b29c2b16990fda5c874
7
+ data.tar.gz: cda2f29f0892f0d7c20d5c8af862e1076bec5a2c8849c307d53af92b09214720293e637fd6163690a76e7c9de282017743eb9c31107f3648329300a076d650db
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.7.1
2
+
3
+ * In `Operation.call_with_public_interface`, pass `self` and not `@activity` to the `invoke`r. This fixes tracing as it now catches the actual Operation class, not an activity instance.
4
+
1
5
  ## 0.7.0
2
6
 
3
7
  * Compatible with Ruby 2.4-3.0.
@@ -37,7 +37,7 @@ module Trailblazer
37
37
  # call the activity.
38
38
  # This will result in invoking {::call_with_circuit_interface}.
39
39
  signal, (ctx, flow_options) = invoke_class.invoke(
40
- @activity,
40
+ self,
41
41
  [ctx, flow_options],
42
42
  exec_context: new
43
43
  )
@@ -1,7 +1,7 @@
1
1
  module Trailblazer
2
2
  module Version
3
3
  module Operation
4
- VERSION = "0.7.0"
4
+ VERSION = "0.7.1"
5
5
  end
6
6
  end
7
7
  end
data/test/step_test.rb CHANGED
@@ -178,12 +178,20 @@ class StepTest < Minitest::Spec
178
178
  # not existent :name
179
179
  it do
180
180
  op = assert_raises Trailblazer::Activity::DSL::Linear::Sequence::IndexError do
181
- Class.new(Trailblazer::Operation) do
181
+ class InvalidStep < Trailblazer::Operation
182
182
  step :a, before: "I don't exist!"
183
183
  end
184
184
  end
185
- assert_equal Trailblazer::Activity::DSL::Linear::Sequence::IndexError, op.class
186
- # assert_match /<Trailblazer::Activity::DSL::Linear::Sequence::IndexError: .+ is not a valid step ID. Did you mean any of these ?/, op.inspect
185
+
186
+ error_message = %{#<Trailblazer::Activity::DSL::Linear::Sequence::IndexError: StepTest::InvalidStep:
187
+ \e[31m\"I don't exist!\" is not a valid step ID. Did you mean any of these ?\e[0m
188
+ \e[32m\"Start.default\"
189
+ \"End.success\"
190
+ \"End.pass_fast\"
191
+ \"End.fail_fast\"
192
+ \"End.failure\"\e[0m>}
193
+
194
+ assert_match error_message, op.inspect
187
195
  end
188
196
 
189
197
  #---
data/test/trace_test.rb CHANGED
@@ -56,7 +56,7 @@ class TraceTest < Minitest::Spec
56
56
  result = Create.wtf?(params: {x: 1}, a_return: true)
57
57
  end
58
58
 
59
- output.gsub(/0x\w+/, "").gsub(/@.+_test/, "").must_equal %{`-- #<Trailblazer::Activity:>
59
+ output.gsub(/0x\w+/, "").gsub(/@.+_test/, "").must_equal %{`-- TraceTest::Create
60
60
  |-- \e[32mStart.default\e[0m
61
61
  |-- \e[32mCreate.task.a\e[0m
62
62
  |-- MyNested
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-03 00:00:00.000000000 Z
11
+ date: 2021-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-activity-dsl-linear
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0'
172
172
  requirements: []
173
- rubygems_version: 3.2.3
173
+ rubygems_version: 3.0.8
174
174
  signing_key:
175
175
  specification_version: 4
176
176
  summary: Trailblazer's operation object with railway flow and integrated error handling.