spree-state_machine 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.travis.yml +12 -0
- data/.yardopts +5 -0
- data/CHANGELOG.md +502 -0
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.md +1246 -0
- data/Rakefile +20 -0
- data/examples/AutoShop_state.png +0 -0
- data/examples/Car_state.png +0 -0
- data/examples/Gemfile +5 -0
- data/examples/Gemfile.lock +14 -0
- data/examples/TrafficLight_state.png +0 -0
- data/examples/Vehicle_state.png +0 -0
- data/examples/auto_shop.rb +13 -0
- data/examples/car.rb +21 -0
- data/examples/doc/AutoShop.html +2856 -0
- data/examples/doc/AutoShop_state.png +0 -0
- data/examples/doc/Car.html +919 -0
- data/examples/doc/Car_state.png +0 -0
- data/examples/doc/TrafficLight.html +2230 -0
- data/examples/doc/TrafficLight_state.png +0 -0
- data/examples/doc/Vehicle.html +7921 -0
- data/examples/doc/Vehicle_state.png +0 -0
- data/examples/doc/_index.html +136 -0
- data/examples/doc/class_list.html +47 -0
- data/examples/doc/css/common.css +1 -0
- data/examples/doc/css/full_list.css +55 -0
- data/examples/doc/css/style.css +322 -0
- data/examples/doc/file_list.html +46 -0
- data/examples/doc/frames.html +13 -0
- data/examples/doc/index.html +136 -0
- data/examples/doc/js/app.js +205 -0
- data/examples/doc/js/full_list.js +173 -0
- data/examples/doc/js/jquery.js +16 -0
- data/examples/doc/method_list.html +734 -0
- data/examples/doc/top-level-namespace.html +105 -0
- data/examples/merb-rest/controller.rb +51 -0
- data/examples/merb-rest/model.rb +28 -0
- data/examples/merb-rest/view_edit.html.erb +24 -0
- data/examples/merb-rest/view_index.html.erb +23 -0
- data/examples/merb-rest/view_new.html.erb +13 -0
- data/examples/merb-rest/view_show.html.erb +17 -0
- data/examples/rails-rest/controller.rb +43 -0
- data/examples/rails-rest/migration.rb +7 -0
- data/examples/rails-rest/model.rb +23 -0
- data/examples/rails-rest/view__form.html.erb +34 -0
- data/examples/rails-rest/view_edit.html.erb +6 -0
- data/examples/rails-rest/view_index.html.erb +25 -0
- data/examples/rails-rest/view_new.html.erb +5 -0
- data/examples/rails-rest/view_show.html.erb +19 -0
- data/examples/traffic_light.rb +9 -0
- data/examples/vehicle.rb +33 -0
- data/lib/state_machine/assertions.rb +36 -0
- data/lib/state_machine/branch.rb +225 -0
- data/lib/state_machine/callback.rb +236 -0
- data/lib/state_machine/core.rb +7 -0
- data/lib/state_machine/core_ext/class/state_machine.rb +5 -0
- data/lib/state_machine/core_ext.rb +2 -0
- data/lib/state_machine/error.rb +13 -0
- data/lib/state_machine/eval_helpers.rb +87 -0
- data/lib/state_machine/event.rb +257 -0
- data/lib/state_machine/event_collection.rb +141 -0
- data/lib/state_machine/extensions.rb +149 -0
- data/lib/state_machine/graph.rb +92 -0
- data/lib/state_machine/helper_module.rb +17 -0
- data/lib/state_machine/initializers/rails.rb +25 -0
- data/lib/state_machine/initializers.rb +4 -0
- data/lib/state_machine/integrations/active_model/locale.rb +11 -0
- data/lib/state_machine/integrations/active_model/observer.rb +33 -0
- data/lib/state_machine/integrations/active_model/observer_update.rb +42 -0
- data/lib/state_machine/integrations/active_model/versions.rb +31 -0
- data/lib/state_machine/integrations/active_model.rb +585 -0
- data/lib/state_machine/integrations/active_record/locale.rb +20 -0
- data/lib/state_machine/integrations/active_record/versions.rb +123 -0
- data/lib/state_machine/integrations/active_record.rb +525 -0
- data/lib/state_machine/integrations/base.rb +100 -0
- data/lib/state_machine/integrations.rb +121 -0
- data/lib/state_machine/machine.rb +2287 -0
- data/lib/state_machine/machine_collection.rb +74 -0
- data/lib/state_machine/macro_methods.rb +522 -0
- data/lib/state_machine/matcher.rb +123 -0
- data/lib/state_machine/matcher_helpers.rb +54 -0
- data/lib/state_machine/node_collection.rb +222 -0
- data/lib/state_machine/path.rb +120 -0
- data/lib/state_machine/path_collection.rb +90 -0
- data/lib/state_machine/state.rb +297 -0
- data/lib/state_machine/state_collection.rb +112 -0
- data/lib/state_machine/state_context.rb +138 -0
- data/lib/state_machine/transition.rb +470 -0
- data/lib/state_machine/transition_collection.rb +245 -0
- data/lib/state_machine/version.rb +3 -0
- data/lib/state_machine/yard/handlers/base.rb +32 -0
- data/lib/state_machine/yard/handlers/event.rb +25 -0
- data/lib/state_machine/yard/handlers/machine.rb +344 -0
- data/lib/state_machine/yard/handlers/state.rb +25 -0
- data/lib/state_machine/yard/handlers/transition.rb +47 -0
- data/lib/state_machine/yard/handlers.rb +12 -0
- data/lib/state_machine/yard/templates/default/class/html/setup.rb +30 -0
- data/lib/state_machine/yard/templates/default/class/html/state_machines.erb +12 -0
- data/lib/state_machine/yard/templates.rb +3 -0
- data/lib/state_machine/yard.rb +8 -0
- data/lib/state_machine.rb +8 -0
- data/lib/yard-state_machine.rb +2 -0
- data/state_machine.gemspec +22 -0
- data/test/files/en.yml +17 -0
- data/test/files/switch.rb +15 -0
- data/test/functional/state_machine_test.rb +1066 -0
- data/test/test_helper.rb +7 -0
- data/test/unit/assertions_test.rb +40 -0
- data/test/unit/branch_test.rb +969 -0
- data/test/unit/callback_test.rb +704 -0
- data/test/unit/error_test.rb +43 -0
- data/test/unit/eval_helpers_test.rb +270 -0
- data/test/unit/event_collection_test.rb +398 -0
- data/test/unit/event_test.rb +1196 -0
- data/test/unit/graph_test.rb +98 -0
- data/test/unit/helper_module_test.rb +17 -0
- data/test/unit/integrations/active_model_test.rb +1245 -0
- data/test/unit/integrations/active_record_test.rb +2551 -0
- data/test/unit/integrations/base_test.rb +104 -0
- data/test/unit/integrations_test.rb +71 -0
- data/test/unit/invalid_event_test.rb +20 -0
- data/test/unit/invalid_parallel_transition_test.rb +18 -0
- data/test/unit/invalid_transition_test.rb +115 -0
- data/test/unit/machine_collection_test.rb +603 -0
- data/test/unit/machine_test.rb +3395 -0
- data/test/unit/matcher_helpers_test.rb +37 -0
- data/test/unit/matcher_test.rb +155 -0
- data/test/unit/node_collection_test.rb +362 -0
- data/test/unit/path_collection_test.rb +266 -0
- data/test/unit/path_test.rb +485 -0
- data/test/unit/state_collection_test.rb +352 -0
- data/test/unit/state_context_test.rb +441 -0
- data/test/unit/state_machine_test.rb +31 -0
- data/test/unit/state_test.rb +1101 -0
- data/test/unit/transition_collection_test.rb +2168 -0
- data/test/unit/transition_test.rb +1558 -0
- metadata +264 -0
metadata
ADDED
@@ -0,0 +1,264 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: spree-state_machine
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0.beta1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Aaron Pfeifer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: simplecov
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: test-unit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Adds support for creating state machines for attributes on any Ruby class
|
56
|
+
email: aaron@pluginaweek.org
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files:
|
60
|
+
- README.md
|
61
|
+
- CHANGELOG.md
|
62
|
+
- LICENSE
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
66
|
+
- ".yardopts"
|
67
|
+
- CHANGELOG.md
|
68
|
+
- Gemfile
|
69
|
+
- LICENSE
|
70
|
+
- README.md
|
71
|
+
- Rakefile
|
72
|
+
- examples/AutoShop_state.png
|
73
|
+
- examples/Car_state.png
|
74
|
+
- examples/Gemfile
|
75
|
+
- examples/Gemfile.lock
|
76
|
+
- examples/TrafficLight_state.png
|
77
|
+
- examples/Vehicle_state.png
|
78
|
+
- examples/auto_shop.rb
|
79
|
+
- examples/car.rb
|
80
|
+
- examples/doc/AutoShop.html
|
81
|
+
- examples/doc/AutoShop_state.png
|
82
|
+
- examples/doc/Car.html
|
83
|
+
- examples/doc/Car_state.png
|
84
|
+
- examples/doc/TrafficLight.html
|
85
|
+
- examples/doc/TrafficLight_state.png
|
86
|
+
- examples/doc/Vehicle.html
|
87
|
+
- examples/doc/Vehicle_state.png
|
88
|
+
- examples/doc/_index.html
|
89
|
+
- examples/doc/class_list.html
|
90
|
+
- examples/doc/css/common.css
|
91
|
+
- examples/doc/css/full_list.css
|
92
|
+
- examples/doc/css/style.css
|
93
|
+
- examples/doc/file_list.html
|
94
|
+
- examples/doc/frames.html
|
95
|
+
- examples/doc/index.html
|
96
|
+
- examples/doc/js/app.js
|
97
|
+
- examples/doc/js/full_list.js
|
98
|
+
- examples/doc/js/jquery.js
|
99
|
+
- examples/doc/method_list.html
|
100
|
+
- examples/doc/top-level-namespace.html
|
101
|
+
- examples/merb-rest/controller.rb
|
102
|
+
- examples/merb-rest/model.rb
|
103
|
+
- examples/merb-rest/view_edit.html.erb
|
104
|
+
- examples/merb-rest/view_index.html.erb
|
105
|
+
- examples/merb-rest/view_new.html.erb
|
106
|
+
- examples/merb-rest/view_show.html.erb
|
107
|
+
- examples/rails-rest/controller.rb
|
108
|
+
- examples/rails-rest/migration.rb
|
109
|
+
- examples/rails-rest/model.rb
|
110
|
+
- examples/rails-rest/view__form.html.erb
|
111
|
+
- examples/rails-rest/view_edit.html.erb
|
112
|
+
- examples/rails-rest/view_index.html.erb
|
113
|
+
- examples/rails-rest/view_new.html.erb
|
114
|
+
- examples/rails-rest/view_show.html.erb
|
115
|
+
- examples/traffic_light.rb
|
116
|
+
- examples/vehicle.rb
|
117
|
+
- lib/state_machine.rb
|
118
|
+
- lib/state_machine/assertions.rb
|
119
|
+
- lib/state_machine/branch.rb
|
120
|
+
- lib/state_machine/callback.rb
|
121
|
+
- lib/state_machine/core.rb
|
122
|
+
- lib/state_machine/core_ext.rb
|
123
|
+
- lib/state_machine/core_ext/class/state_machine.rb
|
124
|
+
- lib/state_machine/error.rb
|
125
|
+
- lib/state_machine/eval_helpers.rb
|
126
|
+
- lib/state_machine/event.rb
|
127
|
+
- lib/state_machine/event_collection.rb
|
128
|
+
- lib/state_machine/extensions.rb
|
129
|
+
- lib/state_machine/graph.rb
|
130
|
+
- lib/state_machine/helper_module.rb
|
131
|
+
- lib/state_machine/initializers.rb
|
132
|
+
- lib/state_machine/initializers/rails.rb
|
133
|
+
- lib/state_machine/integrations.rb
|
134
|
+
- lib/state_machine/integrations/active_model.rb
|
135
|
+
- lib/state_machine/integrations/active_model/locale.rb
|
136
|
+
- lib/state_machine/integrations/active_model/observer.rb
|
137
|
+
- lib/state_machine/integrations/active_model/observer_update.rb
|
138
|
+
- lib/state_machine/integrations/active_model/versions.rb
|
139
|
+
- lib/state_machine/integrations/active_record.rb
|
140
|
+
- lib/state_machine/integrations/active_record/locale.rb
|
141
|
+
- lib/state_machine/integrations/active_record/versions.rb
|
142
|
+
- lib/state_machine/integrations/base.rb
|
143
|
+
- lib/state_machine/machine.rb
|
144
|
+
- lib/state_machine/machine_collection.rb
|
145
|
+
- lib/state_machine/macro_methods.rb
|
146
|
+
- lib/state_machine/matcher.rb
|
147
|
+
- lib/state_machine/matcher_helpers.rb
|
148
|
+
- lib/state_machine/node_collection.rb
|
149
|
+
- lib/state_machine/path.rb
|
150
|
+
- lib/state_machine/path_collection.rb
|
151
|
+
- lib/state_machine/state.rb
|
152
|
+
- lib/state_machine/state_collection.rb
|
153
|
+
- lib/state_machine/state_context.rb
|
154
|
+
- lib/state_machine/transition.rb
|
155
|
+
- lib/state_machine/transition_collection.rb
|
156
|
+
- lib/state_machine/version.rb
|
157
|
+
- lib/state_machine/yard.rb
|
158
|
+
- lib/state_machine/yard/handlers.rb
|
159
|
+
- lib/state_machine/yard/handlers/base.rb
|
160
|
+
- lib/state_machine/yard/handlers/event.rb
|
161
|
+
- lib/state_machine/yard/handlers/machine.rb
|
162
|
+
- lib/state_machine/yard/handlers/state.rb
|
163
|
+
- lib/state_machine/yard/handlers/transition.rb
|
164
|
+
- lib/state_machine/yard/templates.rb
|
165
|
+
- lib/state_machine/yard/templates/default/class/html/setup.rb
|
166
|
+
- lib/state_machine/yard/templates/default/class/html/state_machines.erb
|
167
|
+
- lib/yard-state_machine.rb
|
168
|
+
- state_machine.gemspec
|
169
|
+
- test/files/en.yml
|
170
|
+
- test/files/switch.rb
|
171
|
+
- test/functional/state_machine_test.rb
|
172
|
+
- test/test_helper.rb
|
173
|
+
- test/unit/assertions_test.rb
|
174
|
+
- test/unit/branch_test.rb
|
175
|
+
- test/unit/callback_test.rb
|
176
|
+
- test/unit/error_test.rb
|
177
|
+
- test/unit/eval_helpers_test.rb
|
178
|
+
- test/unit/event_collection_test.rb
|
179
|
+
- test/unit/event_test.rb
|
180
|
+
- test/unit/graph_test.rb
|
181
|
+
- test/unit/helper_module_test.rb
|
182
|
+
- test/unit/integrations/active_model_test.rb
|
183
|
+
- test/unit/integrations/active_record_test.rb
|
184
|
+
- test/unit/integrations/base_test.rb
|
185
|
+
- test/unit/integrations_test.rb
|
186
|
+
- test/unit/invalid_event_test.rb
|
187
|
+
- test/unit/invalid_parallel_transition_test.rb
|
188
|
+
- test/unit/invalid_transition_test.rb
|
189
|
+
- test/unit/machine_collection_test.rb
|
190
|
+
- test/unit/machine_test.rb
|
191
|
+
- test/unit/matcher_helpers_test.rb
|
192
|
+
- test/unit/matcher_test.rb
|
193
|
+
- test/unit/node_collection_test.rb
|
194
|
+
- test/unit/path_collection_test.rb
|
195
|
+
- test/unit/path_test.rb
|
196
|
+
- test/unit/state_collection_test.rb
|
197
|
+
- test/unit/state_context_test.rb
|
198
|
+
- test/unit/state_machine_test.rb
|
199
|
+
- test/unit/state_test.rb
|
200
|
+
- test/unit/transition_collection_test.rb
|
201
|
+
- test/unit/transition_test.rb
|
202
|
+
homepage: http://www.pluginaweek.org
|
203
|
+
licenses: []
|
204
|
+
metadata: {}
|
205
|
+
post_install_message:
|
206
|
+
rdoc_options:
|
207
|
+
- "--line-numbers"
|
208
|
+
- "--inline-source"
|
209
|
+
- "--title"
|
210
|
+
- state_machine
|
211
|
+
- "--main"
|
212
|
+
- README.md
|
213
|
+
require_paths:
|
214
|
+
- lib
|
215
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- - ">="
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: '0'
|
220
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - ">"
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: 1.3.1
|
225
|
+
requirements: []
|
226
|
+
rubyforge_project:
|
227
|
+
rubygems_version: 2.4.5
|
228
|
+
signing_key:
|
229
|
+
specification_version: 4
|
230
|
+
summary: State machines for attributes
|
231
|
+
test_files:
|
232
|
+
- test/files/en.yml
|
233
|
+
- test/files/switch.rb
|
234
|
+
- test/functional/state_machine_test.rb
|
235
|
+
- test/test_helper.rb
|
236
|
+
- test/unit/assertions_test.rb
|
237
|
+
- test/unit/branch_test.rb
|
238
|
+
- test/unit/callback_test.rb
|
239
|
+
- test/unit/error_test.rb
|
240
|
+
- test/unit/eval_helpers_test.rb
|
241
|
+
- test/unit/event_collection_test.rb
|
242
|
+
- test/unit/event_test.rb
|
243
|
+
- test/unit/graph_test.rb
|
244
|
+
- test/unit/helper_module_test.rb
|
245
|
+
- test/unit/integrations/active_model_test.rb
|
246
|
+
- test/unit/integrations/active_record_test.rb
|
247
|
+
- test/unit/integrations/base_test.rb
|
248
|
+
- test/unit/integrations_test.rb
|
249
|
+
- test/unit/invalid_event_test.rb
|
250
|
+
- test/unit/invalid_parallel_transition_test.rb
|
251
|
+
- test/unit/invalid_transition_test.rb
|
252
|
+
- test/unit/machine_collection_test.rb
|
253
|
+
- test/unit/machine_test.rb
|
254
|
+
- test/unit/matcher_helpers_test.rb
|
255
|
+
- test/unit/matcher_test.rb
|
256
|
+
- test/unit/node_collection_test.rb
|
257
|
+
- test/unit/path_collection_test.rb
|
258
|
+
- test/unit/path_test.rb
|
259
|
+
- test/unit/state_collection_test.rb
|
260
|
+
- test/unit/state_context_test.rb
|
261
|
+
- test/unit/state_machine_test.rb
|
262
|
+
- test/unit/state_test.rb
|
263
|
+
- test/unit/transition_collection_test.rb
|
264
|
+
- test/unit/transition_test.rb
|