aasm 4.5.1 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +1 -1
  3. data/README.md +809 -129
  4. data/lib/aasm/aasm.rb +74 -37
  5. data/lib/aasm/base.rb +188 -41
  6. data/lib/aasm/configuration.rb +27 -2
  7. data/lib/aasm/core/event.rb +75 -47
  8. data/lib/aasm/core/invoker.rb +129 -0
  9. data/lib/aasm/core/invokers/base_invoker.rb +75 -0
  10. data/lib/aasm/core/invokers/class_invoker.rb +52 -0
  11. data/lib/aasm/core/invokers/literal_invoker.rb +49 -0
  12. data/lib/aasm/core/invokers/proc_invoker.rb +59 -0
  13. data/lib/aasm/core/state.rb +22 -13
  14. data/lib/aasm/core/transition.rb +30 -23
  15. data/lib/aasm/dsl_helper.rb +24 -22
  16. data/lib/aasm/errors.rb +8 -5
  17. data/lib/aasm/instance_base.rb +63 -15
  18. data/lib/aasm/localizer.rb +13 -3
  19. data/lib/aasm/minitest/allow_event.rb +13 -0
  20. data/lib/aasm/minitest/allow_transition_to.rb +13 -0
  21. data/lib/aasm/minitest/have_state.rb +13 -0
  22. data/lib/aasm/minitest/transition_from.rb +21 -0
  23. data/lib/aasm/minitest.rb +5 -0
  24. data/lib/aasm/minitest_spec.rb +15 -0
  25. data/lib/aasm/persistence/active_record_persistence.rb +87 -79
  26. data/lib/aasm/persistence/base.rb +30 -30
  27. data/lib/aasm/persistence/core_data_query_persistence.rb +94 -0
  28. data/lib/aasm/persistence/dynamoid_persistence.rb +92 -0
  29. data/lib/aasm/persistence/mongoid_persistence.rb +49 -35
  30. data/lib/aasm/persistence/no_brainer_persistence.rb +105 -0
  31. data/lib/aasm/persistence/orm.rb +154 -0
  32. data/lib/aasm/persistence/plain_persistence.rb +2 -1
  33. data/lib/aasm/persistence/redis_persistence.rb +112 -0
  34. data/lib/aasm/persistence/sequel_persistence.rb +37 -67
  35. data/lib/aasm/persistence.rb +20 -5
  36. data/lib/aasm/rspec/allow_event.rb +5 -1
  37. data/lib/aasm/rspec/allow_transition_to.rb +5 -1
  38. data/lib/aasm/rspec/transition_from.rb +8 -4
  39. data/lib/aasm/state_machine.rb +6 -12
  40. data/lib/aasm/state_machine_store.rb +76 -0
  41. data/lib/aasm/version.rb +1 -1
  42. data/lib/aasm.rb +8 -2
  43. data/lib/generators/aasm/aasm_generator.rb +16 -0
  44. data/lib/generators/aasm/orm_helpers.rb +41 -0
  45. data/lib/generators/active_record/aasm_generator.rb +40 -0
  46. data/lib/generators/active_record/templates/migration.rb +8 -0
  47. data/lib/generators/active_record/templates/migration_existing.rb +5 -0
  48. data/lib/generators/mongoid/aasm_generator.rb +28 -0
  49. data/lib/generators/nobrainer/aasm_generator.rb +28 -0
  50. data/lib/motion-aasm.rb +37 -0
  51. metadata +104 -259
  52. data/.document +0 -6
  53. data/.gitignore +0 -19
  54. data/.travis.yml +0 -37
  55. data/API +0 -34
  56. data/CHANGELOG.md +0 -272
  57. data/CODE_OF_CONDUCT.md +0 -13
  58. data/Gemfile +0 -15
  59. data/HOWTO +0 -12
  60. data/PLANNED_CHANGES.md +0 -11
  61. data/README_FROM_VERSION_3_TO_4.md +0 -240
  62. data/Rakefile +0 -26
  63. data/aasm.gemspec +0 -31
  64. data/callbacks.txt +0 -51
  65. data/gemfiles/rails_3.2.gemfile +0 -14
  66. data/gemfiles/rails_4.0.gemfile +0 -12
  67. data/gemfiles/rails_4.0_mongo_mapper.gemfile +0 -14
  68. data/gemfiles/rails_4.1.gemfile +0 -12
  69. data/gemfiles/rails_4.1_mongo_mapper.gemfile +0 -14
  70. data/gemfiles/rails_4.2.gemfile +0 -12
  71. data/gemfiles/rails_4.2_mongo_mapper.gemfile +0 -14
  72. data/gemfiles/rails_4.2_mongoid_5.gemfile +0 -12
  73. data/lib/aasm/persistence/mongo_mapper_persistence.rb +0 -157
  74. data/spec/database.rb +0 -63
  75. data/spec/database.yml +0 -3
  76. data/spec/en.yml +0 -9
  77. data/spec/en_deprecated_style.yml +0 -10
  78. data/spec/models/active_record/basic_active_record_two_state_machines_example.rb +0 -25
  79. data/spec/models/active_record/complex_active_record_example.rb +0 -33
  80. data/spec/models/active_record/derivate_new_dsl.rb +0 -7
  81. data/spec/models/active_record/false_state.rb +0 -35
  82. data/spec/models/active_record/gate.rb +0 -39
  83. data/spec/models/active_record/localizer_test_model.rb +0 -34
  84. data/spec/models/active_record/no_direct_assignment.rb +0 -21
  85. data/spec/models/active_record/no_scope.rb +0 -21
  86. data/spec/models/active_record/persisted_state.rb +0 -12
  87. data/spec/models/active_record/provided_and_persisted_state.rb +0 -24
  88. data/spec/models/active_record/reader.rb +0 -7
  89. data/spec/models/active_record/readme_job.rb +0 -21
  90. data/spec/models/active_record/simple_new_dsl.rb +0 -17
  91. data/spec/models/active_record/thief.rb +0 -29
  92. data/spec/models/active_record/transient.rb +0 -6
  93. data/spec/models/active_record/with_enum.rb +0 -39
  94. data/spec/models/active_record/with_false_enum.rb +0 -31
  95. data/spec/models/active_record/with_true_enum.rb +0 -39
  96. data/spec/models/active_record/writer.rb +0 -6
  97. data/spec/models/basic_two_state_machines_example.rb +0 -25
  98. data/spec/models/callbacks/basic.rb +0 -78
  99. data/spec/models/callbacks/basic_multiple.rb +0 -75
  100. data/spec/models/callbacks/guard_within_block.rb +0 -66
  101. data/spec/models/callbacks/guard_within_block_multiple.rb +0 -66
  102. data/spec/models/callbacks/multiple_transitions_transition_guard.rb +0 -65
  103. data/spec/models/callbacks/multiple_transitions_transition_guard_multiple.rb +0 -65
  104. data/spec/models/callbacks/private_method.rb +0 -44
  105. data/spec/models/callbacks/private_method_multiple.rb +0 -44
  106. data/spec/models/callbacks/with_args.rb +0 -61
  107. data/spec/models/callbacks/with_args_multiple.rb +0 -61
  108. data/spec/models/callbacks/with_state_arg.rb +0 -26
  109. data/spec/models/callbacks/with_state_arg_multiple.rb +0 -26
  110. data/spec/models/complex_example.rb +0 -222
  111. data/spec/models/conversation.rb +0 -93
  112. data/spec/models/default_state.rb +0 -12
  113. data/spec/models/double_definer.rb +0 -21
  114. data/spec/models/foo.rb +0 -92
  115. data/spec/models/foo_callback_multiple.rb +0 -45
  116. data/spec/models/guardian.rb +0 -48
  117. data/spec/models/guardian_multiple.rb +0 -48
  118. data/spec/models/initial_state_proc.rb +0 -31
  119. data/spec/models/invalid_persistor.rb +0 -31
  120. data/spec/models/mongo_mapper/complex_mongo_mapper_example.rb +0 -37
  121. data/spec/models/mongo_mapper/no_scope_mongo_mapper.rb +0 -21
  122. data/spec/models/mongo_mapper/simple_mongo_mapper.rb +0 -23
  123. data/spec/models/mongo_mapper/simple_new_dsl_mongo_mapper.rb +0 -25
  124. data/spec/models/mongoid/complex_mongoid_example.rb +0 -37
  125. data/spec/models/mongoid/no_scope_mongoid.rb +0 -21
  126. data/spec/models/mongoid/simple_mongoid.rb +0 -23
  127. data/spec/models/mongoid/simple_new_dsl_mongoid.rb +0 -25
  128. data/spec/models/no_initial_state.rb +0 -25
  129. data/spec/models/not_auto_loaded/process.rb +0 -21
  130. data/spec/models/parametrised_event.rb +0 -29
  131. data/spec/models/parametrised_event_multiple.rb +0 -29
  132. data/spec/models/process_with_new_dsl.rb +0 -31
  133. data/spec/models/provided_state.rb +0 -24
  134. data/spec/models/sequel/complex_sequel_example.rb +0 -45
  135. data/spec/models/sequel/sequel_multiple.rb +0 -25
  136. data/spec/models/sequel/sequel_simple.rb +0 -25
  137. data/spec/models/silencer.rb +0 -27
  138. data/spec/models/simple_example.rb +0 -15
  139. data/spec/models/simple_multiple_example.rb +0 -30
  140. data/spec/models/state_machine_with_failed_event.rb +0 -12
  141. data/spec/models/sub_class.rb +0 -7
  142. data/spec/models/sub_class_with_more_states.rb +0 -18
  143. data/spec/models/sub_classing.rb +0 -3
  144. data/spec/models/super_class.rb +0 -46
  145. data/spec/models/this_name_better_not_be_in_use.rb +0 -11
  146. data/spec/models/transactor.rb +0 -53
  147. data/spec/models/valid_state_name.rb +0 -23
  148. data/spec/models/validator.rb +0 -79
  149. data/spec/models/worker.rb +0 -2
  150. data/spec/spec_helper.rb +0 -25
  151. data/spec/unit/api_spec.rb +0 -77
  152. data/spec/unit/basic_two_state_machines_example_spec.rb +0 -10
  153. data/spec/unit/callback_multiple_spec.rb +0 -295
  154. data/spec/unit/callbacks_spec.rb +0 -296
  155. data/spec/unit/complex_example_spec.rb +0 -84
  156. data/spec/unit/complex_multiple_example_spec.rb +0 -99
  157. data/spec/unit/edge_cases_spec.rb +0 -16
  158. data/spec/unit/event_multiple_spec.rb +0 -73
  159. data/spec/unit/event_naming_spec.rb +0 -11
  160. data/spec/unit/event_spec.rb +0 -322
  161. data/spec/unit/guard_multiple_spec.rb +0 -60
  162. data/spec/unit/guard_spec.rb +0 -60
  163. data/spec/unit/initial_state_multiple_spec.rb +0 -15
  164. data/spec/unit/initial_state_spec.rb +0 -12
  165. data/spec/unit/inspection_multiple_spec.rb +0 -201
  166. data/spec/unit/inspection_spec.rb +0 -111
  167. data/spec/unit/localizer_spec.rb +0 -76
  168. data/spec/unit/memory_leak_spec.rb +0 -38
  169. data/spec/unit/new_dsl_spec.rb +0 -12
  170. data/spec/unit/persistence/active_record_persistence_multiple_spec.rb +0 -573
  171. data/spec/unit/persistence/active_record_persistence_spec.rb +0 -552
  172. data/spec/unit/persistence/mongo_mapper_persistence_multiple_spec.rb +0 -146
  173. data/spec/unit/persistence/mongo_mapper_persistence_spec.rb +0 -93
  174. data/spec/unit/persistence/mongoid_persistence_multiple_spec.rb +0 -127
  175. data/spec/unit/persistence/mongoid_persistence_spec.rb +0 -79
  176. data/spec/unit/persistence/sequel_persistence_multiple_spec.rb +0 -153
  177. data/spec/unit/persistence/sequel_persistence_spec.rb +0 -100
  178. data/spec/unit/readme_spec.rb +0 -42
  179. data/spec/unit/reloading_spec.rb +0 -15
  180. data/spec/unit/rspec_matcher_spec.rb +0 -79
  181. data/spec/unit/simple_example_spec.rb +0 -42
  182. data/spec/unit/simple_multiple_example_spec.rb +0 -63
  183. data/spec/unit/state_spec.rb +0 -89
  184. data/spec/unit/subclassing_multiple_spec.rb +0 -39
  185. data/spec/unit/subclassing_spec.rb +0 -31
  186. data/spec/unit/transition_spec.rb +0 -291
