- Use
trailblazer-activity-dsl-linear
1.1.0.
- Use
trailblazer-activity-dsl-linear
>= 1.0.0. - Use Inject() API instead of
:inject
,:input
etc in macros.
- Refactor
Contract::Build
to use TRB mechanics::input
and:inject
to allow injection of the contract class.- an
Option()
to wrap the builder code.
- Support for Ruby 3.0.
- Finally.
- Use symbol keys on
ctx
, only.
- Dependencies updated.
- Use
>= activity-0.8
.
- Add a separate End to Validate. When the key extraction fails, the Validate activity will end in a new end End.extract_failure. This end is, per default, connected to the outer failure track, exposing the exact same behavior it did before, but is now deviatable in the outer "real" operation to a separate flow.
- Add
Validate( constant: MySchema )
to allow usingDry::Schema
without the need forContract::Build()
. This replaces a hack that usedcontract MySchema
to achieve the same. - Change back to MIT license.
- New activity API update.
- New activity API update.
- Remove
trailblazer
dependency.
Split all Trailblazer Operation based Contract Macros into separate gem
-
In
Contract::Build( builder: )
you now also have access to thename:
keyword. Note that you need to double-splat in builders.```ruby Contract::Build( builder: ->(options, constant:, **) ) ```
Same for
:method
andCallable
.
All old semantics will be available via trailblazer-compat.
- Removed
Operation::contract
(without args). Please useOperation::["contract.default.class"]
. - Removed
Operation::contract_class
. Please useOperation::["contract.default.class"]
. - Removed
Operation::contract_class=
. Please useOperation::["contract.default.class"]=
. Doesn't inherit.
- You can't call
Create.().contract
anymore. The contract instance(s) are available through theResult
object via["contract.default"]
. - Removed the deprecation for
validate
, signature is(params[, model, options, contract_class])
. - Removed the deprecation for
contract
, signature is([model, options, contract_class])
.
- It's now Contract::Persist( name: "params" ) instead of ( name: "contract.params" ).
- Renamed
Persist
toContract::Persist
. Contract
paths are now consistent.