1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/CHANGELOG.md
2020-08-01 08:00:21 +05:30

27 KiB

CHANGELOG

unreleased

5.1.0

  • Fix after_commit in nested transactions #536 without explicit AR dependency in PR #668, thanks to stokarenko
  • Remove support for Rails 3.2

5.0.8

  • Revert Fix for :after_commit within nested transaction because it adds after_commit_action dependency which is dependent on many gems.

5.0.7

  • Fix :after_commit within nested transaction #666, thanks to stokarenko
  • Add permitted_transitions to group permitted event with state #664, thanks to dnamsons
  • Add Ruby 2.7.0 & 2.6.5 to Travis CI Test Matrix #661, thanks to the-spectator
  • Handle InvalidTransition in transition_from matcher #653, thanks to ryanwood

5.0.6

  • Fix no_direct_assignment, couldn't be turned off pragmatically #636
  • Add instance level validation skip option #644, thanks to Nitin-Salunke
  • Fixed aasm.current_event incorrectly yields nil when calling aasm.fire!(:event) #551 in #638, thanks to DoubleJarvis
  • Code Refactor #634 , thanks to rahulknojha
  • Fixed callback argument for :before_success & :success callback, #630

5.0.5

5.0.4

  • Specify dynamoid version for Rails > 5, #625, thanks to waghanza
  • Add travis runner for Rails 5.2, #624, thanks to waghanza
  • Cleanup Abstract class issue, #620, thanks to dennym

5.0.3

  • Fix Abstract class issue, #619

5.0.2

5.0.1

  • Fix failures array in transition not being reset #383
  • Enable AASM scopes to be defined on abstract classes.

5.0.0

  • Chore(invokers): Refactor callback invokers, add class-callbacks support #541, thanks to pandomic
  • Add docker setup to readme
  • Add support for Nobrainer (RethinkDB) #522, thanks to zedtux
  • Patch allow_event to accept event with custom arguments #419, thanks to czhc

4.12.3

  • Add to AASM fire(event) and fire!(event) methods #494, thanks to slayer
  • Add use_transactions flag to persist changes to the database even when some error occurs. #493, thanks to Peter Lampesberger.

4.12.2

4.12.1

  • DRY-up Mongoid and ActiveRecord Persistence, Add Sequel transactions and locking #475, thanks to @Aryk
  • Add aliases for event methods #476, thanks to @Aryk
  • Support Minitest spec expectations #387, thanks to @faragorn

4.12.0