metadata CHANGED
@@ -1,17 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aasm
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.1
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
- - Scott Barron
8
- - Travis Tilley
9
7
  - Thorsten Boettger
10
- autorequire:
8
+ - Anil Maurya
9
+ autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2015-12-08 00:00:00.000000000 Z
12
+ date: 2023-02-05 00:00:00.000000000 Z
14
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: concurrent-ruby
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.0'
15
28
  - !ruby/object:Gem::Dependency
16
29
  name: rake
17
30
  requirement: !ruby/object:Gem::Requirement
@@ -54,6 +67,62 @@ dependencies:
54
67
  - - ">="
55
68
  - !ruby/object:Gem::Version
56
69
  version: '3'
70
+ - !ruby/object:Gem::Dependency
71
+ name: generator_spec
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: appraisal
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: simplecov
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: codecov
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: 0.1.21
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: 0.1.21
57
126
  - !ruby/object:Gem::Dependency
58
127
  name: pry
59
128
  requirement: !ruby/object:Gem::Requirement
@@ -70,51 +139,45 @@ dependencies:
70
139
  version: '0'
71
140
  description: AASM is a continuation of the acts-as-state-machine rails plugin, built
72
141
  for plain Ruby objects.
73
- email: scott@elitists.net, ttilley@gmail.com, aasm@mt7.de
142
+ email: aasm@mt7.de, anilmaurya8dec@gmail.com
74
143
  executables: []
