[no unreleased changes yet]
- Remove upper bounds on versions for all dependencies
- Relaxed
shaped
gemspec requirement to< 1.0
.
- Enforce only major and minor parts of required Ruby version (loosening the required Ruby version from 3.3.3 to 3.3.0)
- Update shaped requirement from >= 0.9, < 0.12 to >= 0.9, < 0.13
- Rename primary branch from
master
tomain
- Update dependencies
- Move from Memoist to MemoWise
- Release gem via RubyGems.
- Change project name from "ActiveActions" to "RungerActions"
- Remove no-longe-accurate claim in README.md that
shaped
must be listed in apps'Gemfile
s
- Allow setting
error_message
on the result object when invoking afails_with
case
- Specify Ruby 3.0.0 for gem development
- Fix README.md typo (change
requires
toreturns
)
- Bump
shaped
from 0.7.0 to 0.8.0
- Mention the correct class (the action class rather than the result class) in error messages when
invoking a failure condition when executing via
run!
- Change the behavior of the
#run!
instance method to also raise an error if any failure conditions (i.e. failures set via afails_with
case) occur during the execution of the action. (Previously,#run!
would only raise if any of the initialization params were invalid.)
- Add
::new!
and::run!
class methods for actions
- Bump
release_assistant
to0.1.1.alpha
- Move CI from Travis to GitHub Actions
- Ensure in PR CI runs that the current version contains "alpha", that there's no git diff (e.g. due
to failing to run
bundle
after updating the version), and that there is an "Unreleased" section inCHANGELOG.md
- Use
release_assistant
gem to manage the release process
- Add Rails generator (e.g.
bin/rails g runger_actions:action Users::Create
)
- Source Rubocop rules/config from
runger_style
gem
- Bump
shaped
from 0.6.4 to 0.7.0
- List some alternatives
- Add detail about the project status/context
- Bump
shaped
from 0.6.3 to 0.6.4
- Source
shaped
from RubyGems
- Add more badges to README.md (Dependabot; GitHub tag/version)
- Only check for promised return values if the action is successful
- Add Travis build status badge to README.md
- Add example of controller code using an action
- Add a table of contents to README.md
- Simplify README.md action example by removing check for NEXMO_API_KEY
- Illustrate
returns
in README.md example - Add more detailed documentation/examples to README.md
- Validate (at the time of assignment to the
result
) the "shape" of allreturns
ed result values
- Tweaked the wording/formatting of some validation failure error messages.
- Bump
shaped
from 0.5.8 to 0.6.0
- Bump
shaped
from 0.5.0 to 0.5.8
- Bump
shaped
from 0.4.0 to 0.5.0, which adds support for a newShaped::Shape::Callable
shape description, so you can now do something like this:
class ProcessOrder < ApplicationAction
# allow ordering only 2, 4, or 6 widgets
requires :number_of_widgets, ->(num) { num.is_a?(Integer) && (2..6).cover?(num) && num.even? }
# [...]
end
- Bump
shaped
from 0.3.2 to 0.4.0, which adds support for ActiveModel-style validations ofShaped::Shape::Class
shapes. So now you can do something like this:
class ProcessOrder < ApplicationAction
requires :number_of_widgets, Integer, numericality: { greater_than: 0, less_than: 1_000 }
# [...]
end
- Add test coverage reporting (via
codecov
andsimplecov
)
- Add test for
Result#success?
- Update
shaped
(which is used for param validation) from version 0.2.1 to 0.3.0, which has breaking changes. For more details, see theshaped
changelog. - For
requires
, all type/shape descriptions (i.e. arguments[1..]
) are now passed through theShaped::Shape(...)
constructor method. (In most cases, this change will not have any effect, because in most cases the type/shape description was a single class, and this change has no effect in that case.)
- Mention in README.md that
shaped
needs to be installed explicitly/manually as a dependency in the user's ownGemfile
.
- Use
shaped
gem to describe the shape of Hahes and Arrays
- Raise an
RungerActions::MissingResultValue
error if a promised return value (as declared via thereturns
class method on the action) has not been set by the action's#execute
method.
- Don't raise an error when running an action that doesn't have any
requires
/ input params
- Add
RungerActions::Base#run!
method that will raiseRungerActions::InvalidParam
if there are any ActiveRecord params provided to the action that fail any validation(s) specified for that param. This can be used as an (error-raising) alternative to manually checkingaction.valid?
.
- Prevent mutating a returned
result
from outside of the action
- Don't install a specific
bundler
version in Travis - Run tests on Travis via
bin/rspec
(rather than (implicitly) viabundle exec rake
) - Run rubocop in Travis
- Raise an explicit error if action class fails to implement #execute
- Add stricter type validations and better error messages for type validation failures
- Add support for arrays of allowed classes (rather than only allowing a single allowed class type to be specified)
- Only send Travis notifications when builds fail (not when they pass)
- Specify Ruby 2.7.0 (not 2.7.1)
- Specify
os: linux
for Travis - Specify
dist: bionic
for Travis
- Allow #result to return a result even w/o any returns or fails_with
- Create reader methods on
Result
object forreturns
ed values
- Add usage instructions (including code example) to README.md and make other tweaks to README.md.
- Add
bin/release
executable
- Autocorrect all autocorrectable rubocop violations
- Initial release of RungerActions! Organize and validate the business logic of your Rails application with this combined form object / command object.