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 +4 -4
- data/CHANGELOG.md +8 -0
- data/bin/bundle +1 -1
- data/bin/byebug +1 -1
- data/bin/coderay +1 -1
- data/bin/htmldiff +1 -1
- data/bin/ldiff +1 -1
- data/bin/pry +1 -1
- data/bin/rake +1 -1
- data/bin/rspec +1 -1
- data/bin/sequel +1 -1
- data/bin/yard +1 -1
- data/bin/yardoc +1 -1
- data/bin/yri +1 -1
- data/lib/pathway/plugins/dry_validation.rb +2 -11
- data/lib/pathway/version.rb +1 -1
- data/lib/pathway.rb +13 -0
- data/pathway.gemspec +0 -1
- metadata +1 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a13868cae6ff80203b023cdb1444609565f0004f0a2cab229997c01cbaa3aaa5
|
|
4
|
+
data.tar.gz: c22500510ef22c61cf9e11beba23455287b38539f35c21a3e9c082f498e7ba0b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
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("
|
|
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("
|
|
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("
|
|
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("
|
|
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("
|
|
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("
|
|
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("
|
|
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("
|
|
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("
|
|
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("
|
|
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("
|
|
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
|
|
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,
|
|
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
|
data/lib/pathway/version.rb
CHANGED
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
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.
|
|
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
|