75
144
  extensions: []
76
145
  extra_rdoc_files: []
77
146
  files:
78
- - ".document"
79
- - ".gitignore"
80
- - ".travis.yml"
81
- - API
82
- - CHANGELOG.md
83
- - CODE_OF_CONDUCT.md
84
- - Gemfile
85
- - HOWTO
86
147
  - LICENSE
87
- - PLANNED_CHANGES.md
88
148
  - README.md
89
- - README_FROM_VERSION_3_TO_4.md
90
- - Rakefile
91
- - aasm.gemspec
92
- - callbacks.txt
93
- - gemfiles/rails_3.2.gemfile
94
- - gemfiles/rails_4.0.gemfile
95
- - gemfiles/rails_4.0_mongo_mapper.gemfile
96
- - gemfiles/rails_4.1.gemfile
97
- - gemfiles/rails_4.1_mongo_mapper.gemfile
98
- - gemfiles/rails_4.2.gemfile
99
- - gemfiles/rails_4.2_mongo_mapper.gemfile
100
- - gemfiles/rails_4.2_mongoid_5.gemfile
101
149
  - lib/aasm.rb
102
150
  - lib/aasm/aasm.rb
103
151
  - lib/aasm/base.rb
104
152
  - lib/aasm/configuration.rb
105
153
  - lib/aasm/core/event.rb
