public
Description: Adds support for creating state machines for attributes on any Ruby class
Homepage: http://www.pluginaweek.org
Clone URL: git://github.com/pluginaweek/state_machine.git
state_machine / CHANGELOG
100644 102 lines (52 sloc) 3.112 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
*SVN*
 
*0.1.0* (May 5th, 2008)
 
* Completely rewritten from scratch
 
* Renamed to state_machine
 
* Removed database dependencies
 
* Removed models in favor of an attribute-agnostic design
 
* Use ActiveSupport::Callbacks instead of eval_call
 
* Remove dry_transaction_rollbacks dependencies
 
* Added functional tests
 
* Updated documentation
 
*0.0.1* (September 26th, 2007)
 
* Add dependency on custom_callbacks
 
* Move test fixtures out of the test application root directory
 
* Improve documentation
 
* Remove the StateExtension module in favor of adding singleton methods to the stateful class
 
* Convert dos newlines to unix newlines
 
* Fix error message when a given event can't be found in the database
 
* Add before_#{action} and #{action} callbacks when an event is performed
 
* All state and event callbacks can now explicitly return false in order to cancel the action
 
* Refactor ActiveState callback creation
 
* Refactor unit tests so that they use mock classes instead of themselves
 
* Allow force_reload option to be set in the state association
 
* Don't save the entire model when updating the state_id
 
* Raise exception if a class tries to define a state more than once
 
* Add tests for PluginAWeek::Has::States::ActiveState
 
* Refactor active state/active event creation
 
* Fix owner_type not being set correctly in active states/events of subclasses
 
* Allow subclasses to override the initial state
 
* Fix problem with migrations using default null when column cannot be null
 
* Moved deadline support into a separate plugin (has_state_deadlines).
 
* Added many more unit tests.
 
* Simplified many of the interfaces for maintainability.
 
* Added support for turning off recording state changes.
 
* Removed the short_description and long_description columns, in favor of an optional human_name column.
 
* Fixed not overriding the correct equality methods in the StateTransition class.
 
* Added to_sym to State and Event.
 
* State#name and Event#name now return the string version of the name instead of the symbol version.
 
* Added State#human_name and Event#human_name to automatically figure out what the human name is if it isn't specified in the table.
 
* Updated manual rollbacks to use the new Rails edge api (ActiveRecord::Rollback exception).
 
* Moved StateExtension class into a separate file in order to help keep the has_state files clean.
 
* Renamed InvalidState and InvalidEvent exceptions to StateNotFound and EventNotFound in order to follow the ActiveRecord convention (i.e. RecordNotFound).
 
* Added StateNotActive and EventNotActive exceptions to help differentiate between states which don't exist and states which weren't defined in the class.
 
* Added support for defining callbacks like so:
 
  def before_exit_parked
  end
  
  def after_enter_idling
  end
 
* Added support for defining callbacks using class methods:
 
  before_exit_parked :fasten_seatbelt
 
* Added event callbacks after the transition has occurred (e.g. after_park)
 
* State callbacks no longer receive any of the arguments that were provided in the event action
 
* Updated license to include our names.