core-pipeline 0.4.1 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3aa02295979274ef902f4f64fe5a7c9555bfd0ce54538f6d40047cec71c308c
4
- data.tar.gz: 30c98202539ef94d305e27d14666be7c979e76daa0442ceae329a182a37b44c3
3
+ metadata.gz: a1893498a0bd9f99c296d22dc1db1cfc66306b73a77a89a30c0829e3958f8954
4
+ data.tar.gz: 5496c708adb86448f72b3239ff6210dfd6d9a41aa3729e0a7d63e58328a19ace
5
5
  SHA512:
6
- metadata.gz: 8de4883f7f9af7f7b98d8bbedc7f5a11650f87e9de0ade3a8a6f8086b353ddaef18107e009062459a5b3755b0729d387371948e42c2d2c9a8d2a9ac03e872f99
7
- data.tar.gz: 8b7c1d7ed42476f378a0c633239e8e822b33306f3482b5a8feeb41947251a0b6293fcff9d39bff394de3ca14b93547f1ed4b1829334fc8981b5855f8a746958b
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*
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Core
4
4
  module Pipeline
5
- VERSION = "0.4.1"
5
+ VERSION = "0.5.0"
6
6
 
7
7
  def self.version
8
8
  VERSION
@@ -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.1
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-04 00:00:00.000000000 Z
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