154
+ - lib/aasm/core/invoker.rb
155
+ - lib/aasm/core/invokers/base_invoker.rb
156
+ - lib/aasm/core/invokers/class_invoker.rb
157
+ - lib/aasm/core/invokers/literal_invoker.rb
158
+ - lib/aasm/core/invokers/proc_invoker.rb
106
159
  - lib/aasm/core/state.rb
107
160
  - lib/aasm/core/transition.rb
108
161
  - lib/aasm/dsl_helper.rb
109
162
  - lib/aasm/errors.rb
110
163
  - lib/aasm/instance_base.rb
111
164
  - lib/aasm/localizer.rb
165
+ - lib/aasm/minitest.rb
166
+ - lib/aasm/minitest/allow_event.rb
167
+ - lib/aasm/minitest/allow_transition_to.rb
168
+ - lib/aasm/minitest/have_state.rb
169
+ - lib/aasm/minitest/transition_from.rb
170
+ - lib/aasm/minitest_spec.rb
112
171
  - lib/aasm/persistence.rb
113
172
  - lib/aasm/persistence/active_record_persistence.rb
114
173
  - lib/aasm/persistence/base.rb
115
- - lib/aasm/persistence/mongo_mapper_persistence.rb
174
+ - lib/aasm/persistence/core_data_query_persistence.rb
175
+ - lib/aasm/persistence/dynamoid_persistence.rb
116
176
  - lib/aasm/persistence/mongoid_persistence.rb
177
+ - lib/aasm/persistence/no_brainer_persistence.rb
178
+ - lib/aasm/persistence/orm.rb
117
179
  - lib/aasm/persistence/plain_persistence.rb
180
+ - lib/aasm/persistence/redis_persistence.rb
118
181
  - lib/aasm/persistence/sequel_persistence.rb
