Skip to content
Bridge gem to upgrade from 2.0 to 2.1
Ruby Other
  1. Ruby 99.6%
  2. Other 0.4%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib/trailblazer
test
.gitignore
.travis.yml
CHANGES.md
LICENSE.txt
README.md
Rakefile
gems.rb
trailblazer-future.gemspec

README.md

Trailblazer::Future

Build Status Gem Version

Installation

  • Step 1

Update trailblazer to it latest patch version ~> 2.0.7

  • Step 2

Test your build and remove any deprecation warning

  • Optional step (recommended)

Feed a homeless person

  • Step 3

Add this line to your application's Gemfile:

gem 'trailblazer-future'

Usage

  1. Inherit operation from Trailblazer::V2_1::Operation
class MyOP < Trailblazer::V2_1::Operation
end
  1. Migrate to TRB 2.1 following the migration path, here a quick summary of the breaking changes:
    • new API using keyword arguments: MyOP.(params) -> MyOp.(params: params) (more here)
    • using symbol instead of string for :model and :current_user: result['model'] -> result[:model]
    • Replace Railway::Right/Left with Trailblazer::Activity::Right/Left
    • Add option fast_track: true for the steps that uses pass_fast! or fail_fast! (check the new wiring API)
    • Nested macro now gets the all result object so use :input and :output to filter data in/out

Notes

  1. Operations of different versions cannot be nested
  2. Rails controller's run is for V2.0. Use run_v21 for the migrated operations

License

The gem is available as open source under the terms of the MIT License.

You can’t perform that action at this time.