pathway 1.1.0 → 1.2.0

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: 72fdb918cf09f7e3121e4d745362485a23f5cac7939ff7b466cba0ff1dd5f5a7
4
- data.tar.gz: edbe3a656d48496b67c793fb143c7b99860e8f4c610b54fdf9a4bad21094fc41
3
+ metadata.gz: a13868cae6ff80203b023cdb1444609565f0004f0a2cab229997c01cbaa3aaa5
4
+ data.tar.gz: c22500510ef22c61cf9e11beba23455287b38539f35c21a3e9c082f498e7ba0b
5
5
  SHA512:
6
- metadata.gz: d48ca6b5854a6ef671312323d6469b3832889f2bedfb43954221b976ad2cc96d696066af6df44fdecb67847c8c2484f047d762185ef9b559e9a286500c7ef05b
7
- data.tar.gz: 423a1d02a20d6fa794e46d9b40c2bc982c3205194416ea9e020c932e816b0bd9b3f55bf3df92a0bb4ba7a8e16156eba1cfaaf8fbab5169f0b926ec239c82cc82
6
+ metadata.gz: 00012d3079c7487ca627bebcb24b5164dd08012082f40d7765bb0bb23a2e0210a9583ea18fa71fdd5f2c69be93d171459fe9ad5f159250bc46c67425fe7b4dd3
7
+ data.tar.gz: 2c9557ffc6243159ff110a2e91d6017646020e05f990a1b3158ee46ccb1b2948993c085b06051a5eb9ea1eaa36ef3fb86b4858725fbb4966a9a2797bf0abf58e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [1.2.0] - 2025-11-16
2
+ ### Deprecated
3
+ - Deprecate passing a block to the step method using `DSLMethods#step`
4
+ - Deprecate passing a block to the step method using `DSLMethods#set`
5
+ - Deprecate `DSLMethods#map`
6
+ ### Changed
7
+ - Removed deprecated `:auto_wire_options` option from `:dry_validation` plugin
8
+
1
9
  ## [1.1.0] - 2025-05-30
2
10
  ### Added
3
11
  - Added `:if` and `:unless` options for `:transaction` and `:after_commit` methods at `:sequel_models` plugin
data/bin/bundle CHANGED
@@ -41,7 +41,7 @@ m = Module.new do
41
41
  gemfile = ENV["BUNDLE_GEMFILE"]
42
42
  return gemfile if gemfile && !gemfile.empty?
43
43
 
44
- File.expand_path("../.ruby-lsp/Gemfile", __dir__)
44
+ File.expand_path("../Gemfile", __dir__)
45
45
  end
46
46
 
47
47
  def lockfile
data/bin/byebug CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/coderay CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/htmldiff CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/ldiff CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/pry CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/rake CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/rspec CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/sequel CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/yard CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/yardoc CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
data/bin/yri CHANGED
@@ -8,7 +8,7 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../.ruby-lsp/Gemfile", __dir__)
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12
12
 
13
13
  bundle_binstub = File.expand_path("bundle", __dir__)
14
14
 
@@ -9,9 +9,6 @@ module Pathway
9
9
  attr_reader :contract_class, :contract_options
10
10
  attr_accessor :auto_wire
11
11
 
12
- alias_method :auto_wire_options, :auto_wire
13
- alias_method :auto_wire_options=, :auto_wire=
14
-
15
12
  def contract(base = nil, &)
16
13
  if block_given?
17
14
  base ||= _base_contract
@@ -53,7 +50,7 @@ module Pathway
53
50
  module InstanceMethods
54
51
  extend Forwardable
55
52
 
56
- delegate %i[build_contract contract_options auto_wire_options auto_wire] => 'self.class'
53
+ delegate %i[build_contract contract_options auto_wire] => 'self.class'
57
54
  alias_method :contract, :build_contract
58
55
 
59
56
  def validate(state, with: nil)
@@ -72,13 +69,7 @@ module Pathway
72
69
  end
73
70
  end
74
71
 
75
- def self.apply(operation, auto_wire_options: (auto_wire_options_was_not_used=true; false), auto_wire: auto_wire_options)
76
- #:nocov:
77
- unless auto_wire_options_was_not_used
78
- warn "[DEPRECATION] `auto_wire_options` is deprecated. Please use `auto_wire` instead"
79
- end
80
- #:nocov:
81
-
72
+ def self.apply(operation, auto_wire: false)
82
73
  operation.auto_wire = auto_wire
83
74
  operation.contract_class = Dry::Validation::Contract
84
75
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pathway
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.0'
5
5
  end
data/lib/pathway.rb CHANGED
@@ -157,12 +157,22 @@ module Pathway
157
157
 
158
158
  # Execute step and preserve the former state
159
159
  def step(callable,...)
160
+ #:nocov:
161
+ if block_given?
162
+ warn "[DEPRECATION] Passing a block to the step method using `DSLMethods#step` is deprecated"
163
+ end
164
+ #:nocov:
160
165
  bl = _callable(callable)
161
166
  @result = @result.tee { |state| bl.call(state,...) }
162
167
  end
163
168
 
164
169
  # Execute step and modify the former state setting the key
165
170
  def set(callable, *args, to: @operation.result_key, **kwargs, &bl)
171
+ #:nocov:
172
+ if block_given?
173
+ warn "[DEPRECATION] Passing a block to the step method using `DSLMethods#set` is deprecated"
174
+ end
175
+ #:nocov:
166
176
  bl = _callable(callable)
167
177
 
168
178
  @result = @result.then do |state|
@@ -173,6 +183,9 @@ module Pathway
173
183
 
174
184
  # Execute step and replace the current state completely
175
185
  def map(callable,...)
186
+ #:nocov:
187
+ warn "[DEPRECATION] `Pathway::DSLMethods#map` has been deprecated, use `step` instead"
188
+ #:nocov:
176
189
  bl = _callable(callable)
177
190
  @result = @result.then { |state| bl.call(state,...) }
178
191
  end
data/pathway.gemspec CHANGED
@@ -44,5 +44,4 @@ Gem::Specification.new do |spec|
44
44
  spec.add_development_dependency "byebug"
45
45
  spec.add_development_dependency "pry-byebug"
46
46
  spec.add_development_dependency "pry-doc"
47
- spec.add_development_dependency "pry-stack"
48
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pathway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Herrero
@@ -205,20 +205,6 @@ dependencies:
205
205
  - - ">="
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
- - !ruby/object:Gem::Dependency
209
- name: pry-stack
210
- requirement: !ruby/object:Gem::Requirement
211
- requirements:
212
- - - ">="
213
- - !ruby/object:Gem::Version
214
- version: '0'
215
- type: :development
216
- prerelease: false
217
- version_requirements: !ruby/object:Gem::Requirement
218
- requirements:
219
- - - ">="
220
- - !ruby/object:Gem::Version
221
- version: '0'
222
208
  description: Define your business logic in simple steps.
223
209
  email:
224
210
  - pablodherrero@gmail.com