119
182
  - lib/aasm/rspec.rb
120
183
  - lib/aasm/rspec/allow_event.rb
@@ -122,125 +185,21 @@ files:
122
185
  - lib/aasm/rspec/have_state.rb
123
186
  - lib/aasm/rspec/transition_from.rb
124
187
  - lib/aasm/state_machine.rb
188
+ - lib/aasm/state_machine_store.rb
125
189
  - lib/aasm/version.rb
126
- - spec/database.rb
127
- - spec/database.yml
128
- - spec/en.yml
129
- - spec/en_deprecated_style.yml
130
- - spec/models/active_record/basic_active_record_two_state_machines_example.rb
131
- - spec/models/active_record/complex_active_record_example.rb
132
- - spec/models/active_record/derivate_new_dsl.rb
133
- - spec/models/active_record/false_state.rb
134
- - spec/models/active_record/gate.rb
135
- - spec/models/active_record/localizer_test_model.rb
136
- - spec/models/active_record/no_direct_assignment.rb
137
- - spec/models/active_record/no_scope.rb
138
- - spec/models/active_record/persisted_state.rb
139
- - spec/models/active_record/provided_and_persisted_state.rb
140
- - spec/models/active_record/reader.rb
141
- - spec/models/active_record/readme_job.rb
142
- - spec/models/active_record/simple_new_dsl.rb
143
- - spec/models/active_record/thief.rb
144
- - spec/models/active_record/transient.rb
145
- - spec/models/active_record/with_enum.rb
146
- - spec/models/active_record/with_false_enum.rb
147
- - spec/models/active_record/with_true_enum.rb
148
- - spec/models/active_record/writer.rb
149
- - spec/models/basic_two_state_machines_example.rb
150
- - spec/models/callbacks/basic.rb
151
- - spec/models/callbacks/basic_multiple.rb
152
- - spec/models/callbacks/guard_within_block.rb
153
- - spec/models/callbacks/guard_within_block_multiple.rb
154
- - spec/models/callbacks/multiple_transitions_transition_guard.rb
155
- - spec/models/callbacks/multiple_transitions_transition_guard_multiple.rb
156
- - spec/models/callbacks/private_method.rb
157
- - spec/models/callbacks/private_method_multiple.rb
158
- - spec/models/callbacks/with_args.rb
159
- - spec/models/callbacks/with_args_multiple.rb
160
- - spec/models/callbacks/with_state_arg.rb
161
- - spec/models/callbacks/with_state_arg_multiple.rb
162
- - spec/models/complex_example.rb
163
- - spec/models/conversation.rb
164
- - spec/models/default_state.rb
165
- - spec/models/double_definer.rb
166
- - spec/models/foo.rb
167
- - spec/models/foo_callback_multiple.rb
168
- - spec/models/guardian.rb
169
- - spec/models/guardian_multiple.rb
170
- - spec/models/initial_state_proc.rb
171
- - spec/models/invalid_persistor.rb
172
- - spec/models/mongo_mapper/complex_mongo_mapper_example.rb
173
- - spec/models/mongo_mapper/no_scope_mongo_mapper.rb
174
- - spec/models/mongo_mapper/simple_mongo_mapper.rb
175
- - spec/models/mongo_mapper/simple_new_dsl_mongo_mapper.rb
176
- - spec/models/mongoid/complex_mongoid_example.rb
177
- - spec/models/mongoid/no_scope_mongoid.rb
178
- - spec/models/mongoid/simple_mongoid.rb
179
- - spec/models/mongoid/simple_new_dsl_mongoid.rb
180
- - spec/models/no_initial_state.rb
181
- - spec/models/not_auto_loaded/process.rb
182
- - spec/models/parametrised_event.rb
183
- - spec/models/parametrised_event_multiple.rb
184
- - spec/models/process_with_new_dsl.rb
185
- - spec/models/provided_state.rb
186
- - spec/models/sequel/complex_sequel_example.rb
187
- - spec/models/sequel/sequel_multiple.rb
188
- - spec/models/sequel/sequel_simple.rb
189
- - spec/models/silencer.rb
190
- - spec/models/simple_example.rb
191
- - spec/models/simple_multiple_example.rb
192
- - spec/models/state_machine_with_failed_event.rb
193
- - spec/models/sub_class.rb
194
- - spec/models/sub_class_with_more_states.rb
195
- - spec/models/sub_classing.rb
196
- - spec/models/super_class.rb
197
- - spec/models/this_name_better_not_be_in_use.rb
198
- - spec/models/transactor.rb
199
- - spec/models/valid_state_name.rb
200
- - spec/models/validator.rb
201
- - spec/models/worker.rb
202
- - spec/spec_helper.rb
203
- - spec/unit/api_spec.rb
204
- - spec/unit/basic_two_state_machines_example_spec.rb
205
- - spec/unit/callback_multiple_spec.rb
206
- - spec/unit/callbacks_spec.rb
207
- - spec/unit/complex_example_spec.rb
208
- - spec/unit/complex_multiple_example_spec.rb
209
- - spec/unit/edge_cases_spec.rb
210
- - spec/unit/event_multiple_spec.rb
211
- - spec/unit/event_naming_spec.rb
212
- - spec/unit/event_spec.rb
213
- - spec/unit/guard_multiple_spec.rb
214
- - spec/unit/guard_spec.rb
215
- - spec/unit/initial_state_multiple_spec.rb
216
- - spec/unit/initial_state_spec.rb
217
- - spec/unit/inspection_multiple_spec.rb
218
- - spec/unit/inspection_spec.rb
219
- - spec/unit/localizer_spec.rb
220
- - spec/unit/memory_leak_spec.rb
221
- - spec/unit/new_dsl_spec.rb
222
- - spec/unit/persistence/active_record_persistence_multiple_spec.rb
223
- - spec/unit/persistence/active_record_persistence_spec.rb
224
- - spec/unit/persistence/mongo_mapper_persistence_multiple_spec.rb
225
- - spec/unit/persistence/mongo_mapper_persistence_spec.rb
226
- - spec/unit/persistence/mongoid_persistence_multiple_spec.rb
227
- - spec/unit/persistence/mongoid_persistence_spec.rb
228
- - spec/unit/persistence/sequel_persistence_multiple_spec.rb
229
- - spec/unit/persistence/sequel_persistence_spec.rb
230
- - spec/unit/readme_spec.rb
231
- - spec/unit/reloading_spec.rb
232
- - spec/unit/rspec_matcher_spec.rb
233
- - spec/unit/simple_example_spec.rb
234
- - spec/unit/simple_multiple_example_spec.rb
235
- - spec/unit/state_spec.rb
236
- - spec/unit/subclassing_multiple_spec.rb
237
- - spec/unit/subclassing_spec.rb
238
- - spec/unit/transition_spec.rb
190
+ - lib/generators/aasm/aasm_generator.rb
191
+ - lib/generators/aasm/orm_helpers.rb
192
+ - lib/generators/active_record/aasm_generator.rb
193
+ - lib/generators/active_record/templates/migration.rb
194
+ - lib/generators/active_record/templates/migration_existing.rb
195
+ - lib/generators/mongoid/aasm_generator.rb
196
+ - lib/generators/nobrainer/aasm_generator.rb
197
+ - lib/motion-aasm.rb
239
198
  homepage: https://github.com/aasm/aasm
