pathway 0.9.0 → 0.9.1
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 +5 -1
- data/README.md +6 -6
- data/lib/pathway/version.rb +1 -1
- data/pathway.gemspec +6 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f95391a7c8c39954f8ffb8bbaa8c06294bd28c3553e595d4f91e3b44a109b3ee
|
4
|
+
data.tar.gz: 22118f62ae34e871d6258a59111614e83643d6557bde5cb1fb5381edff2fcab5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 942055689e4836b0556f9b1d1b2aa010b5391c322a3948598047be7ee1b06c83e19bb026efd90f6388aed035a2c37784a26350fa991fe28cf53a7d7f91c4cf9f
|
7
|
+
data.tar.gz: 971070c4f8eec9bede60e354926a7114107b68cd2ead43083c319f7de709b62dd5013294344e105e64965598865cc8d91185462e5a15c880eefee051ca9ffdd3
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
## [0.9.
|
1
|
+
## [0.9.1] - 2019-02-18
|
2
|
+
### Changed
|
3
|
+
- Various improvements on documentation and gemspec.
|
4
|
+
|
5
|
+
## [0.9.0] - 2019-02-04
|
2
6
|
### Changed
|
3
7
|
- Changed behavior for `:after_commit` step wrapper, on `:sequel_models` plugin, to capture current state and reuse it later when executing.
|
4
8
|
|
data/README.md
CHANGED
@@ -402,7 +402,7 @@ end
|
|
402
402
|
|
403
403
|
Here the defined form needs a `:user_name` option, so we tell the operation to grab the attribute with the same name from the state by activating `:auto_wire_options`, afterwards, when the validation runs, the form will already have the user name available.
|
404
404
|
|
405
|
-
Mind you, this option is `false` by default, so be sure to set it to `true` at `Pathway::Operation` if you'd rather have it for all your operations.
|
405
|
+
Mind you, this option is `false` by default, so be sure to set it to `true` at `Pathway::Operation` if you'd rather have it enabled for all your operations.
|
406
406
|
|
407
407
|
```ruby
|
408
408
|
class CreateNugget < Pathway::Operation
|
@@ -599,7 +599,7 @@ module Pathway
|
|
599
599
|
module InstanceMethods
|
600
600
|
delegate :model, :pk, to: :class
|
601
601
|
|
602
|
-
# This
|
602
|
+
# This method will conflict with :sequel_models so you mustn't load both plugins in the same operation
|
603
603
|
def fetch_model(state, column: pk)
|
604
604
|
current_pk = state[:input][column]
|
605
605
|
result = model.first(column => current_pk)
|
@@ -613,7 +613,7 @@ module Pathway
|
|
613
613
|
end
|
614
614
|
|
615
615
|
module DSLMethods
|
616
|
-
# This method also conflicts with :sequel_models, so don't use them
|
616
|
+
# This method also conflicts with :sequel_models, so don't use them at once
|
617
617
|
def transaction(&steps)
|
618
618
|
transactional_seq = -> seq, _state do
|
619
619
|
ActiveRecord::Base.transaction do
|
@@ -635,10 +635,10 @@ end
|
|
635
635
|
```
|
636
636
|
|
637
637
|
The code above implements a plugin to provide basic interaction with the [ActiveRecord](http://guides.rubyonrails.org/active_record_basics.html) gem.
|
638
|
-
Even though is a very
|
638
|
+
Even though is a very simple plugin, it shows all the essentials to develop more complex ones.
|
639
639
|
|
640
|
-
|
641
|
-
You must be mindful about colliding method names when mixing plugins, since `Pathway` can't
|
640
|
+
As is pointed out in the code, some of the methods implemented here (`fetch_model` and `transmission`) collide with methods defined for `:sequel_models`, so as a consequence, these two plugin's are not compatible with each other and cannot be activated for the same operation (although you can still do it for different operations within the same application).
|
641
|
+
You must be mindful about colliding method names when mixing plugins, since `Pathway` can't bookkeep compatibility among every plugin that exists of will ever exist.
|
642
642
|
Is a good practice to document known incompatibilities on the plugin definition itself when they are known.
|
643
643
|
|
644
644
|
The whole plugin is completely defined within the `ActiveRecord` module inside the `Pathway::Plugins` namespace, also the file is placed at the load path in `pathway/plugin/active_record.rb` (assuming `lib/` is listed in `$LOAD_PATH`). This will ensure, when calling `plugin :active_record` inside an operation, the correct file will be loaded and the correct plugin module will be applied to the current operation.
|
data/lib/pathway/version.rb
CHANGED
data/pathway.gemspec
CHANGED
@@ -11,9 +11,14 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{Define your business logic in simple steps.}
|
13
13
|
spec.description = %q{Define your business logic in simple steps.}
|
14
|
-
|
14
|
+
spec.homepage = "https://github.com/pabloh/pathway"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
|
+
spec.metadata = {
|
18
|
+
"bug_tracker_uri" => "https://github.com/pabloh/pathway/issues",
|
19
|
+
"source_code_uri" => "https://github.com/pabloh/pathway",
|
20
|
+
}
|
21
|
+
|
17
22
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
23
|
f.match(%r{^(test|spec|features)/})
|
19
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pathway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Herrero
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-inflector
|
@@ -200,10 +200,12 @@ files:
|
|
200
200
|
- lib/pathway/rspec/matchers/succeed_on.rb
|
201
201
|
- lib/pathway/version.rb
|
202
202
|
- pathway.gemspec
|
203
|
-
homepage:
|
203
|
+
homepage: https://github.com/pabloh/pathway
|
204
204
|
licenses:
|
205
205
|
- MIT
|
206
|
-
metadata:
|
206
|
+
metadata:
|
207
|
+
bug_tracker_uri: https://github.com/pabloh/pathway/issues
|
208
|
+
source_code_uri: https://github.com/pabloh/pathway
|
207
209
|
post_install_message:
|
208
210
|
rdoc_options: []
|
209
211
|
require_paths:
|