aasm 5.3.0 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (222) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aasm/errors.rb +1 -0
  3. data/lib/aasm/instance_base.rb +4 -3
  4. data/lib/aasm/version.rb +1 -1
  5. metadata +3 -409
  6. data/.document +0 -6
  7. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -27
  8. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  9. data/.github/workflows/build.yml +0 -100
  10. data/.gitignore +0 -20
  11. data/API +0 -34
  12. data/Appraisals +0 -51
  13. data/CHANGELOG.md +0 -464
  14. data/CODE_OF_CONDUCT.md +0 -13
  15. data/CONTRIBUTING.md +0 -24
  16. data/Dockerfile +0 -44
  17. data/Gemfile +0 -7
  18. data/Gemfile.lock_old +0 -151
  19. data/HOWTO +0 -12
  20. data/PLANNED_CHANGES.md +0 -11
  21. data/README_FROM_VERSION_3_TO_4.md +0 -240
  22. data/Rakefile +0 -31
  23. data/TESTING.md +0 -25
  24. data/aasm.gemspec +0 -37
  25. data/docker-compose.yml +0 -40
  26. data/gemfiles/norails.gemfile +0 -11
  27. data/gemfiles/rails_4.2.gemfile +0 -17
  28. data/gemfiles/rails_4.2_mongoid_5.gemfile +0 -12
  29. data/gemfiles/rails_4.2_nobrainer.gemfile +0 -10
  30. data/gemfiles/rails_5.2.gemfile +0 -14
  31. data/gemfiles/rails_6.0.gemfile +0 -14
  32. data/gemfiles/rails_6.1.gemfile +0 -14
  33. data/gemfiles/rails_7.0.gemfile +0 -14
  34. data/spec/database.rb +0 -57
  35. data/spec/database.yml +0 -3
  36. data/spec/en.yml +0 -9
  37. data/spec/generators/active_record_generator_spec.rb +0 -53
  38. data/spec/generators/mongoid_generator_spec.rb +0 -31
  39. data/spec/generators/no_brainer_generator_spec.rb +0 -29
  40. data/spec/localizer_test_model_deprecated_style.yml +0 -13
  41. data/spec/localizer_test_model_new_style.yml +0 -11
  42. data/spec/models/active_record/active_record_callback.rb +0 -93
  43. data/spec/models/active_record/basic_active_record_two_state_machines_example.rb +0 -25
  44. data/spec/models/active_record/complex_active_record_example.rb +0 -37
  45. data/spec/models/active_record/derivate_new_dsl.rb +0 -7
  46. data/spec/models/active_record/false_state.rb +0 -35
  47. data/spec/models/active_record/gate.rb +0 -39
  48. data/spec/models/active_record/instance_level_skip_validation_example.rb +0 -19
  49. data/spec/models/active_record/invalid_persistor.rb +0 -29
  50. data/spec/models/active_record/localizer_test_model.rb +0 -42
  51. data/spec/models/active_record/namespaced.rb +0 -16
  52. data/spec/models/active_record/no_direct_assignment.rb +0 -21
  53. data/spec/models/active_record/no_scope.rb +0 -21
  54. data/spec/models/active_record/persisted_state.rb +0 -12
  55. data/spec/models/active_record/person.rb +0 -23
  56. data/spec/models/active_record/provided_and_persisted_state.rb +0 -24
  57. data/spec/models/active_record/reader.rb +0 -7
  58. data/spec/models/active_record/readme_job.rb +0 -21
  59. data/spec/models/active_record/silent_persistor.rb +0 -29
  60. data/spec/models/active_record/simple_new_dsl.rb +0 -32
  61. data/spec/models/active_record/thief.rb +0 -29
  62. data/spec/models/active_record/timestamp_example.rb +0 -16
  63. data/spec/models/active_record/transactor.rb +0 -124
  64. data/spec/models/active_record/transient.rb +0 -6
  65. data/spec/models/active_record/validator.rb +0 -118
  66. data/spec/models/active_record/with_enum.rb +0 -39
  67. data/spec/models/active_record/with_enum_without_column.rb +0 -38
  68. data/spec/models/active_record/with_false_enum.rb +0 -31
  69. data/spec/models/active_record/with_true_enum.rb +0 -39
  70. data/spec/models/active_record/work.rb +0 -3
  71. data/spec/models/active_record/worker.rb +0 -2
  72. data/spec/models/active_record/writer.rb +0 -6
  73. data/spec/models/basic_two_state_machines_example.rb +0 -25
  74. data/spec/models/callbacks/basic.rb +0 -98
  75. data/spec/models/callbacks/basic_multiple.rb +0 -75
  76. data/spec/models/callbacks/guard_within_block.rb +0 -67
  77. data/spec/models/callbacks/guard_within_block_multiple.rb +0 -66
  78. data/spec/models/callbacks/multiple_transitions_transition_guard.rb +0 -66
  79. data/spec/models/callbacks/multiple_transitions_transition_guard_multiple.rb +0 -65
  80. data/spec/models/callbacks/private_method.rb +0 -44
  81. data/spec/models/callbacks/private_method_multiple.rb +0 -44
  82. data/spec/models/callbacks/with_args.rb +0 -62
  83. data/spec/models/callbacks/with_args_multiple.rb +0 -61
  84. data/spec/models/callbacks/with_state_arg.rb +0 -34
  85. data/spec/models/callbacks/with_state_arg_multiple.rb +0 -29
  86. data/spec/models/complex_example.rb +0 -222
  87. data/spec/models/conversation.rb +0 -93
  88. data/spec/models/default_state.rb +0 -12
  89. data/spec/models/double_definer.rb +0 -21
  90. data/spec/models/dynamoid/complex_dynamoid_example.rb +0 -37
  91. data/spec/models/dynamoid/dynamoid_multiple.rb +0 -18
  92. data/spec/models/dynamoid/dynamoid_simple.rb +0 -18
  93. data/spec/models/event_with_keyword_arguments.rb +0 -16
  94. data/spec/models/foo.rb +0 -106
  95. data/spec/models/foo_callback_multiple.rb +0 -45
  96. data/spec/models/guard_arguments_check.rb +0 -17
  97. data/spec/models/guard_with_params.rb +0 -24
  98. data/spec/models/guard_with_params_multiple.rb +0 -18
  99. data/spec/models/guardian.rb +0 -58
  100. data/spec/models/guardian_multiple.rb +0 -48
  101. data/spec/models/guardian_without_from_specified.rb +0 -18
  102. data/spec/models/initial_state_proc.rb +0 -31
  103. data/spec/models/mongoid/complex_mongoid_example.rb +0 -37
  104. data/spec/models/mongoid/invalid_persistor_mongoid.rb +0 -39
  105. data/spec/models/mongoid/mongoid_relationships.rb +0 -26
  106. data/spec/models/mongoid/no_scope_mongoid.rb +0 -21
  107. data/spec/models/mongoid/silent_persistor_mongoid.rb +0 -39
  108. data/spec/models/mongoid/simple_mongoid.rb +0 -23
  109. data/spec/models/mongoid/simple_new_dsl_mongoid.rb +0 -25
  110. data/spec/models/mongoid/timestamp_example_mongoid.rb +0 -20
  111. data/spec/models/mongoid/validator_mongoid.rb +0 -100
  112. data/spec/models/multi_transitioner.rb +0 -34
  113. data/spec/models/multiple_transitions_that_differ_only_by_guard.rb +0 -31
  114. data/spec/models/namespaced_multiple_example.rb +0 -42
  115. data/spec/models/no_initial_state.rb +0 -25
  116. data/spec/models/nobrainer/complex_no_brainer_example.rb +0 -36
  117. data/spec/models/nobrainer/invalid_persistor_no_brainer.rb +0 -39
  118. data/spec/models/nobrainer/no_scope_no_brainer.rb +0 -21
  119. data/spec/models/nobrainer/nobrainer_relationships.rb +0 -25
  120. data/spec/models/nobrainer/silent_persistor_no_brainer.rb +0 -39
  121. data/spec/models/nobrainer/simple_new_dsl_nobrainer.rb +0 -25
  122. data/spec/models/nobrainer/simple_no_brainer.rb +0 -23
  123. data/spec/models/nobrainer/validator_no_brainer.rb +0 -98
  124. data/spec/models/not_auto_loaded/process.rb +0 -21
  125. data/spec/models/parametrised_event.rb +0 -42
  126. data/spec/models/parametrised_event_multiple.rb +0 -29
  127. data/spec/models/process_with_new_dsl.rb +0 -31
  128. data/spec/models/provided_state.rb +0 -24
  129. data/spec/models/redis/complex_redis_example.rb +0 -40
  130. data/spec/models/redis/redis_multiple.rb +0 -20
  131. data/spec/models/redis/redis_simple.rb +0 -20
  132. data/spec/models/sequel/complex_sequel_example.rb +0 -46
  133. data/spec/models/sequel/invalid_persistor.rb +0 -52
  134. data/spec/models/sequel/sequel_multiple.rb +0 -25
  135. data/spec/models/sequel/sequel_simple.rb +0 -26
  136. data/spec/models/sequel/silent_persistor.rb +0 -50
  137. data/spec/models/sequel/transactor.rb +0 -112
  138. data/spec/models/sequel/validator.rb +0 -93
  139. data/spec/models/sequel/worker.rb +0 -12
  140. data/spec/models/silencer.rb +0 -27
  141. data/spec/models/simple_custom_example.rb +0 -53
  142. data/spec/models/simple_example.rb +0 -23
  143. data/spec/models/simple_example_with_guard_args.rb +0 -17
  144. data/spec/models/simple_multiple_example.rb +0 -42
  145. data/spec/models/state_machine_with_failed_event.rb +0 -20
  146. data/spec/models/states_on_one_line_example.rb +0 -8
  147. data/spec/models/sub_class.rb +0 -41
  148. data/spec/models/sub_class_with_more_states.rb +0 -18
  149. data/spec/models/sub_classing.rb +0 -3
  150. data/spec/models/super_class.rb +0 -46
  151. data/spec/models/this_name_better_not_be_in_use.rb +0 -11
  152. data/spec/models/timestamps_example.rb +0 -19
  153. data/spec/models/timestamps_with_named_machine_example.rb +0 -13
  154. data/spec/models/valid_state_name.rb +0 -23
  155. data/spec/spec_helper.rb +0 -41
  156. data/spec/spec_helpers/active_record.rb +0 -8
  157. data/spec/spec_helpers/dynamoid.rb +0 -39
  158. data/spec/spec_helpers/mongoid.rb +0 -26
  159. data/spec/spec_helpers/nobrainer.rb +0 -15
  160. data/spec/spec_helpers/redis.rb +0 -18
  161. data/spec/spec_helpers/remove_warnings.rb +0 -1
  162. data/spec/spec_helpers/sequel.rb +0 -7
  163. data/spec/unit/abstract_class_spec.rb +0 -27
  164. data/spec/unit/api_spec.rb +0 -104
  165. data/spec/unit/basic_two_state_machines_example_spec.rb +0 -10
  166. data/spec/unit/callback_multiple_spec.rb +0 -304
  167. data/spec/unit/callbacks_spec.rb +0 -551
  168. data/spec/unit/complex_example_spec.rb +0 -101
  169. data/spec/unit/complex_multiple_example_spec.rb +0 -115
  170. data/spec/unit/edge_cases_spec.rb +0 -16
  171. data/spec/unit/event_multiple_spec.rb +0 -73
  172. data/spec/unit/event_naming_spec.rb +0 -16
  173. data/spec/unit/event_spec.rb +0 -394
  174. data/spec/unit/event_with_keyword_arguments_spec.rb +0 -10
  175. data/spec/unit/exception_spec.rb +0 -11
  176. data/spec/unit/guard_arguments_check_spec.rb +0 -9
  177. data/spec/unit/guard_multiple_spec.rb +0 -60
  178. data/spec/unit/guard_spec.rb +0 -89
  179. data/spec/unit/guard_with_params_multiple_spec.rb +0 -10
  180. data/spec/unit/guard_with_params_spec.rb +0 -14
  181. data/spec/unit/guard_without_from_specified_spec.rb +0 -10
  182. data/spec/unit/initial_state_multiple_spec.rb +0 -15
  183. data/spec/unit/initial_state_spec.rb +0 -12
  184. data/spec/unit/inspection_multiple_spec.rb +0 -205
  185. data/spec/unit/inspection_spec.rb +0 -153
  186. data/spec/unit/invoker_spec.rb +0 -189
  187. data/spec/unit/invokers/base_invoker_spec.rb +0 -72
  188. data/spec/unit/invokers/class_invoker_spec.rb +0 -95
  189. data/spec/unit/invokers/literal_invoker_spec.rb +0 -86
  190. data/spec/unit/invokers/proc_invoker_spec.rb +0 -86
  191. data/spec/unit/localizer_spec.rb +0 -109
  192. data/spec/unit/memory_leak_spec.rb +0 -38
  193. data/spec/unit/multiple_transitions_that_differ_only_by_guard_spec.rb +0 -14
  194. data/spec/unit/namespaced_multiple_example_spec.rb +0 -75
  195. data/spec/unit/new_dsl_spec.rb +0 -12
  196. data/spec/unit/override_warning_spec.rb +0 -94
  197. data/spec/unit/persistence/active_record_persistence_multiple_spec.rb +0 -635
  198. data/spec/unit/persistence/active_record_persistence_spec.rb +0 -852
  199. data/spec/unit/persistence/dynamoid_persistence_multiple_spec.rb +0 -135
  200. data/spec/unit/persistence/dynamoid_persistence_spec.rb +0 -84
  201. data/spec/unit/persistence/mongoid_persistence_multiple_spec.rb +0 -200
  202. data/spec/unit/persistence/mongoid_persistence_spec.rb +0 -177
  203. data/spec/unit/persistence/no_brainer_persistence_multiple_spec.rb +0 -198
  204. data/spec/unit/persistence/no_brainer_persistence_spec.rb +0 -158
  205. data/spec/unit/persistence/redis_persistence_multiple_spec.rb +0 -88
  206. data/spec/unit/persistence/redis_persistence_spec.rb +0 -53
  207. data/spec/unit/persistence/sequel_persistence_multiple_spec.rb +0 -148
  208. data/spec/unit/persistence/sequel_persistence_spec.rb +0 -368
  209. data/spec/unit/readme_spec.rb +0 -41
  210. data/spec/unit/reloading_spec.rb +0 -15
  211. data/spec/unit/rspec_matcher_spec.rb +0 -88
  212. data/spec/unit/simple_custom_example_spec.rb +0 -39
  213. data/spec/unit/simple_example_spec.rb +0 -57
  214. data/spec/unit/simple_multiple_example_spec.rb +0 -91
  215. data/spec/unit/state_spec.rb +0 -105
  216. data/spec/unit/states_on_one_line_example_spec.rb +0 -16
  217. data/spec/unit/subclassing_multiple_spec.rb +0 -74
  218. data/spec/unit/subclassing_spec.rb +0 -46
  219. data/spec/unit/timestamps_spec.rb +0 -32
  220. data/spec/unit/transition_spec.rb +0 -436
  221. data/test/minitest_helper.rb +0 -61
  222. data/test/unit/minitest_matcher_test.rb +0 -80
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 442f7c145e97a545e9dd1cd5ecab268177b93deb0b258ab381107f1207fe9654
4
- data.tar.gz: 1d32640b0bfab501acc40b10f7d21be342944ed133086d44ccb924f03485f3b8
3
+ metadata.gz: 7d206aa3c586ccaa0d24a9096e78bf0fbb8a80b4e981538a7e1b016a389e8edc
4
+ data.tar.gz: 64f6da6f80a5f7e76aed9cc422c9c401fa62ba30f02493e24d78caf58a6a4de2
5
5
  SHA512:
