- Introduce
Operation.call_with_public_interface_from_call
which mergesctx
andcircuit_options
accordingly, so the overrider ofOperation.call_with_public_interface
gets correct args. - Removing
Operation.trace
, you've been warned! UseOperation.wtf?
. This also removesResult#wtf
. See [https://github.com/trailblazer/trailblazer-operation/blob/3f821c7d576e7ccccf580fbd8c9305501fdc5d2c/test/trace_test.rb#L22](this sample test case) if you need a more low-level interface to tracing. - No need to pass
:exec_context
in#call_with_public_interface
. This is done inStrategy.call
. - Rename
Result#event
toResult#terminus
for consistency. DeprecateResult#event
.
- Deprecate
Operation.trace
andResult#wtf?
in favor ofOperation.wtf?
. - Use
trailblazer-developer-0.1.0
.
- Require
trailblazer-activity-dsl-linear-1.2.0
. - Remove
Railway::Macaroni
. - Remove
Operation::Callable
. - Introduce
Operation::INITIAL_WRAP_STATIC
that is computed once at compile-time, not with every#call
.
- Use
trailblazer-activity-dsl-linear
1.1.0. - Pass
:container_activity
toTaskWrap.invoke
instead of the superseded:static_wrap
option.
- Use
trailblazer-activity-dsl-linear
1.0.0.
- Upgrade
trailblazer-activity
&trailblazer-activity-dsl-linear
patch versions.
- Fix
Operation.call
being called twice before delegating tocall_with_circuit_interface
. This is done via a specialcall_task
in the operation's taskWrap.
- Revert trailblazer-developer to a runtime dependency.
- Bugfix: when calling
Operation.call(params: {}, "current_user" => user)
the stringified variables got lost in Ruby < 3.
- In
Operation.call_with_public_interface
, passself
and not@activity
to theinvoke
r. This fixes tracing as it now catches the actual Operation class, not an activity instance.
- Compatible with Ruby 2.4-3.0.
- Add
Operation.wtf?
. - Add
Operation.call_with_flow_options
to allow using explicit aliasing in Ruby < 3.0.
- Rename
Operation.flow_options
toOperation.flow_options_for_public_call
. - Operations can also accept
flow_options
at run-time now 🍻, giving them precedence overOperation.flow_options_for_public_call
.
- Upgrade
trailblazer-activity
&trailblazer-activity-dsl-linear
versions to utilise newtrailblazer-context
🥁
- Remove container support. Containers should be part of
ctx
itself
- Require forwardable module from standard lib.
- Fix Trace so it works with Ruby <= 2.4
- Reintroduce
ClassDependencies
by leveragingState.fields
.
- Require newest
activity
gem.
- New
context
API.
- Use
trailblazer-activity-dsl-linear-0.1.6.
- Remove Inspect. this now sits in the
developer
gem asDeveloper.railway
.
- Minimal API around
Activity::FastTrack
to support the old public call style.
- Use
activity-0.7.1
.
- Use
activity-0.7.0
.
- Moved
VariableMapping
to theactivity
gem.
-
Use
activity
0.6.0. -
Remove
Operation::__call__
in favor of onecall
that dispatches to eithercall_with_public_interface
this implements the complicated publicOperation.()
semantic and will be faded out with the rise of workflow engines.call_with_circuit_interface
is the circuit-compatible version that will be invoked on nested operations.
This might seem a bit "magical" but simplifies the interface a lot. In better languages, you could use method overloading for that, in Ruby, we have to do that ourselves. This decision was made with the deprecation of
Operation.()
in mind. In the future, operations will mostly be invoked from workflow engines and not directly, where the engine takes care of applying the correct interface.
- Minor fixes for activity 0.5.2.
- Use
Activity::FastTrack
signals.
- Use
activity-0.4.2
.
- Use
activity-0.4.1
.
- Cleanly separate
Activity
andOperation
responsibilities. An operation is nothing more but a class around an activity, hosting instance methods and implementing inheritance.
TaskWrap.arguments_for_call
now returns the correctcircuit_options
where the:runner
etc.'s already merged.
- New taskWrap API for
activity
0.3.2.
- Add @mensfeld's "Macaroni" step style for a keyword-only signature for steps.
inspect: failure is << and success is >>
call vs call: it's now designed to be run in a composition where the skills stuff is done only once, and the reslt object is not necessary
FastTrack optional
Wrapped optional
-
Add
pass
andfail
as four-character aliases forsuccess
andfailure
. -
Remove
Uber::Callable
requirement and treat all non-:symbol
steps as callable objects. -
Remove non-kw options for steps. All steps receive keyword args now:
def model(options)
now must have a minimal signature as follows.
def model(options, **)
-
Remove
Operation#[]
andOperation#[]=
. Please only change state inoptions
. -
API change for
step Macro()
: the macro's return value is now called with the low-level "Task API" signature(direction, options, flow_options)
. You need to return[direction, options, flow_options]
. There's a soft-deprecation warning. -
Remove support for Ruby 1.9.3 for now. This can be re-introduced on demand.
-
Remove
pipetree
in favor oftrailblazer-circuit
. This allows rich workflows and state machines in an operation. -
Remove
uber
dependency.
- Rename
Operation::New
to:Instantiate
to avoid name clashes withNew
operations in applications. - Fix Ruby > 2.3.3's
Forwardable
issue.
-
Allow passing tmp options into
KW::Option
that will be merged withoptions
and then transformed into kw args, but only locally for the step scope (or wherever you doOption.()
). The API:Option::KW.(proc).(input, options, some: "more", ...)
Note that
KW::Option
could be massively sped up with simple optimizations.
- Use
Forwardable
instead ofUber::Delegates
.
Flow
is nowRailway
.- Any
Right
subclass will now be interpreted as success. - Add
fail!
,fail_fast!
,pass!
, andpass_fast!
. - The only semi-public method to modify the pipe is
Railway#add
- Removed
&
,>
,<
and%
"operators" in favor of#add
. - Extremely simplified the macro API. Macros now return a callable step with the interface
->(input, options)
and their pipe options, e.g.[ step, name: "my.macro"]
.
Removing Operation::consider
, which is now step
.
We now have three methods, only.
step
import macro or add step with the & operator, meaning its result is always evaluated and decides about left or right.success
always adds to right track.failure
always adds to left track.
This was heavily inspired by a discussion with @dnd, so, thanks! 🍻
-
Introduce a new keyword signature for steps:
step ->(options, params:, **) { options["x"] = params[:id] }
The same API works for instance methods and
Callable
s.Note that the implementation of
Option
andSkills#to_hash
are improveable, but work just fine for now.
- Simplify inheritance by basically removing it.
- Improvements with the pipe DSL.
_insert
provides better API now.
- Don't pass the operation into
Result
, but theSkill
options hash, only.
- Add
#inspect(slices)
.
- Works.