lib/trailblazer/operation/deprecated_macro.rb in trailblazer-operation-0.4.1 vs lib/trailblazer/operation/deprecated_macro.rb in trailblazer-operation-0.5.0
- old
+ new
@@ -3,17 +3,17 @@
module Operation::DeprecatedMacro
# Allows old macros with the `(input, options)` signature.
def self.call(proc, options)
warn %{[Trailblazer] Macros with API (input, options) are deprecated. Please use the "Task API" signature (options, flow_options) or use a simpler Callable. (#{proc})}
- wrapped_proc = ->( (options, flow_options), **circuit_options ) do
+ wrapped_proc = ->((options, flow_options), **circuit_options) do
result = proc.(circuit_options[:exec_context], options) # run the macro, with the deprecated signature.
direction = Activity::TaskBuilder.binary_signal_for(result, Activity::Right, Activity::Left)
return direction, [options, flow_options]
end
- options.merge( task: wrapped_proc )
+ options.merge(task: wrapped_proc)
end
end
end