flow 0.10.7.2 → 0.10.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flow.rb +12 -19
- data/lib/flow/errors.rb +14 -0
- data/lib/flow/flow_base.rb +1 -1
- data/lib/flow/operation_base.rb +1 -1
- data/lib/flow/state_base.rb +1 -1
- data/lib/flow/version.rb +1 -1
- metadata +46 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b52c5f113180717df9e242c75b51a80cff0ca0d246007c0adf99247f23137ede
|
4
|
+
data.tar.gz: 51245f2c5609c2788c79fa5a29df9201783c0071a8671f464d42d32b381537a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb6a28b1fbed617b3143c2905bc6912a72b1847e54bcbfc69a26856b116a783d79b64455544d103a7c5cdcef85ffab2928aa325ea8c7b1dad5f32055f0657bea
|
7
|
+
data.tar.gz: 38db040a5c7d17b287a46c739f75e16b61861005b9a0ca6b08775083372f9b479620b9f78cefe0cfa1b9cab6f8371cc239e4c6119e1f52dbdc4dbecd3fd6fe8e
|
data/lib/flow.rb
CHANGED
@@ -4,29 +4,22 @@ require "active_model"
|
|
4
4
|
require "active_record"
|
5
5
|
require "active_support"
|
6
6
|
|
7
|
-
require "
|
7
|
+
require "spicerack"
|
8
8
|
require "malfunction"
|
9
9
|
|
10
|
-
|
10
|
+
require_relative "flow/version"
|
11
11
|
|
12
|
-
|
12
|
+
require_relative "flow/errors"
|
13
13
|
|
14
|
-
|
14
|
+
require_relative "flow/concerns/transaction_wrapper"
|
15
15
|
|
16
|
-
|
17
|
-
require "flow/operation_base"
|
18
|
-
require "flow/state_base"
|
19
|
-
require "flow/state_proxy"
|
16
|
+
require_relative "flow/malfunction/base"
|
20
17
|
|
21
|
-
|
22
|
-
|
18
|
+
# TODO: Remove inheritance nonsense, just use Substance once deprecation is removed from Spicerack
|
19
|
+
class Flow::RootObject < (defined?(Substance::RootObject) ? Substance::RootObject : Spicerack::RootObject); end
|
20
|
+
class Flow::InputModel < (defined?(Substance::InputModel) ? Substance::InputModel : Spicerack::InputModel); end
|
23
21
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
class AlreadyExecutedError < OperationError; end
|
29
|
-
|
30
|
-
class StateError < Error; end
|
31
|
-
class NotValidatedError < StateError; end
|
32
|
-
end
|
22
|
+
require_relative "flow/flow_base"
|
23
|
+
require_relative "flow/operation_base"
|
24
|
+
require_relative "flow/state_base"
|
25
|
+
require_relative "flow/state_proxy"
|
data/lib/flow/errors.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Flow
|
4
|
+
class Error < StandardError; end
|
5
|
+
|
6
|
+
class FlowError < Error; end
|
7
|
+
class StateInvalidError < FlowError; end
|
8
|
+
|
9
|
+
class OperationError < Error; end
|
10
|
+
class AlreadyExecutedError < OperationError; end
|
11
|
+
|
12
|
+
class StateError < Error; end
|
13
|
+
class NotValidatedError < StateError; end
|
14
|
+
end
|
data/lib/flow/flow_base.rb
CHANGED
@@ -10,7 +10,7 @@ require_relative "flow/trigger"
|
|
10
10
|
|
11
11
|
# A **Flow** is a collection of procedurally executed **Operations** sharing a common **State**.
|
12
12
|
module Flow
|
13
|
-
class FlowBase <
|
13
|
+
class FlowBase < RootObject
|
14
14
|
include Conjunction::Junction
|
15
15
|
suffixed_with "Flow"
|
16
16
|
|
data/lib/flow/operation_base.rb
CHANGED
@@ -11,7 +11,7 @@ require_relative "operation/transactions"
|
|
11
11
|
|
12
12
|
# An **Operation** is a service object which is executed with a **State**.
|
13
13
|
module Flow
|
14
|
-
class OperationBase <
|
14
|
+
class OperationBase < RootObject
|
15
15
|
include TransactionWrapper
|
16
16
|
include Operation::Accessors
|
17
17
|
include Operation::Callbacks
|
data/lib/flow/state_base.rb
CHANGED
data/lib/flow/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Garside
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2021-
|
15
|
+
date: 2021-06-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activemodel
|
@@ -57,12 +57,12 @@ dependencies:
|
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: 5.2.1
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
|
-
name:
|
60
|
+
name: spicerack
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|
62
62
|
requirements:
|
63
63
|
- - ">="
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
65
|
+
version: 0.2.0
|
66
66
|
- - "<"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.0'
|
@@ -72,7 +72,47 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.2.0
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '1.0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: short_circu_it
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 0.2.0
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
89
|
+
type: :runtime
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 0.2.0
|
96
|
+
- - "<"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '1.0'
|
99
|
+
- !ruby/object:Gem::Dependency
|
100
|
+
name: technologic
|
101
|
+
requirement: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 0.2.0
|
106
|
+
- - "<"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '1.0'
|
109
|
+
type: :runtime
|
110
|
+
prerelease: false
|
111
|
+
version_requirements: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: 0.2.0
|
76
116
|
- - "<"
|
77
117
|
- !ruby/object:Gem::Version
|
78
118
|
version: '1.0'
|
@@ -246,6 +286,7 @@ files:
|
|
246
286
|
- README.md
|
247
287
|
- lib/flow.rb
|
248
288
|
- lib/flow/concerns/transaction_wrapper.rb
|
289
|
+
- lib/flow/errors.rb
|
249
290
|
- lib/flow/flow/callbacks.rb
|
250
291
|
- lib/flow/flow/core.rb
|
251
292
|
- lib/flow/flow/flux.rb
|