core-pipeline 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/core/pipeline/version.rb +1 -1
- data/lib/is/pipeline/controller.rb +21 -0
- data/lib/is/pipeline.rb +2 -13
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1893498a0bd9f99c296d22dc1db1cfc66306b73a77a89a30c0829e3958f8954
|
4
|
+
data.tar.gz: 5496c708adb86448f72b3239ff6210dfd6d9a41aa3729e0a7d63e58328a19ace
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b96487e68c5aff4c901f785b165cb3c11719053d8bb30d742a7982075fdb98164041522d205dcd3eacbe8d1f40794498c7b0a28fcc7a6d28e9a414631dd3eca
|
7
|
+
data.tar.gz: 52e9f1d1ebd353b42fc6d27a55dc867b6b7d3a1975ccab209839d4b39cb51e7ca4eaed3211e30168eb6a91670f9e57dd64ed6e7b6ada62d2ba36efe77cde903e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [v0.5.0](https://github.com/metabahn/corerb/releases/tag/2021-11-06)
|
2
|
+
|
3
|
+
*released on 2021-11-06*
|
4
|
+
|
5
|
+
* `add` [#105](https://github.com/metabahn/corerb/pull/105) Move pipeline control methods to their own module ([bryanp](https://github.com/bryanp))
|
6
|
+
|
1
7
|
## [v0.4.1](https://github.com/metabahn/corerb/releases/tag/2021-11-03)
|
2
8
|
|
3
9
|
*released on 2021-11-03*
|
@@ -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(...)
|
@@ -107,18 +108,6 @@ module Is
|
|
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.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-06 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
|