6
- metadata.gz: be33b17c558b289c012f25ccbed984cd3b2859e14a5120bf240020eb2d83c2645834784e5bc50dac0e5a3f161f13f3d85c2a29dcefcce694be395b604676ef32
7
- data.tar.gz: 87668c8a48a9cf0335a4359970e868758a25398e2af8fb025ab9dd39db2a89147f0fad25fee9c11e1da9522fbeca6595f5363318b8baf2b7625ee1b88f3d8b80
6
+ metadata.gz: 0d1f425fa7bdf12b633f97621e28d0376c1582bb2cc131d96a9c7d1df1550e2c68a9019e7a28d5c56fa6fa9099ce4a021d5b1e6003ccfb364125688f78ea4f4a
7
+ data.tar.gz: 78819143fc5c9bf3d52ec545a9a8d2ab174bbff1ac4eb3ff38e4a49524654c24aa585c43b9f9e39440284612b8a72913927ebb3eb0fd7392ca197270fd02ad9f
data/lib/aasm/errors.rb CHANGED
@@ -17,5 +17,6 @@ module AASM
17
17
  end
18
18
 
19
19
  class UndefinedState < RuntimeError; end
20
+ class UndefinedEvent < UndefinedState; end
20
21
  class NoDirectAssignmentError < RuntimeError; end
