core-pipeline 0.4.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/core/pipeline/compiler.rb +1 -1
- data/lib/core/pipeline/version.rb +1 -1
- data/lib/is/pipeline/controller.rb +21 -0
- data/lib/is/pipeline.rb +3 -14
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb6263781a3d085b65f0b1ed1d16fbe0ce9e037fb346e4acccd8d435ca1df440
|
4
|
+
data.tar.gz: d1d61c3d8ab7a37caa4dbb8f905cc24325231baa576d82f05812b3fdb5c88369
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89f2decefd2ac4b2080563574557749d8c8c7ced85c781c3ec38deb46eaaee726587eecadb182f9cc86b841a7daa8daba409d569d15518563a061e5d7cf952e1
|
7
|
+
data.tar.gz: e402a53e491818a2a96b0b1823b5bd29b720f0789b5a3229dfdf410779d0148c331963736a6946a003c21f3518c990ae032b9b161162f58cdc8555501b362fae
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## [v0.5.2](https://github.com/metabahn/corerb/releases/tag/2022-06-02)
|
2
|
+
|
3
|
+
*released on 2022-06-02*
|
4
|
+
|
5
|
+
* `fix` [#130](https://github.com/metabahn/corerb/pull/130) Accept all arguments in prepended finalize ([bryanp](https://github.com/bryanp))
|
6
|
+
|
7
|
+
## [v0.5.1](https://github.com/metabahn/corerb/releases/tag/2021-11-23.1)
|
8
|
+
|
9
|
+
*released on 2021-11-23*
|
10
|
+
|
11
|
+
* `chg` [#109](https://github.com/metabahn/corerb/pull/109) Prefer `__send__` to `send` ([bryanp](https://github.com/bryanp))
|
12
|
+
|
13
|
+
## [v0.5.0](https://github.com/metabahn/corerb/releases/tag/2021-11-06)
|
14
|
+
|
15
|
+
*released on 2021-11-06*
|
16
|
+
|
17
|
+
* `add` [#105](https://github.com/metabahn/corerb/pull/105) Move pipeline control methods to their own module ([bryanp](https://github.com/bryanp))
|
18
|
+
|
1
19
|
## [v0.4.1](https://github.com/metabahn/corerb/releases/tag/2021-11-03)
|
2
20
|
|
3
21
|
*released on 2021-11-03*
|
@@ -41,7 +41,7 @@ module Core
|
|
41
41
|
case action[:finalized]
|
42
42
|
when Symbol
|
43
43
|
if object.private_method_defined?(action[:finalized])
|
44
|
-
"object.
|
44
|
+
"object.__send__(#{action[:finalized].inspect}, ...)\n"
|
45
45
|
else
|
46
46
|
"object.#{action[:finalized]}(...)\n"
|
47
47
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Is
|
4
|
+
module Pipeline
|
5
|
+
# [public]
|
6
|
+
#
|
7
|
+
module Controller
|
8
|
+
# [public] Halts the execution of the pipeline, setting the pipeline's current value to the given object.
|
9
|
+
#
|
10
|
+
private def halt(value = nil)
|
11
|
+
raise Core::Pipeline::Signals::Halted.new(value)
|
12
|
+
end
|
13
|
+
|
14
|
+
# [public] Rejects the current action, skipping the rest of the action and calling remaining pipeline actions.
|
15
|
+
#
|
16
|
+
private def reject
|
17
|
+
raise Core::Pipeline::Signals::Rejected
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/is/pipeline.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require "is/extension"
|
4
4
|
require "is/stateful"
|
5
5
|
|
6
|
+
require_relative "pipeline/controller"
|
6
7
|
require_relative "../core/pipeline/callable"
|
7
8
|
require_relative "../core/pipeline/compiler"
|
8
9
|
require_relative "../core/pipeline/signals/halted"
|
@@ -56,7 +57,7 @@ module Is
|
|
56
57
|
end
|
57
58
|
end
|
58
59
|
|
59
|
-
extends :implementation do
|
60
|
+
extends :implementation, dependencies: [Is::Pipeline::Controller] do
|
60
61
|
# [public] Calls a pipeline with arguments.
|
61
62
|
#
|
62
63
|
def call(...)
|
@@ -102,23 +103,11 @@ module Is
|
|
102
103
|
extends :implementation, prepend: true do
|
103
104
|
# [public]
|
104
105
|
#
|
105
|
-
def finalize
|
106
|
+
def finalize(...)
|
106
107
|
super if defined?(super)
|
107
108
|
pipeline.finalize
|
108
109
|
self
|
109
110
|
end
|
110
|
-
|
111
|
-
# [public] Halts the execution of the pipeline, setting the pipeline's current value to the given object.
|
112
|
-
#
|
113
|
-
private def halt(value = nil)
|
114
|
-
raise Core::Pipeline::Signals::Halted.new(value)
|
115
|
-
end
|
116
|
-
|
117
|
-
# [public] Rejects the current action, skipping the rest of the action and calling remaining pipeline actions.
|
118
|
-
#
|
119
|
-
private def reject
|
120
|
-
raise Core::Pipeline::Signals::Rejected
|
121
|
-
end
|
122
111
|
end
|
123
112
|
end
|
124
113
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: core-pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: core-extension
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- lib/core/pipeline/signals/rejected.rb
|
71
71
|
- lib/core/pipeline/version.rb
|
72
72
|
- lib/is/pipeline.rb
|
73
|
+
- lib/is/pipeline/controller.rb
|
73
74
|
homepage: https://github.com/metabahn/corerb/
|
74
75
|
licenses:
|
75
76
|
- MPL-2.0
|
@@ -89,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
90
|
- !ruby/object:Gem::Version
|
90
91
|
version: '0'
|
91
92
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.3.13
|
93
94
|
signing_key:
|
94
95
|
specification_version: 4
|
95
96
|
summary: Turns Ruby objects into pipelines.
|