trailblazer-activity-dsl-linear 1.2.2 → 1.2.3

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: be269289660eb9d7166d09b6f88032c450ecf8a6ebff8ae2f5bb199a0a1dc29a
4
- data.tar.gz: dc9974c13c7dba1fdebe59042a16318405e38d0a9b6ac14721616c757c54b6bd
3
+ metadata.gz: 9556b0bba65b7d0d785428b33548fc9585a2f9e101c032f47992a1570f2ae53d
4
+ data.tar.gz: 0e9243345de16d945fbaf5b85bf74047d1f9f844ace7af62e63fa93393acc717
5
5
  SHA512:
6
- metadata.gz: e719946c8b9f7b0782e78f25804efdd2cd488a730da1f255e5f5a1a409a192a100f69c126dd040487b689fde847a158d20fa31c306868a449cf5d19f6142b1c4
7
- data.tar.gz: bc37550aeb5ece347414a3861d471582d37878f2f2a51e6fa25cf0da166cead64d437e992156b7dd2f73e8f43fe8edea635e60546cf7da2c430a912d7fa8f189
6
+ metadata.gz: '081bacc336e3e98845d065cbd72d26e56ab4673e620ce5c4d0999ed8879b601fe5e83186e99367af781170b40b3687482d15b7911e7b5f2672db2e61de959112'
7
+ data.tar.gz: 7e5f318e4ad5eaef5dc8831ee06737d4f508a934888c2d781325585d82408841f8ebdbbaefa7fa7bd91b98f3b65525a33dd8ff4996bd1371beec062f152fc309
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.2.3
2
+
3
+ * Add `FastTrack.left` alias.
4
+ * Fix a bug where an operation using `Path()` would wrongly emit a deprecation warning.
5
+
1
6
  # 1.2.2
2
7
 
3
8
  * Add `#left` alias for `#fail`.
@@ -49,15 +49,7 @@ module Trailblazer
49
49
 
50
50
  def convert_path_to_track(track_color: "track_#{rand}", connect_to: nil, before: false, block: nil, terminus: nil, **options)
51
51
  options =
52
- if end_task = options[:end_task] # TODO: remove in 2.0.
53
- Activity::Deprecate.warn Linear::Deprecate.dsl_caller_location,
54
- %(Using `:end_task` and `:end_id` in Path() is deprecated, use `:terminus` instead. Please refer to https://trailblazer.to/2.1/docs/activity.html#activity-wiring-api-path-end_task-end_id-deprecation)
55
-
56
- options.merge(
57
- end_task: Activity.End(end_task.to_h[:semantic]),
58
- end_id: options[:end_id]
59
- )
60
- elsif connect_to
52
+ if connect_to
61
53
  {}
62
54
  elsif terminus
63
55
  options.merge(
@@ -65,7 +57,7 @@ module Trailblazer
65
57
  end_id: "End.#{terminus}"
66
58
  )
67
59
  else # Path() with End() inside block.
68
- {}
60
+ options
69
61
  end
70
62
 
71
63
  # DISCUSS: if anyone overrides `#step` in the "outer" activity, this won't be applied inside the branch.
@@ -46,9 +46,18 @@ module Trailblazer
46
46
  Normalizer::OutputTuples::Id.new(id).freeze
47
47
  end
48
48
 
49
- def Path(**options, &block)
50
- options = options.merge(block: block) if block
49
+ def Path(end_task: nil, end_id: nil, **options, &block)
50
+ if end_task # TODO: remove in 2.0.
51
+ Activity::Deprecate.warn caller_locations[0],
52
+ %(Using `:end_task` and `:end_id` in Path() is deprecated, use `:terminus` instead. Please refer to https://trailblazer.to/2.1/docs/activity.html#activity-wiring-api-path-end_task-end_id-deprecation)
53
+
54
+ options = options.merge(
55
+ end_task: Activity.End(end_task.to_h[:semantic]),
56
+ end_id: end_id
57
+ )
58
+ end
51
59
 
60
+ options = options.merge(block: block) if block
52
61
  Linear::PathBranch.new(options) # picked up by normalizer.
53
62
  end
54
63
 
@@ -3,7 +3,7 @@ module Trailblazer
3
3
  module Activity
4
4
  module DSL
5
5
  module Linear
6
- VERSION = "1.2.2"
6
+ VERSION = "1.2.3"
7
7
  end
8
8
  end
9
9
  end
@@ -165,6 +165,7 @@ module Trailblazer
165
165
  private def fail(*args, &block)
166
166
  recompile_activity_for(:fail, *args, &block) # from Path::Strategy
167
167
  end
168
+ alias left fail
168
169
 
169
170
  private def pass(*args, &block)
170
171
  recompile_activity_for(:pass, *args, &block) # from Path::Strategy
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-activity-dsl-linear
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-14 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-activity