workflow_to_hash 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/README.md +7 -3
- data/lib/workflow_to_hash/version.rb +6 -1
- data/workflow_to_hash.gemspec +2 -2
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3fb057ae51619d7a46b8410e8d8f038cb045355e934ed3d675efdd73106322eb
|
4
|
+
data.tar.gz: 3c5dcba308b817702a4ce97325b14af46304e0420b62f1f2a8d3441686f79cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dea11031146d036529f830922ce53d070deba0381d2911fcb46d1425db422a4cf445ba3f386de8b86445058699fda02d0e579c7f461c72362b61cf1c60f05c1
|
7
|
+
data.tar.gz: 92a054b276a9181cdceb018a8c23cdcf32d185ee7c52356941720ae3e4d7b9a288bdaa11ebdc04bbcfae03a1d647d8e1a12da1a0fb225ed7ffd31131a34c43ad
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -30,6 +30,7 @@ steps. For example, `:one` to `:two` to `three`. In FiniteMachine, to achieve th
|
|
30
30
|
can do this:
|
31
31
|
|
32
32
|
```ruby
|
33
|
+
require 'finite_machine'
|
33
34
|
class StateMachine < FiniteMachine::Definition
|
34
35
|
initial :one
|
35
36
|
|
@@ -57,6 +58,9 @@ WorkflowToHash allow me to create state sequences more easily. For example, to a
|
|
57
58
|
the above I could:
|
58
59
|
|
59
60
|
```ruby
|
61
|
+
require 'finite_machine'
|
62
|
+
require 'workflow_to_hash'
|
63
|
+
|
60
64
|
class Workflow < WorkflowToHash::Workflow
|
61
65
|
def forward
|
62
66
|
[:start, :one, :two, :three]
|
@@ -88,7 +92,7 @@ sm.next
|
|
88
92
|
sm.state # --> :three
|
89
93
|
```
|
90
94
|
|
91
|
-
And
|
95
|
+
And then it allows me to build more complex state machines succinctly:
|
92
96
|
|
93
97
|
```ruby
|
94
98
|
|
@@ -99,10 +103,10 @@ class StateMachine < FiniteMachine::Definition
|
|
99
103
|
event(
|
100
104
|
:next,
|
101
105
|
Workflow.for(:forward).merge(if: -> {target.forward})
|
102
|
-
)
|
106
|
+
)
|
103
107
|
event(
|
104
108
|
:next,
|
105
|
-
Workflow.for(:backward).merge(if: -> {!target.forward)
|
109
|
+
Workflow.for(:backward).merge(if: -> {!target.forward})
|
106
110
|
)
|
107
111
|
}
|
108
112
|
end
|
data/workflow_to_hash.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "
|
25
|
-
spec.add_development_dependency "rake", "
|
24
|
+
spec.add_development_dependency "bundler", ">= 1.14"
|
25
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
26
26
|
spec.add_development_dependency "minitest", "~> 5.0"
|
27
27
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workflow_to_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Nichols
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.14'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.14'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 12.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 12.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -91,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
|
95
|
-
rubygems_version: 2.6.11
|
94
|
+
rubygems_version: 3.0.4
|
96
95
|
signing_key:
|
97
96
|
specification_version: 4
|
98
97
|
summary: A tool to allow a sequence of actions in a state machine to be defined as
|