activeinteractor

An implementation of the command pattern for Ruby with ActiveModel::Validations inspired by the interactor gem. Rich support for attributes, callbacks, and validations, and thread safe performance methods.

MIT License

Downloads
158.9K
Stars
176
Committers
10

Bot releases are visible (Hide)

activeinteractor - v1.2.2 Latest Release

Published by aaronmallen about 1 year ago

Fixed

  • #366 Fixes a minor timing issue for when deferred after_perform callbacks are run.
activeinteractor - v1.2.1

Published by aaronmallen about 2 years ago

Fixed

  • #358 Typo in generator template name
activeinteractor - v1.1.7

Published by aaronmallen about 2 years ago

Fixed

  • #358 Typo in generator template name
activeinteractor - v1.2.0

Published by aaronmallen about 2 years ago

Added

  • ActiveInteractor::Base.defer_after_callbacks_when_organized
  • ActiveInteractor::Organizer::Base.after_all_perform
  • ActiveInteractor::Organizer::Base.around_all_perform
  • ActiveInteractor::Organizer::Base.before_all_perform

Thank you @mjonas87 for your contribution!

activeinteractor - v1.1.6

Published by aaronmallen over 2 years ago

Changed

  • #344 Bump activemodel and activesupport to v7.0.2.3
activeinteractor - v1.1.4

Published by aaronmallen over 2 years ago

Changed

  • #340 Bump activemodel and activesupport to 6.1.4.6
activeinteractor - v1.1.3

Published by aaronmallen over 2 years ago

Changed

  • #338 Bump activemodel and activesupport to 6.1.4.4
activeinteractor - v1.1.2

Published by aaronmallen almost 4 years ago

Changed

  • #300 ActiveModel and ActiveSupport v6.1 will be the highest supported version for ActiveInteractor v1.1.x

Fixed

  • #300 ActiveInteractor::Context::Error compatibility with ActiveModel v6.1
activeinteractor - v1.1.1

Published by aaronmallen almost 4 years ago

Special thanks to @mohameddiaa27 for his contributions.

Fixed

  • #267 Allow default attributes to propagate to sibling/child interactors
activeinteractor - v1.1.0

Published by aaronmallen about 4 years ago

Special thanks to @mohameddiaa27 for his contributions.

Added

  • #247 Support in place callbacks

Fixed

  • #242 Optional attributes are always null
  • #243 Nested Organizers do not rollback parent context
activeinteractor - v1.0.5

Published by aaronmallen about 4 years ago

Fixed

  • #200 Context attributes assigned in interactor not accessible as element within interactor
activeinteractor - v1.0.4

Published by aaronmallen over 4 years ago

Fixed

  • #184 ActiveInteractor::Context::Base#fail! error message gets pupulated 3 times with the same message.
activeinteractor - v1.0.3

Published by aaronmallen over 4 years ago

Added

  • ActiveInteractor::Context::Errors
  • ActiveInteractor::Context::Status#resolve

Fixed

  • #168 #classify is called on const arguments
  • #169 If some of the interactors of the organizer fail error message is not persisted.
activeinteractor - v1.0.2

Published by aaronmallen over 4 years ago

Added

  • Support for Dynamoid ORM
  • Support for Mongoid ORM

Changed

  • ActiveInteractor::Models#acts_as_context no longer includes ActiveModel::Validations
  • ActiveInteractor::Models#acts_as_context now includes ActiveInteractor::Context::Attributes

Removed

  • ActiveInteractor::Models::InstanceMethods#merge!
activeinteractor - v1.0.1

Published by aaronmallen over 4 years ago

Added

  • ActiveInteractor::Context::Attributes#attribute?
  • ActiveInteractor::Context::Attributes#has_attribute?
  • ActiveInteractor::Context::Base.attribute
  • ActiveInteractor::Context::Base.attribute_missing
  • ActiveInteractor::Context::Base.attribute_names
  • ActiveInteractor::Context::Base.method_missing
  • ActiveInteractor::Context::Base.respond_to?
  • ActiveInteractor::Context::Base.respond_to_without_attributes?
  • ActiveInteractor::Context::Base#attribute_missing
  • ActiveInteractor::Context::Base#attribute_names
  • ActiveInteractor::Context::Base#method_missing
  • ActiveInteractor::Context::Base#respond_to?
  • ActiveInteractor::Context::Base#respond_to_without_attributes?
  • ActiveInteractor::Interactor::Context#context_attribute_missing
  • ActiveInteractor::Interactor::Context#context_attribute_names
  • ActiveInteractor::Interactor::Context#context_respond_to_without_attributes?
  • ActiveInteractor::Interactor::Context::ClassMethods#context_attribute
  • ActiveInteractor::Interactor::Context::ClassMethods#context_attribute_missing
  • ActiveInteractor::Interactor::Context::ClassMethods#context_attribute_names
  • ActiveInteractor::Interactor::Context::ClassMethods#context_respond_to_without_attributes?
