core-pipeline 0.3.0 → 0.4.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 +6 -0
- data/lib/core/pipeline/callable.rb +9 -2
- data/lib/core/pipeline/version.rb +1 -1
- data/lib/is/pipeline.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28a2f0e27827605918442c956cb6e4236cb146ba16c180f9418569dd09711da9
|
4
|
+
data.tar.gz: f7927e0c5657dfaa13e1bc03a48bfe0fb75ff5cb2b47d5417545c89a6cf41f78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 379641bc184684af5be9e35b02a926b5f85a52f63c83723afa95722136184a05c2474f64a8c8f67b5261989b098051eec20d5920901356dbaadc4063ee276dfa
|
7
|
+
data.tar.gz: 5bf61a391a6aac27d282eb7cb7fa8d1d973e50496316dc405760e9ef9510c7299cb46920993db62ed80b190a677342c80f4afcfd707526e14132e90621fbacc2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [v0.4.0](https://github.com/metabahn/corerb/releases/tag/2021-11-02.1)
|
2
|
+
|
3
|
+
*released on 2021-11-02*
|
4
|
+
|
5
|
+
* `add` [#98](https://github.com/metabahn/corerb/pull/98) Add a finalizer to pipelines ([bryanp](https://github.com/bryanp))
|
6
|
+
|
1
7
|
## [v0.3.0](https://github.com/metabahn/corerb/releases/tag/2021-11-02)
|
2
8
|
|
3
9
|
*released on 2021-11-02*
|
@@ -102,13 +102,20 @@ module Core
|
|
102
102
|
# [public] Calls the pipeline in context of an object with the given arguments.
|
103
103
|
#
|
104
104
|
def call(object, ...)
|
105
|
-
|
105
|
+
finalize.call(object, ...)
|
106
|
+
end
|
107
|
+
|
108
|
+
# [public] Finalizes the pipeline.
|
109
|
+
#
|
110
|
+
def finalize
|
111
|
+
compile
|
112
|
+
|
113
|
+
self
|
106
114
|
end
|
107
115
|
|
108
116
|
private def compile
|
109
117
|
instance_eval(@compiler.compile(self, @object), __FILE__, __LINE__ - 1)
|
110
118
|
@compiled = true
|
111
|
-
self
|
112
119
|
end
|
113
120
|
|
114
121
|
private def recompile
|
data/lib/is/pipeline.rb
CHANGED
@@ -100,6 +100,12 @@ module Is
|
|
100
100
|
end
|
101
101
|
|
102
102
|
extends :implementation, prepend: true do
|
103
|
+
def finalize
|
104
|
+
super if defined?(super)
|
105
|
+
pipeline.finalize
|
106
|
+
self
|
107
|
+
end
|
108
|
+
|
103
109
|
# [public] Halts the execution of the pipeline, setting the pipeline's current value to the given object.
|
104
110
|
#
|
105
111
|
private def halt(value = nil)
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: core-extension
|