Skip to content

Releases: gocardless/statesman

v3.0.0

03 Jul 10:53
Compare
Choose a tag to compare

Breaking changes

  • Drop support for Rails < 4.2
  • Drop support for Ruby < 2.2

For details on our compatibility policy, see docs/COMPATIBILITY.md.

Changes

  • Better handling of custom transition association names (patch by @greysteil)
  • Add foreign keys to transition table generator (patch by @greysteil)
  • Support partial indexes in transition table update generator (patch by @kenchan0130)

Bugfix

21 May 09:32
Compare
Choose a tag to compare

Fixes

  • Fixes an issue where the wrong transition was passed to after_transition callbacks for the second and subsequent transition of a given state machine (patch by @alan)

Machine#transition_to error handling, Generators for namespaced classes

19 May 13:37
Compare
Choose a tag to compare

Additions

  • Generators now handle namespaced classes (patch by @hrmrebecca)

Changes

  • Machine#transition_to now only swallows Statesman generated errors. An exception in your guard or callback will no longer be caught by Statesman (patch by @paulspringett)

AR Scopes, after_initialize

27 Mar 14:29
Compare
Choose a tag to compare

Additions

  • Scope methods. Adds a module which can be mixed in to an ActiveRecord model to provide .in_state and .not_in_state query scopes.
  • Adds Machine#after_initialize hook (patch by @att14)

Fixes

  • Added MongoidTransition to the autoload statements, fixing #29 (patch by @tomclose)

Add after_commit callback

10 Mar 21:01
Compare
Choose a tag to compare

Additions

  • Adds after_commit flag to after_transition for callbacks to be executed after the transaction has been
    committed on the ActiveRecord adapter. These callbacks will still be executed on non transactional adapters.

Ruby 1.9.3 support

16 Dec 11:25
Compare
Choose a tag to compare

Additions

  • Adds Ruby 1.9.3 support (patch by @jakehow)
  • All Mongo dependent tests are tagged so they can be excluded from test runs

Changes

  • Specs now crash immediately if Mongo is not running

v0.1.0

05 Nov 13:38
Compare
Choose a tag to compare

Additions

  • Adds Mongoid adapter and generators (patch by @dluxemburg)

Changes

  • Replaces config#transition_class with Statesman::Adapters::ActiveRecordTransition mixin. (inspired by @cjbell88)
  • Renames the active record transition generator from statesman:transition to statesman:active_record_transition.
  • Moves to using require_relative internally where possible to avoid stomping on application load paths.