21
22
  end
@@ -134,10 +134,11 @@ module AASM
134
134
  private
135
135
 
136
136
  def event_exists?(event_name, bang = false)
137
- event = @instance.class.aasm(@name).state_machine.events[event_name]
138
- event_error = bang ? "#{event_name}!" : event_name
137
+ event = @instance.class.aasm(@name).state_machine.events[event_name.to_sym]
138
+ return true if event
139
139
 
140
- raise AASM::UndefinedState, "State :#{event_error} doesn't exist" if event.nil?
140
+ event_error = bang ? "#{event_name}!" : event_name
141
+ raise AASM::UndefinedEvent, "Event :#{event_error} doesn't exist" if event.nil?
141
142
  end
142
143
  end
143
144
  end
data/lib/aasm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module AASM
2
- VERSION = "5.3.0"
2
+ VERSION = "5.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aasm
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thorsten Boettger
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-07-22 00:00:00.000000000 Z
12
+ date: 2022-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby
@@ -144,36 +144,8 @@ executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
- - ".document"
148
- - ".github/ISSUE_TEMPLATE/bug_report.md"
149
- - ".github/ISSUE_TEMPLATE/feature_request.md"
150
- - ".github/workflows/build.yml"
151
- - ".gitignore"
152
- - API
153
- - Appraisals
154
- - CHANGELOG.md
155
- - CODE_OF_CONDUCT.md
156
- - CONTRIBUTING.md
157
- - Dockerfile
158
- - Gemfile
159
- - Gemfile.lock_old
160
- - HOWTO
161
147
  - LICENSE
