branston 0.3.6 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/branston/app/controllers/scenarios_controller.rb +6 -5
- data/lib/branston/app/controllers/stories_controller.rb +101 -89
- data/lib/branston/app/models/story.rb +30 -1
- data/lib/branston/app/models/user.rb +4 -0
- data/lib/branston/app/views/iterations/index.html.erb +1 -1
- data/lib/branston/app/views/layouts/_header.html.erb +1 -2
- data/lib/branston/app/views/scenarios/_scenario.html.erb +6 -3
- data/lib/branston/app/views/scenarios/_scenarios.html.erb +4 -2
- data/lib/branston/app/views/stories/_form.html.erb +15 -4
- data/lib/branston/app/views/stories/_story.html.erb +26 -6
- data/lib/branston/app/views/stories/edit.html.erb +3 -3
- data/lib/branston/app/views/stories/index.html.erb +22 -3
- data/lib/branston/app/views/stories/new.html.erb +2 -2
- data/lib/branston/app/views/stories/show.html.erb +3 -3
- data/lib/branston/config/routes.rb +7 -4
- data/lib/branston/coverage/app-controllers-application_controller_rb.html +1 -1
- data/lib/branston/coverage/app-controllers-iterations_controller_rb.html +1 -1
- data/lib/branston/coverage/app-controllers-outcomes_controller_rb.html +1 -1
- data/lib/branston/coverage/app-controllers-preconditions_controller_rb.html +1 -1
- data/lib/branston/coverage/app-controllers-releases_controller_rb.html +1 -1
- data/lib/branston/coverage/app-controllers-scenarios_controller_rb.html +18 -12
- data/lib/branston/coverage/app-controllers-sessions_controller_rb.html +1 -1
- data/lib/branston/coverage/app-controllers-stories_controller_rb.html +193 -121
- data/lib/branston/coverage/app-controllers-user_roles_controller_rb.html +1 -1
- data/lib/branston/coverage/app-controllers-users_controller_rb.html +1 -1
- data/lib/branston/coverage/app-helpers-application_helper_rb.html +1 -1
- data/lib/branston/coverage/app-helpers-iterations_helper_rb.html +1 -1
- data/lib/branston/coverage/app-helpers-outcomes_helper_rb.html +1 -1
- data/lib/branston/coverage/app-helpers-preconditions_helper_rb.html +1 -1
- data/lib/branston/coverage/app-helpers-releases_helper_rb.html +1 -1
- data/lib/branston/coverage/app-helpers-sessions_helper_rb.html +1 -1
- data/lib/branston/coverage/app-helpers-stories_helper_rb.html +1 -1
- data/lib/branston/coverage/app-helpers-user_roles_helper_rb.html +1 -1
- data/lib/branston/coverage/app-models-iteration_rb.html +1 -1
- data/lib/branston/coverage/app-models-outcome_rb.html +1 -1
- data/lib/branston/coverage/app-models-participation_rb.html +1 -1
- data/lib/branston/coverage/app-models-precondition_rb.html +1 -1
- data/lib/branston/coverage/app-models-release_rb.html +1 -1
- data/lib/branston/coverage/app-models-scenario_rb.html +1 -1
- data/lib/branston/coverage/app-models-story_rb.html +192 -18
- data/lib/branston/coverage/app-models-user_rb.html +33 -9
- data/lib/branston/coverage/app-models-user_role_rb.html +1 -1
- data/lib/branston/coverage/index.html +13 -13
- data/lib/branston/coverage/lib-client_rb.html +1 -1
- data/lib/branston/coverage/lib-faker_extras_rb.html +1 -1
- data/lib/branston/coverage/lib-story_generator_rb.html +1 -1
- data/lib/branston/db/development.sqlite3 +0 -0
- data/lib/branston/db/migrate/20091223100903_add_status_to_story.rb +11 -0
- data/lib/branston/db/pristine.sqlite3 +0 -0
- data/lib/branston/db/schema.rb +5 -3
- data/lib/branston/db/test.sqlite3 +0 -0
- data/lib/branston/lib/branston.rb +4 -2
- data/lib/branston/log/development.log +4970 -0
- data/lib/branston/log/test.log +88225 -0
- data/lib/branston/test/blueprints.rb +10 -7
- data/lib/branston/test/functional/scenarios_controller_test.rb +22 -15
- data/lib/branston/test/functional/stories_controller_test.rb +51 -30
- data/lib/branston/test/unit/story_test.rb +47 -7
- data/lib/branston/test/unit/user_test.rb +4 -0
- data/lib/branston/tmp/performance/BrowsingTest#test_homepage_process_time_flat.txt +3 -2
- data/lib/branston/tmp/performance/BrowsingTest#test_homepage_process_time_graph.html +2041 -1307
- data/lib/branston/tmp/performance/BrowsingTest#test_homepage_process_time_tree.txt +7922 -7922
- data/lib/branston/vendor/plugins/state_machine/CHANGELOG.rdoc +298 -0
- data/lib/branston/vendor/plugins/state_machine/LICENSE +20 -0
- data/lib/branston/vendor/plugins/state_machine/README.rdoc +466 -0
- data/lib/branston/vendor/plugins/state_machine/Rakefile +98 -0
- data/lib/branston/vendor/plugins/state_machine/examples/AutoShop_state.png +0 -0
- data/lib/branston/vendor/plugins/state_machine/examples/Car_state.png +0 -0
- data/lib/branston/vendor/plugins/state_machine/examples/TrafficLight_state.png +0 -0
- data/lib/branston/vendor/plugins/state_machine/examples/Vehicle_state.png +0 -0
- data/lib/branston/vendor/plugins/state_machine/examples/auto_shop.rb +11 -0
- data/lib/branston/vendor/plugins/state_machine/examples/car.rb +19 -0
- data/lib/branston/vendor/plugins/state_machine/examples/merb-rest/controller.rb +51 -0
- data/lib/branston/vendor/plugins/state_machine/examples/merb-rest/model.rb +28 -0
- data/lib/branston/vendor/plugins/state_machine/examples/merb-rest/view_edit.html.erb +24 -0
- data/lib/branston/vendor/plugins/state_machine/examples/merb-rest/view_index.html.erb +23 -0
- data/lib/branston/vendor/plugins/state_machine/examples/merb-rest/view_new.html.erb +13 -0
- data/lib/branston/vendor/plugins/state_machine/examples/merb-rest/view_show.html.erb +17 -0
- data/lib/branston/vendor/plugins/state_machine/examples/rails-rest/controller.rb +43 -0
- data/lib/branston/vendor/plugins/state_machine/examples/rails-rest/migration.rb +11 -0
- data/lib/branston/vendor/plugins/state_machine/examples/rails-rest/model.rb +23 -0
- data/lib/branston/vendor/plugins/state_machine/examples/rails-rest/view_edit.html.erb +25 -0
- data/lib/branston/vendor/plugins/state_machine/examples/rails-rest/view_index.html.erb +23 -0
- data/lib/branston/vendor/plugins/state_machine/examples/rails-rest/view_new.html.erb +14 -0
- data/lib/branston/vendor/plugins/state_machine/examples/rails-rest/view_show.html.erb +17 -0
- data/lib/branston/vendor/plugins/state_machine/examples/traffic_light.rb +7 -0
- data/lib/branston/vendor/plugins/state_machine/examples/vehicle.rb +31 -0
- data/lib/branston/vendor/plugins/state_machine/init.rb +1 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/assertions.rb +36 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/callback.rb +189 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/condition_proxy.rb +94 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/eval_helpers.rb +67 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/event.rb +252 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/event_collection.rb +122 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/extensions.rb +149 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/guard.rb +230 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/integrations/active_record/locale.rb +11 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/integrations/active_record/observer.rb +41 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/integrations/active_record.rb +492 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/integrations/data_mapper/observer.rb +139 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/integrations/data_mapper.rb +351 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/integrations/sequel.rb +322 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/integrations.rb +68 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/machine.rb +1467 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/machine_collection.rb +155 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/matcher.rb +123 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/matcher_helpers.rb +54 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/node_collection.rb +152 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/state.rb +249 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/state_collection.rb +112 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine/transition.rb +394 -0
- data/lib/branston/vendor/plugins/state_machine/lib/state_machine.rb +388 -0
- data/lib/branston/vendor/plugins/state_machine/state_machine.gemspec +30 -0
- data/lib/branston/vendor/plugins/state_machine/tasks/state_machine.rake +1 -0
- data/lib/branston/vendor/plugins/state_machine/tasks/state_machine.rb +30 -0
- data/lib/branston/vendor/plugins/state_machine/test/classes/switch.rb +11 -0
- data/lib/branston/vendor/plugins/state_machine/test/functional/state_machine_test.rb +941 -0
- data/lib/branston/vendor/plugins/state_machine/test/test_helper.rb +4 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/assertions_test.rb +40 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/callback_test.rb +455 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/condition_proxy_test.rb +328 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/eval_helpers_test.rb +120 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/event_collection_test.rb +326 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/event_test.rb +743 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/guard_test.rb +908 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/integrations/active_record_test.rb +1367 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/integrations/data_mapper_test.rb +962 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/integrations/sequel_test.rb +859 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/integrations_test.rb +42 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/invalid_event_test.rb +7 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/invalid_transition_test.rb +7 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/machine_collection_test.rb +938 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/machine_test.rb +2004 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/matcher_helpers_test.rb +37 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/matcher_test.rb +155 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/node_collection_test.rb +207 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/state_collection_test.rb +280 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/state_machine_test.rb +31 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/state_test.rb +795 -0
- data/lib/branston/vendor/plugins/state_machine/test/unit/transition_test.rb +1212 -0
- metadata +81 -2
@@ -0,0 +1,298 @@
|
|
1
|
+
== master
|
2
|
+
|
3
|
+
* Add support for ActiveRecord 2.0.*
|
4
|
+
* Fix nil states being overwritten when they're explicitly set in ORM integrations
|
5
|
+
* Fix default states not getting set in ORM integrations if the column has a default
|
6
|
+
* Fix event transitions being kept around while running actions/callbacks, sometimes preventing object marshalling
|
7
|
+
|
8
|
+
== 0.8.0 / 2009-08-15
|
9
|
+
|
10
|
+
* Add support for DataMapper 0.10.0
|
11
|
+
* Always interpet nil return values from actions as failed attempts
|
12
|
+
* Fix loopbacks not causing records to save in ORM integrations if no other fields were changed
|
13
|
+
* Fix events not failing with useful errors when an object's state is invalid
|
14
|
+
* Use more friendly NoMethodError messages for state-driven behaviors
|
15
|
+
* Fix before_transition callbacks getting run twice when using event attributes in ORM integrations
|
16
|
+
* Add the ability to query for the availability of specific transitions on an object
|
17
|
+
* Allow after_transition callbacks to be explicitly run on failed attempts
|
18
|
+
* By default, don't run after_transition callbacks on failed attempts
|
19
|
+
* Fix not allowing multiple methods to be specified as arguments in callbacks
|
20
|
+
* Fix initial states being set when loading records from the database in Sequel integration
|
21
|
+
* Allow static initial states to be set earlier in the initialization of an object
|
22
|
+
* Use friendly validation errors for nil states
|
23
|
+
* Fix states not being validated properly when using custom names in ActiveRecord / DataMapper integrations
|
24
|
+
|
25
|
+
== 0.7.6 / 2009-06-17
|
26
|
+
|
27
|
+
* Allow multiple state machines on the same class to target the same attribute
|
28
|
+
* Add support for :attribute to customize the attribute target, assuming the name is the first argument of #state_machine
|
29
|
+
* Simplify reading from / writing to machine-related attributes on objects
|
30
|
+
* Fix locale for ActiveRecord getting added to the i18n load path multiple times [Reiner Dieterich]
|
31
|
+
* Fix callbacks, guards, and state-driven behaviors not always working on tainted classes [Brandon Dimcheff]
|
32
|
+
* Use Ruby 1.9's built-in Object#instance_exec for bound callbacks when it's available
|
33
|
+
* Improve performance of cached dynamic state lookups by 25%
|
34
|
+
|
35
|
+
== 0.7.5 / 2009-05-25
|
36
|
+
|
37
|
+
* Add built-in caching for dynamic state values when the value only needs to be generated once
|
38
|
+
* Fix flawed example for using record ids as state values
|
39
|
+
* Don't evaluate state values until they're actually used in an object instance
|
40
|
+
* Make it easier to use event attributes for actions defined in the same class as the state machine
|
41
|
+
* Fix #save/save! running transitions in ActiveRecord integrations even when a machine's action is not :save
|
42
|
+
|
43
|
+
== 0.7.4 / 2009-05-23
|
44
|
+
|
45
|
+
* Fix #save! not firing event attributes properly in ActiveRecord integrations
|
46
|
+
* Fix log files being included in gems
|
47
|
+
|
48
|
+
== 0.7.3 / 2009-04-25
|
49
|
+
|
50
|
+
* Require DataMapper version be >= 0.9.4
|
51
|
+
* Explicitly load Sequel's built-in inflector (>= 2.12.0) for scope names
|
52
|
+
* Don't use qualified name for event attributes
|
53
|
+
* Fix #valid? being defined for DataMapper resources when dm-validations isn't loaded
|
54
|
+
* Add auto-validation of values allowed for the state attribute in ORM integrations
|
55
|
+
|
56
|
+
== 0.7.2 / 2009-04-08
|
57
|
+
|
58
|
+
* Add support for running multiple methods in a callback without using blocks
|
59
|
+
* Add more flexibility around how callbacks are defined
|
60
|
+
* Add security documentation around mass-assignment in ORM integrations
|
61
|
+
* Fix event attribute transitions being publicly accessible
|
62
|
+
|
63
|
+
== 0.7.1 / 2009-04-05
|
64
|
+
|
65
|
+
* Fix machines failing to generate graphs when run from Merb tasks
|
66
|
+
|
67
|
+
== 0.7.0 / 2009-04-04
|
68
|
+
|
69
|
+
* Add #{attribute}_event for automatically firing events when the object's action is called
|
70
|
+
* Make it easier to override state-driven behaviors
|
71
|
+
* Rollback state changes when the action fails during transitions
|
72
|
+
* Use :messages instead of :invalid_message for customizing validation errors
|
73
|
+
* Use more human-readable validation errors
|
74
|
+
* Add support for more ActiveRecord observer hooks
|
75
|
+
* Add support for targeting multiple specific state machines in DataMapper observer hooks
|
76
|
+
* Don't pass the result of the action as an argument to callbacks (access via Transition#result)
|
77
|
+
* Fix incorrect results being used when running transitions in parallel
|
78
|
+
* Fix transition args not being set when run in parallel
|
79
|
+
* Allow callback terminators to be set on an application-wide basis
|
80
|
+
* Only catch :halt during before / after transition callbacks
|
81
|
+
* Fix ActiveRecord predicates being overwritten if they're already defined in the class
|
82
|
+
* Allow machine options to be set on an integration-wide basis
|
83
|
+
* Turn transactions off by default in DataMapper integrations
|
84
|
+
* Add support for configuring the use of transactions
|
85
|
+
* Simplify reading/writing of attributes
|
86
|
+
* Simplify access to state machines via #state_machine(:attribute) without generating dupes
|
87
|
+
* Fix assumptions that dm-validations is always available in DataMapper integration
|
88
|
+
* Automatically define DataMapper properties for machine attributes if they don't exist
|
89
|
+
* Add Transition#qualified_event, #qualified_from_name, and #qualified_to_name
|
90
|
+
* Add #fire_events / #fire_events! for running events on multiple state machines in parallel
|
91
|
+
* Rename next_#{event}_transition to #{event}_transition
|
92
|
+
* Add #{attribute}_transitions for getting the list of transitions that can be run on an object
|
93
|
+
* Add #{attribute}_events for getting the list of events that can be fired on an object
|
94
|
+
* Use generated non-bang event when running bang version so that overriding one affects the other
|
95
|
+
* Provide access to arguments passed into an event from transition callbacks via Transition#args
|
96
|
+
|
97
|
+
== 0.6.3 / 2009-03-10
|
98
|
+
|
99
|
+
* Add support for customizing the graph's orientation
|
100
|
+
* Use the standard visualizations for initial (open arrow) and final (double circle) states
|
101
|
+
* Highlight final states in GraphViz drawings
|
102
|
+
|
103
|
+
== 0.6.2 / 2009-03-08
|
104
|
+
|
105
|
+
* Make it easier to override generated instance / class methods
|
106
|
+
|
107
|
+
== 0.6.1 / 2009-03-07
|
108
|
+
|
109
|
+
* Add i18n support for ActiveRecord validation errors
|
110
|
+
* Add a validation error when failing to transition for ActiveRecord / DataMapper / Sequel integrations
|
111
|
+
|
112
|
+
== 0.6.0 / 2009-03-03
|
113
|
+
|
114
|
+
* Allow multiple conditions for callbacks / class behaviors
|
115
|
+
* Add support for state-driven class behavior with :if/:unless options
|
116
|
+
* Alias Machine#event as Machine#on
|
117
|
+
* Fix nil from/to states not being handled properly
|
118
|
+
* Simplify hooking callbacks into loopbacks
|
119
|
+
* Add simplified transition/callback requirement syntax
|
120
|
+
|
121
|
+
== 0.5.2 / 2009-02-17
|
122
|
+
|
123
|
+
* Improve pretty-print of events
|
124
|
+
* Simplify state/event matching design, improving guard performance by 30%
|
125
|
+
* Add better error notification when conflicting guard options are defined
|
126
|
+
* Fix scope name pluralization not being applied correctly
|
127
|
+
|
128
|
+
== 0.5.1 / 2009-02-11
|
129
|
+
|
130
|
+
* Allow states to be drawn as ellipses to accommodate long names
|
131
|
+
* Fix rake tasks not being registered in Rails/Merb applications
|
132
|
+
* Never automatically define machine attribute accessors when using an integration
|
133
|
+
|
134
|
+
== 0.5.0 / 2009-01-11
|
135
|
+
|
136
|
+
* Add to_name and from_name to transition objects
|
137
|
+
* Add nicely formatted #inspect for transitions
|
138
|
+
* Fix ActiveRecord integrations failing when the database doesn't exist yet
|
139
|
+
* Fix states not being drawn in GraphViz graphs in the correct order
|
140
|
+
* Add nicely formatted #inspect for states and events
|
141
|
+
* Simplify machine context-switching
|
142
|
+
* Store events/states in enumerable node collections
|
143
|
+
* No longer allow subclasses to change the integration
|
144
|
+
* Move fire! action logic into the Event class (no longer calls fire action on the object)
|
145
|
+
* Allow states in subclasses to have different values
|
146
|
+
* Recommend that all states be referenced as symbols instead of strings
|
147
|
+
* All states must now be named (and can be associated with other value types)
|
148
|
+
* Add support for customizing the actual stored value for a state
|
149
|
+
* Add compatibility with Ruby 1.9+
|
150
|
+
|
151
|
+
== 0.4.3 / 2008-12-28
|
152
|
+
|
153
|
+
* Allow dm-observer integration to be optional
|
154
|
+
* Fix non-lambda callbacks not working for DataMapper/Sequel
|
155
|
+
|
156
|
+
== 0.4.2 / 2008-12-28
|
157
|
+
|
158
|
+
* Fix graphs not being drawn the same way consistently
|
159
|
+
* Add support for sharing transitions across multiple events
|
160
|
+
* Add support for state-driven behavior
|
161
|
+
* Simplify initialize hooks, requiring super to be called instead
|
162
|
+
* Add :namespace option for generated state predicates / event methods
|
163
|
+
|
164
|
+
== 0.4.1 / 2008-12-16
|
165
|
+
|
166
|
+
* Fix nil states not being handled properly in guards, known states, or visualizations
|
167
|
+
* Fix the same node being used for different dynamic states in GraphViz output
|
168
|
+
* Always include initial state in the list of known states even if it's dynamic
|
169
|
+
* Use consistent naming scheme for dynamic states in GraphViz output
|
170
|
+
* Allow blocks to be directly passed into machine class
|
171
|
+
* Fix attribute predicates not working on attributes that represent columns in ActiveRecord
|
172
|
+
|
173
|
+
== 0.4.0 / 2008-12-14
|
174
|
+
|
175
|
+
* Remove the PluginAWeek namespace
|
176
|
+
* Add generic attribute predicate (e.g. "#{attribute}?(state_name)") and state predicates (e.g. "#{state}?")
|
177
|
+
* Add Sequel support
|
178
|
+
* Fix aliasing :initialize on ActiveRecord models causing warnings when the environment is reloaded
|
179
|
+
* Fix ActiveRecord state machines trying to query the database on unmigrated models
|
180
|
+
* Fix initial states not getting set when the current value is an empty string [Aaron Gibralter]
|
181
|
+
* Add rake tasks for generating graphviz files for state machines [Nate Murray]
|
182
|
+
* Fix initial state not being included in list of known states
|
183
|
+
* Add other_states directive for defining additional states not referenced in transitions or callbacks [Pete Forde]
|
184
|
+
* Add next_#{event}_transition for getting the next transition that would be performed if the event were invoked
|
185
|
+
* Add the ability to override the pluralized name of an attribute for creating scopes
|
186
|
+
* Add the ability to halt callback chains by: throw :halt
|
187
|
+
* Add support for dynamic to states in transitions (e.g. :to => lambda {Time.now})
|
188
|
+
* Add support for using real blocks in before_transition/after_transition calls instead of using the :do option
|
189
|
+
* Add DataMapper support
|
190
|
+
* Include states referenced in transition callbacks in the list of a machine's known states
|
191
|
+
* Only generate the known states for a machine on demand, rather than calculating beforehand
|
192
|
+
* Add the ability to skip state change actions during a transition (e.g. vehicle.ignite(false))
|
193
|
+
* Add the ability for the state change action (e.g. +save+ for ActiveRecord) to be configurable
|
194
|
+
* Allow state machines to be defined on *any* Ruby class, not just ActiveRecord (removes all external dependencies)
|
195
|
+
* Refactor transitions, guards, and callbacks for better organization/design
|
196
|
+
* Use a class containing the transition context in callbacks, rather than an ordered list of each individual attribute
|
197
|
+
* Add without_#{attribute} named scopes (opposite of the existing with_#{attribute} named scopes) [Sean O'Brien]
|
198
|
+
|
199
|
+
== 0.3.1 / 2008-10-26
|
200
|
+
|
201
|
+
* Fix the initial state not getting set when the state attribute is mass-assigned but protected
|
202
|
+
* Change how the base module is included to prevent namespacing conflicts
|
203
|
+
|
204
|
+
== 0.3.0 / 2008-09-07
|
205
|
+
|
206
|
+
* No longer allow additional arguments to be passed into event actions
|
207
|
+
* Add support for can_#{event}? for checking whether an event can be fired based on the current state of the record
|
208
|
+
* Don't use callbacks for performing transitions
|
209
|
+
* Fix state machines in subclasses not knowing what states/events/transitions were defined by superclasses
|
210
|
+
* Replace all before/after_exit/enter/loopback callback hooks and :before/:after options for events with before_transition/after_transition callbacks, e.g.
|
211
|
+
|
212
|
+
before_transition :from => 'parked', :do => :lock_doors # was before_exit :parked, :lock_doors
|
213
|
+
after_transition :on => 'ignite', :do => :turn_on_radio # was event :ignite, :after => :turn_on_radio do
|
214
|
+
|
215
|
+
* Always save when an event is fired even if it results in a loopback [Jürgen Strobel]
|
216
|
+
* Ensure initial state callbacks are invoked in the proper order when an event is fired on a new record
|
217
|
+
* Add before_loopback and after_loopback hooks [Jürgen Strobel]
|
218
|
+
|
219
|
+
== 0.2.1 / 2008-07-05
|
220
|
+
|
221
|
+
* Add more descriptive exceptions
|
222
|
+
* Assume the default state attribute is "state" if one is not provided
|
223
|
+
* Add :except_from option for transitions if you want to blacklist states
|
224
|
+
* Add PluginAWeek::StateMachine::Machine#states
|
225
|
+
* Add PluginAWeek::StateMachine::Event#transitions
|
226
|
+
* Allow creating transitions with no from state (effectively allowing the transition for *any* from state)
|
227
|
+
* Reduce the number of objects created for each transition
|
228
|
+
|
229
|
+
== 0.2.0 / 2008-06-29
|
230
|
+
|
231
|
+
* Add a non-bang version of events (e.g. park) that will return a boolean value for success
|
232
|
+
* Raise an exception if the bang version of events are used (e.g. park!) and no transition is successful
|
233
|
+
* Change callbacks to act a little more like ActiveRecord
|
234
|
+
* Avoid using string evaluation for dynamic methods
|
235
|
+
|
236
|
+
== 0.1.1 / 2008-06-22
|
237
|
+
|
238
|
+
* Remove log files from gems
|
239
|
+
|
240
|
+
== 0.1.0 / 2008-05-05
|
241
|
+
|
242
|
+
* Completely rewritten from scratch
|
243
|
+
* Renamed to state_machine
|
244
|
+
* Removed database dependencies
|
245
|
+
* Removed models in favor of an attribute-agnostic design
|
246
|
+
* Use ActiveSupport::Callbacks instead of eval_call
|
247
|
+
* Remove dry_transaction_rollbacks dependencies
|
248
|
+
* Added functional tests
|
249
|
+
* Updated documentation
|
250
|
+
|
251
|
+
== 0.0.1 / 2007-09-26
|
252
|
+
|
253
|
+
* Add dependency on custom_callbacks
|
254
|
+
* Move test fixtures out of the test application root directory
|
255
|
+
* Improve documentation
|
256
|
+
* Remove the StateExtension module in favor of adding singleton methods to the stateful class
|
257
|
+
* Convert dos newlines to unix newlines
|
258
|
+
* Fix error message when a given event can't be found in the database
|
259
|
+
* Add before_#{action} and #{action} callbacks when an event is performed
|
260
|
+
* All state and event callbacks can now explicitly return false in order to cancel the action
|
261
|
+
* Refactor ActiveState callback creation
|
262
|
+
* Refactor unit tests so that they use mock classes instead of themselves
|
263
|
+
* Allow force_reload option to be set in the state association
|
264
|
+
* Don't save the entire model when updating the state_id
|
265
|
+
* Raise exception if a class tries to define a state more than once
|
266
|
+
* Add tests for PluginAWeek::Has::States::ActiveState
|
267
|
+
* Refactor active state/active event creation
|
268
|
+
* Fix owner_type not being set correctly in active states/events of subclasses
|
269
|
+
* Allow subclasses to override the initial state
|
270
|
+
* Fix problem with migrations using default null when column cannot be null
|
271
|
+
* Moved deadline support into a separate plugin (has_state_deadlines).
|
272
|
+
* Added many more unit tests.
|
273
|
+
* Simplified many of the interfaces for maintainability.
|
274
|
+
* Added support for turning off recording state changes.
|
275
|
+
* Removed the short_description and long_description columns, in favor of an optional human_name column.
|
276
|
+
* Fixed not overriding the correct equality methods in the StateTransition class.
|
277
|
+
* Added to_sym to State and Event.
|
278
|
+
* State#name and Event#name now return the string version of the name instead of the symbol version.
|
279
|
+
* 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.
|
280
|
+
* Updated manual rollbacks to use the new Rails edge api (ActiveRecord::Rollback exception).
|
281
|
+
* Moved StateExtension class into a separate file in order to help keep the has_state files clean.
|
282
|
+
* Renamed InvalidState and InvalidEvent exceptions to StateNotFound and EventNotFound in order to follow the ActiveRecord convention (i.e. RecordNotFound).
|
283
|
+
* Added StateNotActive and EventNotActive exceptions to help differentiate between states which don't exist and states which weren't defined in the class.
|
284
|
+
* Added support for defining callbacks like so:
|
285
|
+
|
286
|
+
def before_exit_parked
|
287
|
+
end
|
288
|
+
|
289
|
+
def after_enter_idling
|
290
|
+
end
|
291
|
+
|
292
|
+
* Added support for defining callbacks using class methods:
|
293
|
+
|
294
|
+
before_exit_parked :fasten_seatbelt
|
295
|
+
|
296
|
+
* Added event callbacks after the transition has occurred (e.g. after_park)
|
297
|
+
* State callbacks no longer receive any of the arguments that were provided in the event action
|
298
|
+
* Updated license to include our names.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2006-2009 Aaron Pfefier
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|