All Versions
45
Latest Version
Avg Release Cycle
62 days
Latest Release
3828 days ago
Changelog History
Page 4
Changelog History
Page 4
-
v0.6.0 Changes
March 03, 2009- π Allow multiple conditions for callbacks / class behaviors
- β Add support for state-driven class behavior with :if/:unless options
- Alias Machine#event as Machine#on
- π Fix nil from/to states not being handled properly
- Simplify hooking callbacks into loopbacks
- β Add simplified transition/callback requirement syntax
-
v0.5.2 Changes
February 17, 2009- π Improve pretty-print of events
- π Simplify state/event matching design, improving guard performance by 30%
- β Add better error notification when conflicting guard options are defined
- π Fix scope name pluralization not being applied correctly
-
v0.5.1 Changes
February 11, 2009- π Allow states to be drawn as ellipses to accommodate long names
- π Fix rake tasks not being registered in Rails/Merb applications
- Never automatically define machine attribute accessors when using an integration
-
v0.5.0 Changes
January 11, 2009- Add to_name and from_name to transition objects
- β Add nicely formatted #inspect for transitions
- π Fix ActiveRecord integrations failing when the database doesn't exist yet
- π Fix states not being drawn in GraphViz graphs in the correct order
- β Add nicely formatted #inspect for states and events
- Simplify machine context-switching
- Store events/states in enumerable node collections
- No longer allow subclasses to change the integration
- π Move fire! action logic into the Event class (no longer calls fire action on the object)
- π Allow states in subclasses to have different values
- Recommend that all states be referenced as symbols instead of strings
- All states must now be named (and can be associated with other value types)
- β Add support for customizing the actual stored value for a state
- β Add compatibility with Ruby 1.9+
-
v0.4.3 Changes
December 28, 2008- π Allow dm-observer integration to be optional
- π Fix non-lambda callbacks not working for DataMapper/Sequel
-
v0.4.2 Changes
December 28, 2008- π Fix graphs not being drawn the same way consistently
- β Add support for sharing transitions across multiple events
- β Add support for state-driven behavior
- Simplify initialize hooks, requiring super to be called instead
- β Add :namespace option for generated state predicates / event methods
-
v0.4.1 Changes
December 16, 2008- π Fix nil states not being handled properly in guards, known states, or visualizations
- π Fix the same node being used for different dynamic states in GraphViz output
- Always include initial state in the list of known states even if it's dynamic
- π Use consistent naming scheme for dynamic states in GraphViz output
- π Allow blocks to be directly passed into machine class
- π Fix attribute predicates not working on attributes that represent columns in ActiveRecord
-
v0.4.0 Changes
December 14, 2008- β Remove the PluginAWeek namespace
- β Add generic attribute predicate (e.g. "#{attribute}?(state_name)") and state predicates (e.g. "#{state}?")
- β Add Sequel support
- π Fix aliasing :initialize on ActiveRecord models causing warnings when the environment is reloaded
- π Fix ActiveRecord state machines trying to query the database on unmigrated models
- π Fix initial states not getting set when the current value is an empty string [Aaron Gibralter]
- β Add rake tasks for generating graphviz files for state machines [Nate Murray]
- π Fix initial state not being included in list of known states
- β Add other_states directive for defining additional states not referenced in transitions or callbacks [Pete Forde]
- Add next_#{event}_transition for getting the next transition that would be performed if the event were invoked
- β Add the ability to override the pluralized name of an attribute for creating scopes
- β Add the ability to halt callback chains by: throw :halt
- β Add support for dynamic to states in transitions (e.g. :to => lambda {Time.now})
- Add support for using real blocks in before_transition/after_transition calls instead of using the :do option
- β Add DataMapper support
- Include states referenced in transition callbacks in the list of a machine's known states
- Only generate the known states for a machine on demand, rather than calculating beforehand
- β Add the ability to skip state change actions during a transition (e.g. vehicle.ignite(false))
- β Add the ability for the state change action (e.g.
save
for ActiveRecord) to be configurable - Allow state machines to be defined on any Ruby class, not just ActiveRecord (removes all external dependencies)
- π¨ Refactor transitions, guards, and callbacks for better organization/design
- π Use a class containing the transition context in callbacks, rather than an ordered list of each individual attribute
- Add without_#{attribute} named scopes (opposite of the existing with_#{attribute} named scopes) [Sean O'Brien]
-
v0.3.1 Changes
October 26, 2008- π Fix the initial state not getting set when the state attribute is mass-assigned but protected
- π Change how the base module is included to prevent namespacing conflicts
-
v0.3.0 Changes
September 07, 2008- No longer allow additional arguments to be passed into event actions
- β Add support for can_#{event}? for checking whether an event can be fired based on the current state of the record
- Don't use callbacks for performing transitions
- π Fix state machines in subclasses not knowing what states/events/transitions were defined by superclasses
- Replace all before/after_exit/enter/loopback callback hooks and :before/:after options for events with before_transition/after_transition callbacks, e.g.
before_transition :from => 'parked', :do => :lock_doors # was before_exit :parked, :lock_doors after_transition :on => 'ignite', :do => :turn_on_radio # was event :ignite, :after => :turn_on_radio do
- Always save when an event is fired even if it results in a loopback [JΓΌrgen Strobel]
- Ensure initial state callbacks are invoked in the proper order when an event is fired on a new record
- Add before_loopback and after_loopback hooks [JΓΌrgen Strobel]