activeinteractor - v1.0.0

Published by aaronmallen over 4 years ago

Added

  • ActiveInteractor::Config
  • ActiveInteractor::Configurable
  • ActiveInteractor::Context::Attributes#merge!
  • ActiveInteractor::Context::Base#merge
  • ActiveInteractor::Context::Loader
  • ActiveInteractor::Context::Status
  • ActiveInteractor::Error::InvalidContextClass
  • ActiveInteractor::Models
  • ActiveInteractor::Organizer::Callbacks
  • ActiveInteractor::Organizer::InteractorInterface
  • ActiveInteractor::Organizer::InteractorInterfaceCollection
  • ActiveInteractor::Organizer::Organize
  • ActiveInteractor::Organizer::Perform
  • ActiveInteractor::Interactor::Context.contextualize_with
  • ActiveInteractor::Interactor::Context#context_fail!
  • ActiveInteractor::Interactor::Context#context_rollback!
  • ActiveInteractor::Interactor::Context#finalize_context!
  • ActiveInteractor::Interactor::Perform
  • ActiveInteractor::Interactor::Perform::Options
  • ActiveInteractor::Rails
  • ActiveInteractor::Rails::Railtie

Changed

  • ActiveInteractor::Base now calls an ActiveSupport.on_load hook with :active_interactor and
    ActiveInteractor::Base
  • ActiveInteractor::Context::Attributes.attributes now excepts arguments for attributes
  • ActiveInteractor::Interactor.perform now takes options
  • ActiveInteractor::Interactor::Context.context_class will now first attempt to find an
    existing context class, and only create a new context class if a context is not found.
  • Moved ActiveInteractor::Organizer to ActiveInteractor::Organizer::Base
  • interactor, organizer, and context generators now accept context_attributes
    as arguments.

Fixed

  • various rails generator fixes

Removed

  • ActiveInteractor::Configuration use ActiveInteractor::Config
  • ActiveInteractor::Context::Attributes.attributes= use ActiveInteractor::Context#attributes
  • ActiveInteractor::Context::Attributes.attribute_aliases
  • ActiveInteractor::Context::Attributes.alias_attributes
  • ActiveInteractor::Context::Attributes#clean!
  • ActiveInteractor::Context::Attributes#keys
  • ActiveInteractor::Interactor#fail_on_invalid_context?
  • ActiveInteractor::Interactor#execute_rollback
  • ActiveInteractor::Interactor#should_clean_context?
  • ActiveInteractor::Interactor#skip_clean_context!
  • ActiveInteractor::Interactor::Callbacks.allow_context_to_be_invalid
  • ActiveInteractor::Interactor::Callbacks.clean_context_on_completion
  • ActiveInteractor::Interactor::Context.context_attribute_aliases
  • ActiveInteractor::Interactor::Execution
  • ActiveInteractor::Interactor::Worker#run_callbacks
activeinteractor - v1.0.0-beta.7

Published by aaronmallen over 4 years ago

Added

  • #127 ActiveInteractor::Rails::Models

Fixed

  • #127 #126 act_as_context not working

Removed

  • #127 ActiveInteractor::Rails::ActiveRecord
activeinteractor - v1.0.0-beta.6

Published by aaronmallen over 4 years ago

Added

  • #124 ActiveInteractor::Context::Status
  • #124 ActiveInteractor::Rails::ActiveRecord

Changed

  • #124 Abstracted status methods from ActiveInteractor::Context::Base into ActiveInteractor::Context::Status
activeinteractor - v1.0.0-beta.5

Published by aaronmallen over 4 years ago

Added

  • #122 ActiveInteractor::Rails::Railtie
  • #122 ActiveInteractor::Rails.config
  • #122 ActiveInteractor::Rails.configure

Removed

  • #122 ActiveInteractor::Railtie use ActiveInteractor::Rails::Railtie instead
  • #122 ActiveInteractor::Config#rails use ActiveInteractor::Rails.configure instead
activeinteractor - v1.0.0-beta.4

Published by aaronmallen almost 5 years ago

Added

  • #114 ActiveInteractor::Organizer::InteractorInterface
  • #114 ActiveInteractor::Organizer::InteractorInterfaceCollection
  • #115 ActiveInteractor::Interactor#options
  • #115 ActiveInteractor::Interactor#with_options
  • #115 ActiveInteractor::Interactor::PerformOptions#skip_each_perform_callbacks

Changed

  • #115 ActiveInteractor::Interactor::Worker#execute_perform and #execute_perform! no longer accept arguments,
    use ActiveInteractor::Interactor#with_options instead.
  • #115 ActiveInteractor::Organizer can now skip each_perform callbacks with
    the option skip_each_perform_callbacks

Removed

  • #115 ActiveInteractor::Interactor#execute_rollback
  • #115 ActiveInteractor::Interactor::Worker#run_callbacks