trailblazer-activity-dsl-linear 1.2.1 → 1.2.3

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: a01800432c85f39dc5832995be63c19ca19e1783918556a763776656820945f7
4
- data.tar.gz: 4a9115fcb36f0d15b3aea419745630abe28810741a64be16ea1ea025ea89a9fc
3
+ metadata.gz: 9556b0bba65b7d0d785428b33548fc9585a2f9e101c032f47992a1570f2ae53d
4
+ data.tar.gz: 0e9243345de16d945fbaf5b85bf74047d1f9f844ace7af62e63fa93393acc717
5
5
  SHA512:
6
- metadata.gz: 97af4afb6eaf54e939345e17d28bf3b5894eb722c10c4f7757f8262d72456f0b5dabfffb04ba952fe4aa78d56528b4246b4813a9cf4d32d1c4a7689019d0c272
7
- data.tar.gz: 9cdef15b9e400fef15fbcdb1252f32fd5b580e824af48d7caf9bfcb90a146fe5b6db2bdb489b7e6d92cb6bb198e6447076683bc8b3a9d2188fdb54844349202e
6
+ metadata.gz: '081bacc336e3e98845d065cbd72d26e56ab4673e620ce5c4d0999ed8879b601fe5e83186e99367af781170b40b3687482d15b7911e7b5f2672db2e61de959112'
7
+ data.tar.gz: 7e5f318e4ad5eaef5dc8831ee06737d4f508a934888c2d781325585d82408841f8ebdbbaefa7fa7bd91b98f3b65525a33dd8ff4996bd1371beec062f152fc309
data/CHANGES.md CHANGED
@@ -1,3 +1,12 @@
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
+
6
+ # 1.2.2
7
+
8
+ * Add `#left` alias for `#fail`.
9
+
1
10
  # 1.2.1
2
11
 
3
12
  * Bugfix: `output_with_outer_ctx: :instance_method` no longer breaks.
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ gemspec
5
5
 
6
6
  gem "minitest-line"
7
7
 
8
- # gem "trailblazer-developer", path: "../trailblazer-developer"
8
+ gem "trailblazer-developer", path: "../trailblazer-developer"
9
9
  # gem "trailblazer-developer", github: "trailblazer/trailblazer-developer"
10
10
  # gem "trailblazer-declarative", path: "../trailblazer-declarative"
11
11
  # gem "trailblazer-activity", path: "../trailblazer-activity"
@@ -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.1"
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
@@ -114,6 +114,7 @@ module Trailblazer
114
114
  def fail(*args, &block)
115
115
  recompile_activity_for(:fail, *args, &block)
116
116
  end
117
+ alias left fail
117
118
 
118
119
  def pass(*args, &block)
119
120
  recompile_activity_for(:pass, *args, &block)
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.1
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-04-11 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