4.11.1

  • fix: generator file name when using custom column name instead of aasm_state (see issue #398 for details, thanks to @bastianwegge)
  • fix: Scopes when states are defined as a series of symbols (see issue #397 for details, thanks to @evheny0)
  • fix: Multiple transition behavior when one of the transitions does not have a "from" parameter (see issue #392 for details)
  • fix: permissible states not respecting guard parameters (see issue #388) with pull-request #389

4.11.0

4.10.1

  • fix: suppress warnings when using ActiveRecord enums feature (see issue #346 for details, thanks to @110y, and issue #353 for details, thanks to @nathanstitt)
  • fix: handle array of success callbacks for transitions properly (see issue #363 for details, thanks to @shunichi)
  • support permitted: false for states and events query/inspection methods (see issue #364 for details, thanks to @hspazio)

4.10.0

4.9.0

  • add support for callback classes (after only) (see issue #316 for details, thanks to @mlr)
  • allow easier extension of AASM (utilising the idea of ApplicationRecords from Rails 5) (see issue #296 for details, thanks to @mlr)
  • support pessimistic locking for ActiveRecord (see issue #283 for details, thanks to @HoyaBoya)
  • fix: support database sharding for ActiveRecord (see issue #289 for details, thanks to @scambra)
  • fix: some issues with RubyMotion (see issue #318 for details, thanks to @Infotaku)
  • fix: Rails generator now features the correct namespace (see issue #328 and issue #329 for details, thanks to @anilmaurya)

4.8.0

4.7.0

  • fix: allow :send as event name (see issue #257 for details)
  • add new callbacks: transactions, all events, ensure (see issue #282 for details, thanks to @HoyaBoya)

4.6.0

4.5.2

  • fix arity difference between Procs and lambdas (see issue #293 for details)

4.5.1

  • make sure to use override configuration options if state machine is defined more than once (see issue #287 for details)

4.5.0

  • add RSpec matchers have_state, allow_event and allow_transition_to (see issue #147 for details)
  • add RSpec matcher transition_from (see issue #178 for details, thanks to @thomasstephane)

4.4.1

  • add support for rejecting certain events on inspection (see issue #272 for details, thanks to @dubroe)

4.4.0

4.3.0

  • add support for multiple state machines per class (see issue #158 and issue #240 for details)
    • special thanks to @evadne for testing this feature, and providing comments and patches (see issue #245 for details)

4.2.0

  • support turning off and on the configuration option for no_direct_assignment (see issue #223 for details)
  • event arguments are now passed to :after_commit callbacks as well (see issue #238, thanks to @kuinak)

4.1.1

  • support block notation for :after_commit event callbacks (see issue #224 for details)
  • event arguments are now passed to state callbacks as well (not only to event callbacks) (see issue #219, thanks to @tobithiel)
  • AASM::InvalidTransition now references the current object (with the state machine) and the AASM event name (see issue #217, thanks to @awsmsrc)
  • bugfix: do not update unloaded state for Sequel (see issue #218, thanks to @godfat)

4.1.0

  • bugfix: initialize the aasm state column after initialization of the Mongoid instance (see issue #206, thanks to @Shwetakale )
  • added support for mongomapper ORM (see issue #203, thanks to @reidmorrison )
  • aasm_column has been removed. Use aasm.attribute_name instead
  • aasm_human_event_name has been removed. Use aasm.human_event_name instead

4.0.8

  • bugfix: may_event_name? should return true or false only (see issue #200 for details)

4.0.7

  • bugfix: take private methods into account when checking for callbacks (see issue #197 for details)

4.0.6

  • bugfix: false is treated as uninitialised state (same as nil) (see issue #195 for details)
  • bugfix: an event's :error callback now retrieves all arguments passed to the event (see issue #196 for details)

4.0.5

  • bugfix: initialize the aasm state column after initialization of the ActiveRecord instance only if the attribute has been loaded (see issue #193 for details)

4.0.4

  • corrected callback order in README
  • bugfix: initialize the aasm state column after initialization of the ActiveRecord instance (see issue #191 for details)
  • bugfix: avoid Rails autoloading conflicts (see issue #137 and issue #139 for details)

4.0.3

  • bugfix: fire guards only once per transition, part 2 (see issue #187 for details)
  • aasm_column is deprecated. Use aasm.attribute_name instead

4.0.2

  • bugfix: really support block-guards (defined within a transition block) (see issue #186 for details)

4.0.1

  • fire guards only once per transition (see issue #184 for details)
  • aasm_human_event_name is deprecated, use aasm.human_event_name instead

4.0.0

  • support if and unless guard syntax: (see issue #179 and issue #181), thanks to @bigtunacan
  • may configure to not allow direct assignment for persisted AASM models (see issue #53)
  • DSL change: callbacks don't require to_state parameter anymore, but still support it (closing issues #11, #58 and #80 thanks to @ejlangev)
  • DSL change: after_commit hooks are now event-based (see issue #112)
  • DSL change: event and state callbacks have been re-ordered; state callbacks are not run anymore if any guard fails
  • DSL change: :on_transition renamed to :after
  • DSL change: :on_transition renamed to :after
  • DSL change: transition :after binding changed (see issue #59, thanks to @stiff)
  • DSL change: instance-based events inspection now returns event instances (instead of the event names as symbol)
  • DSL change: instance-based permissible_events has been removed in favor or events(:permissible => true)
  • DSL change: class-based events now returns a list of Event instances (instead of a hash with event names as keys)
  • DSL change: renamed permissible states and events to permitted states events
  • removed deprecated methods (mostly the ones prefixed with aasm_)

3.4.0

3.3.3

  • bugfix: support reloading development environment in Rails (see issue #148)

3.3.2

3.3.1

  • bugfix: permissible events will respect given guards (see issue #150)

3.3.0

3.2.1

3.2.0

3.1.1

  • bugfix: don't require ActiveRecord for localizing AASM event and state name (see issue #113, thanks to @silentshade)

3.1.0

  • validating the current state (see issue #95, thanks to @ivantsepp)
  • allow configuring behavior of nested transactions (see issue #107)
  • support multiple guards per transition
  • support event guards (see issue #85)
  • support reading from- and to-state during on_transition callback (see issue #100)

3.0.26

  • support state.human_name (aliased to state.localized_name) (see issue #105)

3.0.25

3.0.24

  • added support for event blocks (thanks to @Intrepidd)

3.0.23

  • added support for after_commit callback (transaction support) (thanks to @tisba)

3.0.22

  • fixed issue 88: wrong number of arguments for transaction method

3.0.21

  • support nested ActiveRecord transactions (@ozeias)
  • allow overwriting of events, can be very useful with inheritance (@Intrepidd)

3.0.20

  • added configuration option to disable automatic scope creation

3.0.19

  • fixed deprecation warning with Rails 4 (Relation#update_all with conditions is deprecated)
  • fixing issue #69 ( ActiveRecord scopes are not chainable)

3.0.18

  • fixing issue #66 (state methods not reflecting the current state)

3.0.17

  • supporting instance level inspection for states (including permissible state, see issue #54)
  • added autocreation of constants for each state (@jherdman)

3.0.16

  • added autocreation of state scopes for Mongoid (thanks to @jonnyshields)

3.0.15

  • added support for localized state names (on a class level, like Record.aasm.states.map(&:localized_name))

3.0.14

  • supporting event inspection for to-states transitions (Event#transitions_to_state?)

3.0.13

  • supporting ActiveRecord transactions when firing an event

3.0.12

  • aasm_from_states_for_state now supports to filter for specific transition

3.0.11

  • added class method aasm_from_states_for_state to retrieve all from states (regarding transitions) for a given state

3.0.10

  • added support for transitions from all other states (thanks to @swrobel)

3.0.9

  • guard checks (e.g. may_edit?) now support guard parameters as well

3.0.8

  • fixed issue with generating docs using yard

3.0.7

  • removed deprecation warning when localizing aasm state names (look at issue #38 for details)

3.0.6

  • bugfix: if configured to skip validation the code does not validate anymore

3.0.5

  • bugfix: get rid of error with old rubygems versions

3.0.4

  • bugfix: Subclasses of aasm-enabled classes don't lose settings anymore (thanks to codez)

3.0.3

  • bugfix: ActiveRecord scopes are generated when using the new DSL

3.0.2

  • ActiveRecord persistence can ignore validation when trying to save invalid models

3.0.1

  • added support for Mongoid (Thanks, Michał Taberski)

3.0.0

  • switched documentation to the new DSL
  • whiny transactions: by default, raise an exception if an event transition is not possible
  • you may disable whiny transactions

2.4.0

  • supporting new DSL (which is much shorter)

2.3.1

  • bugfix: avoid naming conflict with i18n

2.3.0

  • supporting i18n
  • supporting regular expressions for hash values and strings