240
199
  licenses:
241
200
  - MIT
242
201
  metadata: {}
243
- post_install_message:
202
+ post_install_message:
244
203
  rdoc_options: []
245
204
  require_paths:
246
205
  - lib
@@ -255,122 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
214
  - !ruby/object:Gem::Version
256
215
  version: '0'
257
216
  requirements: []
258
- rubyforge_project:
259
- rubygems_version: 2.4.5
260
- signing_key:
217
+ rubygems_version: 3.0.9
218
+ signing_key:
261
219
  specification_version: 4
262
220
  summary: State machine mixin for Ruby objects
263
- test_files:
264
- - spec/database.rb
265
- - spec/database.yml
266
- - spec/en.yml
267
- - spec/en_deprecated_style.yml
268
- - spec/models/active_record/basic_active_record_two_state_machines_example.rb
269
- - spec/models/active_record/complex_active_record_example.rb
270
- - spec/models/active_record/derivate_new_dsl.rb
271
- - spec/models/active_record/false_state.rb
272
- - spec/models/active_record/gate.rb
273
- - spec/models/active_record/localizer_test_model.rb
274
- - spec/models/active_record/no_direct_assignment.rb
275
- - spec/models/active_record/no_scope.rb
276
- - spec/models/active_record/persisted_state.rb
277
- - spec/models/active_record/provided_and_persisted_state.rb
278
- - spec/models/active_record/reader.rb
279
- - spec/models/active_record/readme_job.rb
280
- - spec/models/active_record/simple_new_dsl.rb
281
- - spec/models/active_record/thief.rb
282
- - spec/models/active_record/transient.rb
283
- - spec/models/active_record/with_enum.rb
284
- - spec/models/active_record/with_false_enum.rb
285
- - spec/models/active_record/with_true_enum.rb
286
- - spec/models/active_record/writer.rb
287
- - spec/models/basic_two_state_machines_example.rb
288
- - spec/models/callbacks/basic.rb
289
- - spec/models/callbacks/basic_multiple.rb
290
- - spec/models/callbacks/guard_within_block.rb
291
- - spec/models/callbacks/guard_within_block_multiple.rb
292
- - spec/models/callbacks/multiple_transitions_transition_guard.rb
293
- - spec/models/callbacks/multiple_transitions_transition_guard_multiple.rb
294
- - spec/models/callbacks/private_method.rb
295
- - spec/models/callbacks/private_method_multiple.rb
296
- - spec/models/callbacks/with_args.rb
297
- - spec/models/callbacks/with_args_multiple.rb
298
- - spec/models/callbacks/with_state_arg.rb
299
- - spec/models/callbacks/with_state_arg_multiple.rb
300
- - spec/models/complex_example.rb
301
- - spec/models/conversation.rb
302
- - spec/models/default_state.rb
303
- - spec/models/double_definer.rb
304
- - spec/models/foo.rb
305
- - spec/models/foo_callback_multiple.rb
306
- - spec/models/guardian.rb
307
- - spec/models/guardian_multiple.rb
308
- - spec/models/initial_state_proc.rb
309
- - spec/models/invalid_persistor.rb
310
- - spec/models/mongo_mapper/complex_mongo_mapper_example.rb
311
- - spec/models/mongo_mapper/no_scope_mongo_mapper.rb
312
- - spec/models/mongo_mapper/simple_mongo_mapper.rb
313
- - spec/models/mongo_mapper/simple_new_dsl_mongo_mapper.rb
314
- - spec/models/mongoid/complex_mongoid_example.rb
315
- - spec/models/mongoid/no_scope_mongoid.rb
316
- - spec/models/mongoid/simple_mongoid.rb
317
- - spec/models/mongoid/simple_new_dsl_mongoid.rb
318
- - spec/models/no_initial_state.rb
319
- - spec/models/not_auto_loaded/process.rb
320
- - spec/models/parametrised_event.rb
321
- - spec/models/parametrised_event_multiple.rb
322
- - spec/models/process_with_new_dsl.rb
323
- - spec/models/provided_state.rb
324
- - spec/models/sequel/complex_sequel_example.rb
325
- - spec/models/sequel/sequel_multiple.rb
326
- - spec/models/sequel/sequel_simple.rb
327
- - spec/models/silencer.rb
328
- - spec/models/simple_example.rb
329
- - spec/models/simple_multiple_example.rb
330
- - spec/models/state_machine_with_failed_event.rb
331
- - spec/models/sub_class.rb
332
- - spec/models/sub_class_with_more_states.rb
333
- - spec/models/sub_classing.rb
334
- - spec/models/super_class.rb
335
- - spec/models/this_name_better_not_be_in_use.rb
336
- - spec/models/transactor.rb
337
- - spec/models/valid_state_name.rb
338
- - spec/models/validator.rb
339
- - spec/models/worker.rb
340
- - spec/spec_helper.rb
341
- - spec/unit/api_spec.rb
342
- - spec/unit/basic_two_state_machines_example_spec.rb
343
- - spec/unit/callback_multiple_spec.rb
344
- - spec/unit/callbacks_spec.rb
345
- - spec/unit/complex_example_spec.rb
346
- - spec/unit/complex_multiple_example_spec.rb
347
- - spec/unit/edge_cases_spec.rb
348
- - spec/unit/event_multiple_spec.rb
349
- - spec/unit/event_naming_spec.rb
350
- - spec/unit/event_spec.rb
351
- - spec/unit/guard_multiple_spec.rb
352
- - spec/unit/guard_spec.rb
353
- - spec/unit/initial_state_multiple_spec.rb
354
- - spec/unit/initial_state_spec.rb
355
- - spec/unit/inspection_multiple_spec.rb
356
- - spec/unit/inspection_spec.rb
357
- - spec/unit/localizer_spec.rb
358
- - spec/unit/memory_leak_spec.rb
359
- - spec/unit/new_dsl_spec.rb
360
- - spec/unit/persistence/active_record_persistence_multiple_spec.rb
361
- - spec/unit/persistence/active_record_persistence_spec.rb
362
- - spec/unit/persistence/mongo_mapper_persistence_multiple_spec.rb
363
- - spec/unit/persistence/mongo_mapper_persistence_spec.rb
364
- - spec/unit/persistence/mongoid_persistence_multiple_spec.rb
365
- - spec/unit/persistence/mongoid_persistence_spec.rb
366
- - spec/unit/persistence/sequel_persistence_multiple_spec.rb
367
- - spec/unit/persistence/sequel_persistence_spec.rb
368
- - spec/unit/readme_spec.rb
369
- - spec/unit/reloading_spec.rb
370
- - spec/unit/rspec_matcher_spec.rb
371
- - spec/unit/simple_example_spec.rb
372
- - spec/unit/simple_multiple_example_spec.rb
373
- - spec/unit/state_spec.rb
374
- - spec/unit/subclassing_multiple_spec.rb
375
- - spec/unit/subclassing_spec.rb
376
- - spec/unit/transition_spec.rb
221
+ test_files: []
data/.document DELETED
@@ -1,6 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- -
6
- LICENSE
data/.gitignore DELETED
@@ -1,19 +0,0 @@
1
- *.sw?
2
- *~
3
- .DS_Store
4
- .idea
5
- coverage
6
- pkg
7
- rdoc
8
- Gemfile.lock
9
- gemfiles/*.lock
10
- spec/debug.log
11
- spec/*.db
12
- TODO
13
- .rvmrc
14
- .ruby-version
15
- .ruby-gemset
16
- alto
17
- .rspec
18
- .bundle
19
- tags
data/.travis.yml DELETED
@@ -1,37 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
-
5
- rvm:
6
- # - 1.8.7
7
- # - 1.9.2
8
- - 1.9.3
9
- - 2.0.0
10
- - 2.1
11
- - 2.2
12
- # - jruby-18mode # JRuby in 1.8 mode
13
- - jruby-1.7 # JRuby in 1.9 mode
14
- - jruby-9.0.3.0
15
- - rbx-2.2.1
16
-
17
- services: mongodb
18
-
19
- gemfile:
20
- - gemfiles/rails_3.2.gemfile
21
- - gemfiles/rails_4.0.gemfile
22
- - gemfiles/rails_4.0_mongo_mapper.gemfile
23
- - gemfiles/rails_4.1.gemfile
24
- - gemfiles/rails_4.1_mongo_mapper.gemfile
25
- - gemfiles/rails_4.2.gemfile
26
- - gemfiles/rails_4.2_mongoid_5.gemfile
27
- - gemfiles/rails_4.2_mongo_mapper.gemfile
28
-
29
- matrix:
30
- allow_failures:
31
- - rvm: rbx-2.2.1
32
- - rvm: jruby-1.7
33
- exclude:
34
- - rvm: 1.9.3
35
- gemfile: gemfiles/rails_4.1.gemfile
36
- - rvm: jruby-19mode
37
- gemfile: gemfiles/rails_4.1.gemfile
data/API DELETED
@@ -1,34 +0,0 @@
1
-
2
- Overwrite method to read the current state. Used to provide another storage mechanism,
3
- different from the standard Rails read_attribute method.
4
-
5
- class MyClass
6
- include AASM
7
-
8
- def aasm_read_state
9
- # retrieve the current state manually
10
- end
11
- end
12
-
13
-
14
- Overwrite method to write the current state (and actually persist it). Used to provide
15
- another storage mechanism, different from the standard Rails write_attribute method.
16
-
17
- class MyClass
18
- include AASM
19
-
20
- def aasm_write_state
21
- # store and persist the current state manually
22
- end
23
- end
24
-
25
-
26
- Overwrite method to write the current state (without persisting it).
27
-
28
- class MyClass
29
- include AASM
30
-
31
- def aasm_write_state_without_persistence
32
- # store the current state manually
33
- end
34
- end