162
- - PLANNED_CHANGES.md
163
148
  - README.md
164
- - README_FROM_VERSION_3_TO_4.md
165
- - Rakefile
166
- - TESTING.md
167
- - aasm.gemspec
168
- - docker-compose.yml
169
- - gemfiles/norails.gemfile
170
- - gemfiles/rails_4.2.gemfile
171
- - gemfiles/rails_4.2_mongoid_5.gemfile
172
- - gemfiles/rails_4.2_nobrainer.gemfile
173
- - gemfiles/rails_5.2.gemfile
174
- - gemfiles/rails_6.0.gemfile
175
- - gemfiles/rails_6.1.gemfile
176
- - gemfiles/rails_7.0.gemfile
177
149
  - lib/aasm.rb
178
150
  - lib/aasm/aasm.rb
179
151
  - lib/aasm/base.rb
@@ -223,195 +195,6 @@ files:
223
195
  - lib/generators/mongoid/aasm_generator.rb
224
196
  - lib/generators/nobrainer/aasm_generator.rb
225
197
  - lib/motion-aasm.rb
226
- - spec/database.rb
227
- - spec/database.yml
228
- - spec/en.yml
229
- - spec/generators/active_record_generator_spec.rb
230
- - spec/generators/mongoid_generator_spec.rb
231
- - spec/generators/no_brainer_generator_spec.rb
232
- - spec/localizer_test_model_deprecated_style.yml
233
- - spec/localizer_test_model_new_style.yml
234
- - spec/models/active_record/active_record_callback.rb
235
- - spec/models/active_record/basic_active_record_two_state_machines_example.rb
236
- - spec/models/active_record/complex_active_record_example.rb
237
- - spec/models/active_record/derivate_new_dsl.rb
238
- - spec/models/active_record/false_state.rb
239
- - spec/models/active_record/gate.rb
240
- - spec/models/active_record/instance_level_skip_validation_example.rb
241
- - spec/models/active_record/invalid_persistor.rb
242
- - spec/models/active_record/localizer_test_model.rb
243
- - spec/models/active_record/namespaced.rb
244
- - spec/models/active_record/no_direct_assignment.rb
245
- - spec/models/active_record/no_scope.rb
246
- - spec/models/active_record/persisted_state.rb
247
- - spec/models/active_record/person.rb
248
- - spec/models/active_record/provided_and_persisted_state.rb
249
- - spec/models/active_record/reader.rb
250
- - spec/models/active_record/readme_job.rb
251
- - spec/models/active_record/silent_persistor.rb
252
- - spec/models/active_record/simple_new_dsl.rb
253
- - spec/models/active_record/thief.rb
254
- - spec/models/active_record/timestamp_example.rb
255
- - spec/models/active_record/transactor.rb
256
- - spec/models/active_record/transient.rb
257
- - spec/models/active_record/validator.rb
258
- - spec/models/active_record/with_enum.rb
259
- - spec/models/active_record/with_enum_without_column.rb
260
- - spec/models/active_record/with_false_enum.rb
261
- - spec/models/active_record/with_true_enum.rb
262
- - spec/models/active_record/work.rb
263
- - spec/models/active_record/worker.rb
264
- - spec/models/active_record/writer.rb
265
- - spec/models/basic_two_state_machines_example.rb
266
- - spec/models/callbacks/basic.rb
267
- - spec/models/callbacks/basic_multiple.rb
268
- - spec/models/callbacks/guard_within_block.rb
269
- - spec/models/callbacks/guard_within_block_multiple.rb
270
- - spec/models/callbacks/multiple_transitions_transition_guard.rb
271
- - spec/models/callbacks/multiple_transitions_transition_guard_multiple.rb
272
- - spec/models/callbacks/private_method.rb
273
- - spec/models/callbacks/private_method_multiple.rb
274
- - spec/models/callbacks/with_args.rb
275
- - spec/models/callbacks/with_args_multiple.rb
276
- - spec/models/callbacks/with_state_arg.rb
277
- - spec/models/callbacks/with_state_arg_multiple.rb
278
- - spec/models/complex_example.rb
279
- - spec/models/conversation.rb
280
- - spec/models/default_state.rb
281
- - spec/models/double_definer.rb
282
- - spec/models/dynamoid/complex_dynamoid_example.rb
283
- - spec/models/dynamoid/dynamoid_multiple.rb
284
- - spec/models/dynamoid/dynamoid_simple.rb
285
- - spec/models/event_with_keyword_arguments.rb
286
- - spec/models/foo.rb
287
- - spec/models/foo_callback_multiple.rb
288
- - spec/models/guard_arguments_check.rb
289
- - spec/models/guard_with_params.rb
290
- - spec/models/guard_with_params_multiple.rb
291
- - spec/models/guardian.rb
292
- - spec/models/guardian_multiple.rb
293
- - spec/models/guardian_without_from_specified.rb
294
- - spec/models/initial_state_proc.rb
295
- - spec/models/mongoid/complex_mongoid_example.rb
296
- - spec/models/mongoid/invalid_persistor_mongoid.rb
297
- - spec/models/mongoid/mongoid_relationships.rb
298
- - spec/models/mongoid/no_scope_mongoid.rb
299
- - spec/models/mongoid/silent_persistor_mongoid.rb
300
- - spec/models/mongoid/simple_mongoid.rb
301
- - spec/models/mongoid/simple_new_dsl_mongoid.rb
302
- - spec/models/mongoid/timestamp_example_mongoid.rb
303
- - spec/models/mongoid/validator_mongoid.rb
304
- - spec/models/multi_transitioner.rb
305
- - spec/models/multiple_transitions_that_differ_only_by_guard.rb
306
- - spec/models/namespaced_multiple_example.rb
307
- - spec/models/no_initial_state.rb
308
- - spec/models/nobrainer/complex_no_brainer_example.rb
309
- - spec/models/nobrainer/invalid_persistor_no_brainer.rb
310
- - spec/models/nobrainer/no_scope_no_brainer.rb
311
- - spec/models/nobrainer/nobrainer_relationships.rb
312
- - spec/models/nobrainer/silent_persistor_no_brainer.rb
313
- - spec/models/nobrainer/simple_new_dsl_nobrainer.rb
314
- - spec/models/nobrainer/simple_no_brainer.rb
315
- - spec/models/nobrainer/validator_no_brainer.rb
316
- - spec/models/not_auto_loaded/process.rb
317
- - spec/models/parametrised_event.rb
318
- - spec/models/parametrised_event_multiple.rb
319
- - spec/models/process_with_new_dsl.rb
320
- - spec/models/provided_state.rb
321
- - spec/models/redis/complex_redis_example.rb
322
- - spec/models/redis/redis_multiple.rb
323
- - spec/models/redis/redis_simple.rb
324
- - spec/models/sequel/complex_sequel_example.rb
325
- - spec/models/sequel/invalid_persistor.rb
326
- - spec/models/sequel/sequel_multiple.rb
327
- - spec/models/sequel/sequel_simple.rb
328
- - spec/models/sequel/silent_persistor.rb
329
- - spec/models/sequel/transactor.rb
330
- - spec/models/sequel/validator.rb
331
- - spec/models/sequel/worker.rb
332
- - spec/models/silencer.rb
333
- - spec/models/simple_custom_example.rb
334
- - spec/models/simple_example.rb
335
- - spec/models/simple_example_with_guard_args.rb
336
- - spec/models/simple_multiple_example.rb
337
- - spec/models/state_machine_with_failed_event.rb
338
- - spec/models/states_on_one_line_example.rb
339
- - spec/models/sub_class.rb
340
- - spec/models/sub_class_with_more_states.rb
341
- - spec/models/sub_classing.rb
342
- - spec/models/super_class.rb
343
- - spec/models/this_name_better_not_be_in_use.rb
344
- - spec/models/timestamps_example.rb
345
- - spec/models/timestamps_with_named_machine_example.rb
346
- - spec/models/valid_state_name.rb
347
- - spec/spec_helper.rb
348
- - spec/spec_helpers/active_record.rb
349
- - spec/spec_helpers/dynamoid.rb
350
- - spec/spec_helpers/mongoid.rb
351
- - spec/spec_helpers/nobrainer.rb
352
- - spec/spec_helpers/redis.rb
353
- - spec/spec_helpers/remove_warnings.rb
354
- - spec/spec_helpers/sequel.rb
355
- - spec/unit/abstract_class_spec.rb
356
- - spec/unit/api_spec.rb
357
- - spec/unit/basic_two_state_machines_example_spec.rb
358
- - spec/unit/callback_multiple_spec.rb
359
- - spec/unit/callbacks_spec.rb
360
- - spec/unit/complex_example_spec.rb
361
- - spec/unit/complex_multiple_example_spec.rb
362
- - spec/unit/edge_cases_spec.rb
363
- - spec/unit/event_multiple_spec.rb
364
- - spec/unit/event_naming_spec.rb
365
- - spec/unit/event_spec.rb
366
- - spec/unit/event_with_keyword_arguments_spec.rb
367
- - spec/unit/exception_spec.rb
368
- - spec/unit/guard_arguments_check_spec.rb
369
- - spec/unit/guard_multiple_spec.rb
370
- - spec/unit/guard_spec.rb
371
- - spec/unit/guard_with_params_multiple_spec.rb
372
- - spec/unit/guard_with_params_spec.rb
373
- - spec/unit/guard_without_from_specified_spec.rb
374
- - spec/unit/initial_state_multiple_spec.rb
375
- - spec/unit/initial_state_spec.rb
376
- - spec/unit/inspection_multiple_spec.rb
377
- - spec/unit/inspection_spec.rb
378
- - spec/unit/invoker_spec.rb
379
- - spec/unit/invokers/base_invoker_spec.rb
380
- - spec/unit/invokers/class_invoker_spec.rb
381
- - spec/unit/invokers/literal_invoker_spec.rb
382
- - spec/unit/invokers/proc_invoker_spec.rb
383
- - spec/unit/localizer_spec.rb
384
- - spec/unit/memory_leak_spec.rb
385
- - spec/unit/multiple_transitions_that_differ_only_by_guard_spec.rb
386
- - spec/unit/namespaced_multiple_example_spec.rb
387
- - spec/unit/new_dsl_spec.rb
388
- - spec/unit/override_warning_spec.rb
389
- - spec/unit/persistence/active_record_persistence_multiple_spec.rb
390
- - spec/unit/persistence/active_record_persistence_spec.rb
391
- - spec/unit/persistence/dynamoid_persistence_multiple_spec.rb
392
- - spec/unit/persistence/dynamoid_persistence_spec.rb
393
- - spec/unit/persistence/mongoid_persistence_multiple_spec.rb
394
- - spec/unit/persistence/mongoid_persistence_spec.rb
395
- - spec/unit/persistence/no_brainer_persistence_multiple_spec.rb
396
- - spec/unit/persistence/no_brainer_persistence_spec.rb
397
- - spec/unit/persistence/redis_persistence_multiple_spec.rb
398
- - spec/unit/persistence/redis_persistence_spec.rb
399
- - spec/unit/persistence/sequel_persistence_multiple_spec.rb
400
- - spec/unit/persistence/sequel_persistence_spec.rb
401
- - spec/unit/readme_spec.rb
402
- - spec/unit/reloading_spec.rb
403
- - spec/unit/rspec_matcher_spec.rb
404
- - spec/unit/simple_custom_example_spec.rb
405
- - spec/unit/simple_example_spec.rb
406
- - spec/unit/simple_multiple_example_spec.rb
407
- - spec/unit/state_spec.rb
408
- - spec/unit/states_on_one_line_example_spec.rb
409
- - spec/unit/subclassing_multiple_spec.rb
410
- - spec/unit/subclassing_spec.rb
411
- - spec/unit/timestamps_spec.rb
412
- - spec/unit/transition_spec.rb
413
- - test/minitest_helper.rb
414
- - test/unit/minitest_matcher_test.rb
415
198
  homepage: https://github.com/aasm/aasm
