Releases: stevegeek/typed_operation
Releases · stevegeek/typed_operation
v1.0.0.beta2
[1.0.0.beta2] - 2024/06/24
Added
- Now uses the new Literal::Properties
- Dropped the
#with
instance method - install generator now can take a
--action_policy
switch to include the Action Policy integration
v1.0.0.beta1
[1.0.0.beta1] - 2023/08/26
Added
- Action Policy integration. Optionally include
TypedOperation::ActionPolicyAuth
to get a operation execution authorization mechanism
based on Action Policy. This is an optional feature and is not included by default.
v1.0.0.pre2
Breaking changes
TypedOperation::Base
now usesLiteral::Struct
& is the parent class for an operation where the arguments are mutable (not frozen). But note that
no writer methods are defined, so the arguments can still not be changed after initialization. Just that they are not frozen.TypedOperation::ImmutableBase
now usesLiteral::Data
& is the parent class for an operation where the arguments are immutable (frozen on initialization),
thus giving stronger immutability guarantees (ie that the operation does not mutate its arguments).
v1.0.0.pre1
Note
literal
is a dependency but has not been released yet. So to use this pre-release version of TypedOperation install literal
in your app with the repo as source:
gem "literal", ">= 0.1.0", github: "joeldrapper/literal", branch: "main"
gem "typed_operation", "1.0.0.pre1"
[1.0.0.pre1] - Unreleased
Added
- Positional params are now supported
- A new set of methods exist to define params,
.param
,.named
,.positional
,.optional
- Class methods to get names of parameters, positional and named, optional or required.
- Added ability to pattern matching on params with operation instance or partially applied operations
Breaking changes
- TypedOperation now uses Literal::Data under the hood, instead of vident-typed
- Param option
convert:
has been removed, use a coercion block instead - Param option
allow_nil:
has been removed, useoptional:
or.optional()
instead - The method
.curry
now actually curries the operation, instead of partially applying (use.with
for partial application of parameters) .operation_key
has been removed- Ruby >= 3.1 is now required
Changed
- TypedOperation does not depend on Rails. Rails generator support exists but is conditionally included.
- Numerous fixes