- Stricter dependency:
trailblazer-activity-dsl-linear < 1.3.0.
- Introduce
Operation.call_with_public_interface_from_callwhich mergesctxandcircuit_optionsaccordingly, so the overrider ofOperation.call_with_public_interfacegets 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_contextin#call_with_public_interface. This is done inStrategy.call. - Rename
Result#eventtoResult#terminusfor consistency. DeprecateResult#event.
- Deprecate
Operation.traceandResult#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_STATICthat is computed once at compile-time, not with every#call.
- Use
trailblazer-activity-dsl-linear1.1.0. - Pass
:container_activitytoTaskWrap.invokeinstead of the superseded:static_wrapoption.
- Use
trailblazer-activity-dsl-linear1.0.0.
- Upgrade
trailblazer-activity&trailblazer-activity-dsl-linearpatch versions.
- Fix
Operation.callbeing called twice before delegating tocall_with_circuit_interface. This is done via a specialcall_taskin 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, passselfand not@activityto theinvoker. 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_optionsto allow using explicit aliasing in Ruby < 3.0.
- Rename
Operation.flow_optionstoOperation.flow_options_for_public_call. - Operations can also accept
flow_optionsat run-time now 🍻, giving them precedence overOperation.flow_options_for_public_call.
- Upgrade
trailblazer-activity&trailblazer-activity-dsl-linearversions to utilise newtrailblazer-context🥁
- Remove container support. Containers should be part of
ctxitself
- Require forwardable module from standard lib.
- Fix Trace so it works with Ruby <= 2.4
- Reintroduce
ClassDependenciesby leveragingState.fields.
- Require newest
activitygem.
- New
contextAPI.
- Use
trailblazer-activity-dsl-linear-0.1.6.
- Remove Inspect. this now sits in the
developergem asDeveloper.railway.
- Minimal API around
Activity::FastTrackto support the old public call style.
- Use
activity-0.7.1.
- Use
activity-0.7.0.
- Moved
VariableMappingto theactivitygem.
-
Use
activity0.6.0. -
Remove
Operation::__call__in favor of onecallthat dispatches to eithercall_with_public_interfacethis implements the complicated publicOperation.()semantic and will be faded out with the rise of workflow engines.call_with_circuit_interfaceis 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::FastTracksignals.
- Use
activity-0.4.2.
- Use
activity-0.4.1.
- Cleanly separate
ActivityandOperationresponsibilities. An operation is nothing more but a class around an activity, hosting instance methods and implementing inheritance.
TaskWrap.arguments_for_callnow returns the correctcircuit_optionswhere the:runneretc.'s already merged.
- New taskWrap API for
activity0.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
passandfailas four-character aliases forsuccessandfailure. -
Remove
Uber::Callablerequirement and treat all non-:symbolsteps 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
pipetreein favor oftrailblazer-circuit. This allows rich workflows and state machines in an operation. -
Remove
uberdependency.
- Rename
Operation::Newto:Instantiateto avoid name clashes withNewoperations in applications. - Fix Ruby > 2.3.3's
Forwardableissue.
-
Allow passing tmp options into
KW::Optionthat will be merged withoptionsand 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::Optioncould be massively sped up with simple optimizations.
- Use
Forwardableinstead ofUber::Delegates.
Flowis nowRailway.- Any
Rightsubclass 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.
stepimport macro or add step with the & operator, meaning its result is always evaluated and decides about left or right.successalways adds to right track.failurealways 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
Callables.Note that the implementation of
OptionandSkills#to_hashare improveable, but work just fine for now.
- Simplify inheritance by basically removing it.
- Improvements with the pipe DSL.
_insertprovides better API now.
- Don't pass the operation into
Result, but theSkilloptions hash, only.
- Add
#inspect(slices).
- Works.