simple_state_machine 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/build.yml +46 -0
- data/.gitignore +3 -0
- data/.travis.yml +17 -0
- data/Gemfile +7 -0
- data/README.rdoc +31 -29
- data/examples/conversation.rb +5 -5
- data/examples/lamp.rb +5 -5
- data/examples/relationship.rb +8 -8
- data/examples/traffic_light.rb +3 -3
- data/examples/user.rb +1 -0
- data/gemfiles/Gemfile.activerecord-5.2.x +9 -0
- data/gemfiles/Gemfile.activerecord-6.0.x +9 -0
- data/gemfiles/Gemfile.activerecord-6.1.x +8 -0
- data/gemfiles/Gemfile.activerecord-main.x +9 -0
- data/gemfiles/Gemfile.basic +6 -0
- data/lib/simple_state_machine/decorator/active_record.rb +12 -18
- data/lib/simple_state_machine/tools/graphviz.rb +6 -2
- data/lib/simple_state_machine/version.rb +1 -1
- data/lib/simple_state_machine.rb +5 -4
- data/lib/tasks/graphviz.rake +10 -0
- data/simple_state_machine.gemspec +14 -25
- data/spec/active_record_spec.rb +196 -199
- data/spec/decorator/default_spec.rb +28 -28
- data/spec/examples_spec.rb +13 -13
- data/spec/mountable_spec.rb +18 -16
- data/spec/simple_state_machine_spec.rb +71 -63
- data/spec/spec_helper.rb +16 -9
- data/spec/state_machine_definition_spec.rb +21 -21
- data/spec/state_machine_spec.rb +12 -12
- data/spec/tools/graphviz_spec.rb +3 -2
- data/spec/tools/inspector_spec.rb +3 -3
- metadata +36 -137
- data/autotest/discover.rb +0 -1
metadata
CHANGED
@@ -1,134 +1,44 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_state_machine
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 6
|
9
|
-
- 0
|
10
|
-
version: 0.6.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.1
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Marek de Heus
|
14
8
|
- Petrik de Heus
|
15
|
-
autorequire:
|
9
|
+
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
default_executable:
|
21
|
-
dependencies:
|
22
|
-
- !ruby/object:Gem::Dependency
|
23
|
-
name: rake
|
24
|
-
prerelease: false
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ">="
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 3
|
31
|
-
segments:
|
32
|
-
- 0
|
33
|
-
version: "0"
|
34
|
-
type: :development
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: ZenTest
|
38
|
-
prerelease: false
|
39
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
|
-
requirements:
|
42
|
-
- - ">="
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 3
|
45
|
-
segments:
|
46
|
-
- 0
|
47
|
-
version: "0"
|
48
|
-
type: :development
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: rspec
|
52
|
-
prerelease: false
|
53
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
|
-
requirements:
|
56
|
-
- - ">="
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
hash: 3
|
59
|
-
segments:
|
60
|
-
- 0
|
61
|
-
version: "0"
|
62
|
-
type: :development
|
63
|
-
version_requirements: *id003
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
|
-
name: activerecord
|
66
|
-
prerelease: false
|
67
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
|
-
requirements:
|
70
|
-
- - ~>
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
hash: 9
|
73
|
-
segments:
|
74
|
-
- 2
|
75
|
-
- 3
|
76
|
-
- 5
|
77
|
-
version: 2.3.5
|
78
|
-
type: :development
|
79
|
-
version_requirements: *id004
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: sqlite3-ruby
|
82
|
-
prerelease: false
|
83
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
hash: 3
|
89
|
-
segments:
|
90
|
-
- 0
|
91
|
-
version: "0"
|
92
|
-
type: :development
|
93
|
-
version_requirements: *id005
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: ruby-debug
|
96
|
-
prerelease: false
|
97
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
|
-
requirements:
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
hash: 3
|
103
|
-
segments:
|
104
|
-
- 0
|
105
|
-
version: "0"
|
106
|
-
type: :development
|
107
|
-
version_requirements: *id006
|
12
|
+
date: 2021-12-15 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
108
14
|
description: A simple DSL to decorate existing methods with state transition guards.
|
109
|
-
email:
|
15
|
+
email:
|
110
16
|
- FIX@example.com
|
111
17
|
executables: []
|
112
|
-
|
113
18
|
extensions: []
|
114
|
-
|
115
|
-
extra_rdoc_files:
|
19
|
+
extra_rdoc_files:
|
116
20
|
- LICENSE
|
117
21
|
- README.rdoc
|
118
|
-
files:
|
119
|
-
- .
|
120
|
-
- .
|
22
|
+
files:
|
23
|
+
- ".github/workflows/build.yml"
|
24
|
+
- ".gitignore"
|
25
|
+
- ".rspec"
|
26
|
+
- ".travis.yml"
|
121
27
|
- Changelog.rdoc
|
122
28
|
- Gemfile
|
123
29
|
- LICENSE
|
124
30
|
- README.rdoc
|
125
31
|
- Rakefile
|
126
|
-
- autotest/discover.rb
|
127
32
|
- examples/conversation.rb
|
128
33
|
- examples/lamp.rb
|
129
34
|
- examples/relationship.rb
|
130
35
|
- examples/traffic_light.rb
|
131
36
|
- examples/user.rb
|
37
|
+
- gemfiles/Gemfile.activerecord-5.2.x
|
38
|
+
- gemfiles/Gemfile.activerecord-6.0.x
|
39
|
+
- gemfiles/Gemfile.activerecord-6.1.x
|
40
|
+
- gemfiles/Gemfile.activerecord-main.x
|
41
|
+
- gemfiles/Gemfile.basic
|
132
42
|
- lib/simple_state_machine.rb
|
133
43
|
- lib/simple_state_machine/.DS_Store
|
134
44
|
- lib/simple_state_machine/active_record.rb
|
@@ -156,41 +66,30 @@ files:
|
|
156
66
|
- spec/state_machine_spec.rb
|
157
67
|
- spec/tools/graphviz_spec.rb
|
158
68
|
- spec/tools/inspector_spec.rb
|
159
|
-
has_rdoc: true
|
160
69
|
homepage: http://github.com/mdh/ssm
|
161
70
|
licenses: []
|
162
|
-
|
163
|
-
post_install_message:
|
164
|
-
rdoc_options:
|
165
|
-
- --charset=UTF-8
|
166
|
-
require_paths:
|
71
|
+
metadata: {}
|
72
|
+
post_install_message:
|
73
|
+
rdoc_options:
|
74
|
+
- "--charset=UTF-8"
|
75
|
+
require_paths:
|
167
76
|
- lib
|
168
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
169
|
-
|
170
|
-
requirements:
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
171
79
|
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
version: "0"
|
177
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
|
-
none: false
|
179
|
-
requirements:
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
180
84
|
- - ">="
|
181
|
-
- !ruby/object:Gem::Version
|
182
|
-
|
183
|
-
segments:
|
184
|
-
- 0
|
185
|
-
version: "0"
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
186
87
|
requirements: []
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
signing_key:
|
191
|
-
specification_version: 3
|
88
|
+
rubygems_version: 3.1.6
|
89
|
+
signing_key:
|
90
|
+
specification_version: 4
|
192
91
|
summary: A simple DSL to decorate existing methods with logic that guards state transitions.
|
193
|
-
test_files:
|
92
|
+
test_files:
|
194
93
|
- spec/active_record_spec.rb
|
195
94
|
- spec/decorator/default_spec.rb
|
196
95
|
- spec/examples_spec.rb
|
data/autotest/discover.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Autotest.add_discovery { "rspec2" }
|