416
199
  licenses:
417
200
  - MIT
@@ -435,193 +218,4 @@ rubygems_version: 3.0.3
435
218
  signing_key:
436
219
  specification_version: 4
437
220
  summary: State machine mixin for Ruby objects
438
- test_files:
439
- - spec/database.rb
440
- - spec/database.yml
441
- - spec/en.yml
442
- - spec/generators/active_record_generator_spec.rb
443
- - spec/generators/mongoid_generator_spec.rb
444
- - spec/generators/no_brainer_generator_spec.rb
445
- - spec/localizer_test_model_deprecated_style.yml
446
- - spec/localizer_test_model_new_style.yml
447
- - spec/models/active_record/active_record_callback.rb
448
- - spec/models/active_record/basic_active_record_two_state_machines_example.rb
449
- - spec/models/active_record/complex_active_record_example.rb
450
- - spec/models/active_record/derivate_new_dsl.rb
451
- - spec/models/active_record/false_state.rb
452
- - spec/models/active_record/gate.rb
453
- - spec/models/active_record/instance_level_skip_validation_example.rb
454
- - spec/models/active_record/invalid_persistor.rb
455
- - spec/models/active_record/localizer_test_model.rb
456
- - spec/models/active_record/namespaced.rb
457
- - spec/models/active_record/no_direct_assignment.rb
458
- - spec/models/active_record/no_scope.rb
459
- - spec/models/active_record/persisted_state.rb
460
- - spec/models/active_record/person.rb
461
- - spec/models/active_record/provided_and_persisted_state.rb
462
- - spec/models/active_record/reader.rb
463
- - spec/models/active_record/readme_job.rb
464
- - spec/models/active_record/silent_persistor.rb
465
- - spec/models/active_record/simple_new_dsl.rb
466
- - spec/models/active_record/thief.rb
467
- - spec/models/active_record/timestamp_example.rb
468
- - spec/models/active_record/transactor.rb
469
- - spec/models/active_record/transient.rb
470
- - spec/models/active_record/validator.rb
471
- - spec/models/active_record/with_enum.rb
472
- - spec/models/active_record/with_enum_without_column.rb
473
- - spec/models/active_record/with_false_enum.rb
474
- - spec/models/active_record/with_true_enum.rb
475
- - spec/models/active_record/work.rb
476
- - spec/models/active_record/worker.rb
477
- - spec/models/active_record/writer.rb
478
- - spec/models/basic_two_state_machines_example.rb
479
- - spec/models/callbacks/basic.rb
480
- - spec/models/callbacks/basic_multiple.rb
481
- - spec/models/callbacks/guard_within_block.rb
482
- - spec/models/callbacks/guard_within_block_multiple.rb
483
- - spec/models/callbacks/multiple_transitions_transition_guard.rb
484
- - spec/models/callbacks/multiple_transitions_transition_guard_multiple.rb
485
- - spec/models/callbacks/private_method.rb
486
- - spec/models/callbacks/private_method_multiple.rb
487
- - spec/models/callbacks/with_args.rb
488
- - spec/models/callbacks/with_args_multiple.rb
489
- - spec/models/callbacks/with_state_arg.rb
490
- - spec/models/callbacks/with_state_arg_multiple.rb
491
- - spec/models/complex_example.rb
492
- - spec/models/conversation.rb
493
- - spec/models/default_state.rb
494
- - spec/models/double_definer.rb
495
- - spec/models/dynamoid/complex_dynamoid_example.rb
496
- - spec/models/dynamoid/dynamoid_multiple.rb
497
- - spec/models/dynamoid/dynamoid_simple.rb
498
- - spec/models/event_with_keyword_arguments.rb
499
- - spec/models/foo.rb
500
- - spec/models/foo_callback_multiple.rb
501
- - spec/models/guard_arguments_check.rb
502
- - spec/models/guard_with_params.rb
503
- - spec/models/guard_with_params_multiple.rb
504
- - spec/models/guardian.rb
505
- - spec/models/guardian_multiple.rb
506
- - spec/models/guardian_without_from_specified.rb
507
- - spec/models/initial_state_proc.rb
508
- - spec/models/mongoid/complex_mongoid_example.rb
509
- - spec/models/mongoid/invalid_persistor_mongoid.rb
510
- - spec/models/mongoid/mongoid_relationships.rb
511
- - spec/models/mongoid/no_scope_mongoid.rb
512
- - spec/models/mongoid/silent_persistor_mongoid.rb
513
- - spec/models/mongoid/simple_mongoid.rb
514
- - spec/models/mongoid/simple_new_dsl_mongoid.rb
515
- - spec/models/mongoid/timestamp_example_mongoid.rb
516
- - spec/models/mongoid/validator_mongoid.rb
517
- - spec/models/multi_transitioner.rb
518
- - spec/models/multiple_transitions_that_differ_only_by_guard.rb
519
- - spec/models/namespaced_multiple_example.rb
520
- - spec/models/no_initial_state.rb
521
- - spec/models/nobrainer/complex_no_brainer_example.rb
522
- - spec/models/nobrainer/invalid_persistor_no_brainer.rb
523
- - spec/models/nobrainer/no_scope_no_brainer.rb
524
- - spec/models/nobrainer/nobrainer_relationships.rb
525
- - spec/models/nobrainer/silent_persistor_no_brainer.rb
526
- - spec/models/nobrainer/simple_new_dsl_nobrainer.rb
527
- - spec/models/nobrainer/simple_no_brainer.rb
528
- - spec/models/nobrainer/validator_no_brainer.rb
529
- - spec/models/not_auto_loaded/process.rb
530
- - spec/models/parametrised_event.rb
531
- - spec/models/parametrised_event_multiple.rb
532
- - spec/models/process_with_new_dsl.rb
533
- - spec/models/provided_state.rb
534
- - spec/models/redis/complex_redis_example.rb
535
- - spec/models/redis/redis_multiple.rb
536
- - spec/models/redis/redis_simple.rb
537
- - spec/models/sequel/complex_sequel_example.rb
538
- - spec/models/sequel/invalid_persistor.rb
539
- - spec/models/sequel/sequel_multiple.rb
540
- - spec/models/sequel/sequel_simple.rb
541
- - spec/models/sequel/silent_persistor.rb
542
- - spec/models/sequel/transactor.rb
543
- - spec/models/sequel/validator.rb
544
- - spec/models/sequel/worker.rb
545
- - spec/models/silencer.rb
546
- - spec/models/simple_custom_example.rb
547
- - spec/models/simple_example.rb
548
- - spec/models/simple_example_with_guard_args.rb
549
- - spec/models/simple_multiple_example.rb
550
- - spec/models/state_machine_with_failed_event.rb
551
- - spec/models/states_on_one_line_example.rb
552
- - spec/models/sub_class.rb
553
- - spec/models/sub_class_with_more_states.rb
554
- - spec/models/sub_classing.rb
555
- - spec/models/super_class.rb
556
- - spec/models/this_name_better_not_be_in_use.rb
557
- - spec/models/timestamps_example.rb
558
- - spec/models/timestamps_with_named_machine_example.rb
559
- - spec/models/valid_state_name.rb
560
- - spec/spec_helper.rb
561
- - spec/spec_helpers/active_record.rb
562
- - spec/spec_helpers/dynamoid.rb
563
- - spec/spec_helpers/mongoid.rb
564
- - spec/spec_helpers/nobrainer.rb
565
- - spec/spec_helpers/redis.rb
566
- - spec/spec_helpers/remove_warnings.rb
567
- - spec/spec_helpers/sequel.rb
568
- - spec/unit/abstract_class_spec.rb
569
- - spec/unit/api_spec.rb
570
- - spec/unit/basic_two_state_machines_example_spec.rb
571
- - spec/unit/callback_multiple_spec.rb
572
- - spec/unit/callbacks_spec.rb
573
- - spec/unit/complex_example_spec.rb
574
- - spec/unit/complex_multiple_example_spec.rb
575
- - spec/unit/edge_cases_spec.rb
576
- - spec/unit/event_multiple_spec.rb
577
- - spec/unit/event_naming_spec.rb
578
- - spec/unit/event_spec.rb
579
- - spec/unit/event_with_keyword_arguments_spec.rb
580
- - spec/unit/exception_spec.rb
581
- - spec/unit/guard_arguments_check_spec.rb
582
- - spec/unit/guard_multiple_spec.rb
583
- - spec/unit/guard_spec.rb
584
- - spec/unit/guard_with_params_multiple_spec.rb
585
- - spec/unit/guard_with_params_spec.rb
586
- - spec/unit/guard_without_from_specified_spec.rb
587
- - spec/unit/initial_state_multiple_spec.rb
588
- - spec/unit/initial_state_spec.rb
589
- - spec/unit/inspection_multiple_spec.rb
590
- - spec/unit/inspection_spec.rb
591
- - spec/unit/invoker_spec.rb
592
- - spec/unit/invokers/base_invoker_spec.rb
593
- - spec/unit/invokers/class_invoker_spec.rb
594
- - spec/unit/invokers/literal_invoker_spec.rb
595
- - spec/unit/invokers/proc_invoker_spec.rb
596
- - spec/unit/localizer_spec.rb
597
- - spec/unit/memory_leak_spec.rb
598
- - spec/unit/multiple_transitions_that_differ_only_by_guard_spec.rb
599
- - spec/unit/namespaced_multiple_example_spec.rb
600
- - spec/unit/new_dsl_spec.rb
601
- - spec/unit/override_warning_spec.rb
602
- - spec/unit/persistence/active_record_persistence_multiple_spec.rb
603
- - spec/unit/persistence/active_record_persistence_spec.rb
604
- - spec/unit/persistence/dynamoid_persistence_multiple_spec.rb
605
- - spec/unit/persistence/dynamoid_persistence_spec.rb
606
- - spec/unit/persistence/mongoid_persistence_multiple_spec.rb
607
- - spec/unit/persistence/mongoid_persistence_spec.rb
608
- - spec/unit/persistence/no_brainer_persistence_multiple_spec.rb
609
- - spec/unit/persistence/no_brainer_persistence_spec.rb
610
- - spec/unit/persistence/redis_persistence_multiple_spec.rb
611
- - spec/unit/persistence/redis_persistence_spec.rb
612
- - spec/unit/persistence/sequel_persistence_multiple_spec.rb
613
- - spec/unit/persistence/sequel_persistence_spec.rb
614
- - spec/unit/readme_spec.rb
615
- - spec/unit/reloading_spec.rb
616
- - spec/unit/rspec_matcher_spec.rb
617
- - spec/unit/simple_custom_example_spec.rb
618
- - spec/unit/simple_example_spec.rb
619
- - spec/unit/simple_multiple_example_spec.rb
620
- - spec/unit/state_spec.rb
621
- - spec/unit/states_on_one_line_example_spec.rb
622
- - spec/unit/subclassing_multiple_spec.rb
623
- - spec/unit/subclassing_spec.rb
624
- - spec/unit/timestamps_spec.rb
625
- - spec/unit/transition_spec.rb
626
- - test/minitest_helper.rb
627
- - test/unit/minitest_matcher_test.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
@@ -1,27 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Describe the bug**
11
- A clear and concise description of what the bug is.
12
-
13
- **To Reproduce**
14
- Steps to reproduce the behavior:
15
- 1. Go to '...'
16
- 2. Click on '....'
17
- 3. Scroll down to '....'
18
- 4. See error
19
-
20
- **Expected behavior**
21
- A clear and concise description of what you expected to happen.
22
-
23
- **Screenshots**
24
- If applicable, add screenshots to help explain your problem.
25
-
26
- **Additional context**
27
- Add any other context about the problem here.
@@ -1,20 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Is your feature request related to a problem? Please describe.**
11
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
-
13
- **Describe the solution you'd like**
14
- A clear and concise description of what you want to happen.
15
-
16
- **Describe alternatives you've considered**
17
- A clear and concise description of any alternative solutions or features you've considered.
18
-
19
- **Additional context**
20
- Add any other context or screenshots about the feature request here.
@@ -1,100 +0,0 @@
1
- name: Tests
2
-
3
- on:
4
- push:
5
- pull_request:
6
-
7
- jobs:
8
- build:
9
- if: "contains(github.event.commits[0].message, '[ci skip]') == false"
10
- continue-on-error: ${{ matrix.allow_failure || false }}
11
- strategy:
12
- fail-fast: false
13
- matrix:
14
- os: [ubuntu-20.04]
15
- ruby: ['3.0', 2.7, 2.6, jruby-9.1.17.0, truffleruby]
16
- gemfile: [norails, rails_4.2, rails_4.2_mongoid_5, rails_5.2, rails_6.1]
17
- redis-version: [6]
18
- mongodb-version: [5]
19
- include:
20
- - ruby: '3.0'
21
- gemfile: rails_6.1
22
- os: ubuntu-20.04
23
- redis-version: 6
24
- mongodb-version: 5
25
- - ruby: 3.1
26
- gemfile: rails_7.0
27
- os: ubuntu-20.04
28
- redis-version: 6
29
- mongodb-version: 5
30
- exclude:
31
- - ruby: '3.0'
32
- gemfile: rails_5.2
33
- - ruby: '3.0'
34
- gemfile: rails_4.2
35
- - ruby: '3.0'
36
- gemfile: rails_4.2_mongoid_5
37
- - ruby: 2.7
38
- gemfile: rails_5.2
39
- - ruby: 2.7
40
- gemfile: rails_4.2
41
- - ruby: 2.7
42
- gemfile: rails_4.2_mongoid_5
43
- - ruby: 2.6
44
- gemfile: rails_4.2_mongoid_5
45
- - ruby: 2.6
46
- gemfile: rails_4.2
47
- - ruby: jruby-9.1.17.0
48
- gemfile: norails
49
- - ruby: jruby-9.1.17.0
50
- gemfile: rails_5.2
51
- - ruby: jruby-9.1.17.0
52
- gemfile: rails_6.1
53
- - ruby: truffleruby
54
- gemfile: rails_4.2
55
- - ruby: truffleruby
56
- gemfile: rails_4.2_mongoid_5
57
- - ruby: truffleruby
58
- gemfile: rails_5.2
59
- allow_failures:
60
- - false
61
- env:
62
- BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
63
- ALLOW_FAILURES: "${{ matrix.allow_failures }}"
64
- runs-on: ${{ matrix.os }}
65
-
66
- steps:
67
- - uses: actions/checkout@v2
68
- - name: Install dependencies
69
- run: |
70
- mkdir /tmp/dynamodb
71
- wget -O - https://s3-ap-southeast-1.amazonaws.com/dynamodb-local-singapore/dynamodb_local_latest.tar.gz | tar xz --directory /tmp/dynamodb
72
- java -Djava.library.path=/tmp/dynamodb/DynamoDBLocal_lib -jar /tmp/dynamodb/DynamoDBLocal.jar -inMemory -delayTransientStatuses -port 30180 &
73
- mongod --version
74
- - uses: ruby/setup-ruby@v1
75
- with:
76
- ruby-version: ${{ matrix.ruby }}
77
- bundler-cache: true
78
- - name: Setup project
79
- run: bundle install
80
- - name: Start Redis
81
- uses: supercharge/redis-github-action@1.2.0
82
- with:
83
- redis-version: ${{ matrix.redis-version }}
84
- - name: Start MongoDB
85
- uses: supercharge/mongodb-github-action@1.6.0
86
- with:
87
- mongodb-version: ${{ matrix.mongodb-version }}
88
- # - name: Setup DynamoDB Local
89
- # uses: rrainn/dynamodb-action@v2.0.0
90
- # with:
91
- # port: 8000
92
- # cors: '*'
93
- - name: Run specs
94
- run: bundle exec rspec spec
95
- - name: Run test
96
- run: bundle exec rake test
97
- - name: Upload coverage to Codecov
98
- uses: codecov/codecov-action@v2
99
- with:
100
- fail_ci_if_error: false
data/.gitignore DELETED
@@ -1,20 +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
20
- tmp