Skip to content

trailblazer/trailblazer-future

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

Bridge gem to upgrade from 2.0 to 2.1

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages