All Versions
Latest Version
Avg Release Cycle
65 days
Latest Release

Changelog History
Page 2

  • v2.1.0.beta2

    January 23, 2018
    • Simplify Nested and several other internals by using the new Activity API.
  • v2.1.0.beta1

    December 20, 2017
    • โž• Add deprecation/call and deprecation/context that help with the new call API and symbols for options keys.
  • v2.0.7

    • ๐Ÿ‘ Allow to use any method with the Model macro, e.g.

      step Model( Comment, :[] )

    will now invoke Comment[ params[:id] ], which makes using Sequel a breeze. code: contract do .. end etc needs to be moved to a new gem if we want to keep it alive.

  • v2.0.6

    • ๐Ÿ›  Fix what we broke in 2.0.5, where Wrap would always use the current operation subclass and not the empty Trailblazer::Operation. Thanks to @mensfeld.
  • v2.0.5

    • In Wrap, use self instead of a hard class reference. This allows using Wrap in the compat gem.
  • v2.0.4

    • When using Nested(X), the automatic :name option is now "Nested(X)" instead of the cryptic proc string.
  • v2.0.3

  • v2.0.2

    • โœ‚ Remove uber dependency as we use our own Option::KW now.
    • ๐Ÿ— In Contract::Build( builder: ) you now also have access to the name: keyword. Note that you need to double-splat in builders.

      Contract::Build( builder: ->(options, constant:, **) )

      Same for :method and Callable.

    • Policy::Guard( :method ) now works.

  • v2.0.1

    • โž• Add fail_fast: true for step and failure to short-circuit the pipe. Note that more "eloquent" semantics are coming in trailblazer-bpmn.
    • Add fail!, fail_fast!, pass!, and pass_fast!. Note that they are all experimental API and not documented, yet.
    • โœ‚ Remove Builder and allow dynamic Nested.

      step Nested( ->(options, params:) { params[:type] == "moderated" ? Moderated : Comment } )
    • โœ‚ Remove override in favor of step .., override: true. Note that this method wasn't documented.

    • Numerous internal simplifications documented here.

  • v2.0.0

    All old semantics will be available via trailblazer-compat.

    • โœ‚ Removed Operation::run as it was a bad decision. Raising an exception on invalid is a very test-specific scenario and shouldn't have been handled in the core doce.
    • โœ‚ Removed Operation::present, since you can simply call Operation::new (without builders) or Operation::build_operation (with builders).
    • โœ‚ Removed Operation::valid?. This is in the result object via result.success?.
    • โœ‚ Removed Operation#errors. This is in the result object via result[:errors] if the operation was invalid.
    • Removed the private option :raise_on_invalid. Use Contract::Raise instead, if you need it in tests.

    • โœ‚ Removed Operation::contract (without args). Please use Operation::["contract.default.class"].

    • โœ‚ Removed Operation::callbacks (without args). Please use Operation::["callback.<name>.class"].

    • โœ‚ Removed Operation::contract_class. Please use Operation::["contract.default.class"].

    • โœ‚ Removed Operation::contract_class=. Please use Operation::["contract.default.class"]=. Doesn't inherit.


    • The model method doesn't exist anymore, use self["model"] or write your own.
    • :find_by diverts to left track.
    • :create is :new now.

    ๐Ÿ— Builder

    • ๐Ÿ— It's include Builder now, not extend Builder.
    • ๐Ÿ— builds now receives one options hash.


    • ๐Ÿ‘ป No exception anymore, but Operation#["policy.result"].
    • Access the current user via self["current_user"] now.
    • ๐Ÿ’… Policy is Policy::Pundit now as Policy is Trailblazer's (upcoming) authorization style.


    • โœ‚ Removed Operation::representer_class. Please use Operation::["representer.class"].
    • โœ‚ Removed Operation::representer_class=. Please use Operation::["representer.class"]=.
    • ๐Ÿ“œ You can now have any number of named representers: Operation.representer :parser, ParsingRepresenter.
    • Automatic infering of the representer from a contract is not so automatic anymore. This feature was barely used and is now available via include Representer::InferFromContract.
    • ๐Ÿ‘ Reform 2.0 is not supported in Representer anymore, meaning you can't automatically infer representers from 2.0 contracts. Reform 2.0 works with all remaining components.
    • โœ‚ Removed Operation::contract_class. Please use Operation::["contract.default.class"].
    • โœ‚ Removed Operation::contract_class=. Please use Operation::["contract.default.class"]=. Doesn't inherit.


    • โœ‚ Removed Operation::Dispatch, it's called Operation::Callback.


    • โœ‚ Removed Operation::Collection. Please use Operation::present.



    • 0๏ธโƒฃ You can't call Create.().contract anymore. The contract instance(s) are available through the Result 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]).