-
Notifications
You must be signed in to change notification settings - Fork 16
Migration 2.1.rc1 to 2.1.rc11
Emanuele Magliozzi edited this page Apr 17, 2019
·
13 revisions
Since between 2.1.rc1 and 2.1.rc11 there's a significant (but necessary) internal refactoring, we decided to have a rather odd version jump.
The following Gemfile
works. Note that you don't have to use all listed gems.
gem "trailblazer-activity", ">= 0.8.0"
gem "trailblazer-activity-dsl-linear"
gem "trailblazer-macro", github: "trailblazer/trailblazer-macro", branch: "linear"
gem "trailblazer-macro-contract", github: "trailblazer/trailblazer-macro-contract", branch: "linear"
gem "trailblazer-operation", github: "trailblazer/operation", branch: "linear"
group :development, :test do
gem "trailblazer-test", github: "trailblazer/trailblazer-test"
gem "trailblazer-developer"
end
Before
module Create
extend Trailblazer::Activity::Railway()
module_function
step :a, Output(:success) => :some_id
step :b, Output(:success) => :track
end
Now
class Create < Trailblazer::Activity::Railway
step :a, Output(:success) => Id(:some_id )
step :b, Output(:success) => Track(:track)
end
Before
module Create
extend Trailblazer::Activity::Railway()
module_function
def a(ctx, *)
end
step method(:a)
end
Now
class Create < Trailblazer::Activity::Railway
def self.a(ctx, *) # class method!
end
step method(:a)
end
OR
Before
module Create
extend Trailblazer::Activity::Railway()
module_function
def a(ctx, *)
end
step method(:a)
end
Now
class Create < Trailblazer::Activity::Railway
step :a
def a(ctx, *) # class method!
end
end
note: the :input
and :output
DSL currently doesn't have any effect. We will add it shortly.