trailblazer-activity-dsl-linear 1.2.0 → 1.2.2

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: 555d1c8af700e756c437e913546c302f4630cb0ba3066b97cae7deb67e25f055
4
- data.tar.gz: e0fc5141498776365ff62c873d9d379bbd2f3bbfebc177939e7e18057503ee6c
3
+ metadata.gz: be269289660eb9d7166d09b6f88032c450ecf8a6ebff8ae2f5bb199a0a1dc29a
4
+ data.tar.gz: dc9974c13c7dba1fdebe59042a16318405e38d0a9b6ac14721616c757c54b6bd
5
5
  SHA512:
6
- metadata.gz: 7d57fa76cde08343769eb8d5feba10f830635738db77c6c732c3df1adadd13e0a6b865a3e5ff2ba6b6cdb3f4adce898f163fb8614e318d9070c98ef896c7322e
7
- data.tar.gz: d2691ec2bf75287fd88b089d3764baccdfb2eaa0234b11a2954afae891e63e7262979004eb81d8fc7b204ba2c415f70a75177594400acb1a2ef736050b008864
6
+ metadata.gz: e719946c8b9f7b0782e78f25804efdd2cd488a730da1f255e5f5a1a409a192a100f69c126dd040487b689fde847a158d20fa31c306868a449cf5d19f6142b1c4
7
+ data.tar.gz: bc37550aeb5ece347414a3861d471582d37878f2f2a51e6fa25cf0da166cead64d437e992156b7dd2f73e8f43fe8edea635e60546cf7da2c430a912d7fa8f189
data/CHANGES.md CHANGED
@@ -1,4 +1,12 @@
1
- # 1.2
1
+ # 1.2.2
2
+
3
+ * Add `#left` alias for `#fail`.
4
+
5
+ # 1.2.1
6
+
7
+ * Bugfix: `output_with_outer_ctx: :instance_method` no longer breaks.
8
+
9
+ # 1.2.0
2
10
 
3
11
  ## Introspect
4
12
 
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"
@@ -188,17 +188,21 @@ module Trailblazer
188
188
  class FiltersBuilder
189
189
  def self.call(user_filter, with_outer_ctx:, **options)
190
190
  if with_outer_ctx
191
- callable = user_filter # FIXME: :instance_method
192
- call_method = callable.respond_to?(:arity) ? callable : callable.method(:call)
191
+ callable = Trailblazer::Option(user_filter) # FIXME: :instance_method
192
+ arity = case user_filter
193
+ when Symbol then nil
194
+ when Proc then user_filter.arity
195
+ else user_filter.method(:call).arity
196
+ end
193
197
 
194
198
  options =
195
199
  # TODO: remove {if} and only leave {else}.
196
- if call_method.arity == 3
200
+ if arity == 3
197
201
  Activity::Deprecate.warn Linear::Deprecate.dsl_caller_location,
198
202
  "The positional argument `outer_ctx` is deprecated, please use the `:outer_ctx` keyword argument.\n#{VariableMapping.deprecation_link}"
199
203
 
200
204
  options.merge(
201
- filter: Trailblazer::Option(user_filter),
205
+ filter: callable,
202
206
  add_variables_class_for_callable: AddVariables::Output::WithOuterContext_Deprecated, # old positional arg
203
207
  )
204
208
  else
@@ -3,7 +3,7 @@ module Trailblazer
3
3
  module Activity
4
4
  module DSL
5
5
  module Linear
6
- VERSION = "1.2.0"
6
+ VERSION = "1.2.2"
7
7
  end
8
8
  end
9
9
  end
@@ -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)
@@ -8,8 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Nick Sutterer"]
9
9
  spec.email = ["apotonick@gmail.com"]
10
10
 
11
- spec.summary = %(Simple DSL to define Trailblazer activities.)
12
- spec.description = %(Simple DSL to define Trailblazer activities with arbitrary wirings.)
11
+ spec.summary = %(The #step DSL for Trailblazer activities.)
13
12
  spec.homepage = "https://trailblazer.to/2.1/docs/activity"
14
13
  spec.licenses = ["LGPL-3.0"]
15
14
 
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.0
4
+ version: 1.2.2
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-03-02 00:00:00.000000000 Z
11
+ date: 2023-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer-activity
@@ -112,7 +112,7 @@ dependencies:
112
112
  - - '='
113
113
  - !ruby/object:Gem::Version
114
114
  version: 0.0.2
115
- description: Simple DSL to define Trailblazer activities with arbitrary wirings.
115
+ description:
116
116
  email:
117
117
  - apotonick@gmail.com
118
118
  executables: []
@@ -173,5 +173,5 @@ requirements: []
173
173
  rubygems_version: 3.2.3
174
174
  signing_key:
175
175
  specification_version: 4
176
- summary: Simple DSL to define Trailblazer activities.
176
+ summary: 'The #step DSL for Trailblazer activities.'
177
177
  test_files: []