diff --git a/lib/trailblazer/developer/generate.rb b/lib/trailblazer/developer/generate.rb index 6deb442..a209953 100644 --- a/lib/trailblazer/developer/generate.rb +++ b/lib/trailblazer/developer/generate.rb @@ -32,7 +32,7 @@ class Activity < Representable::Decorator end def call(hash) - _, (ctx, _) = Activity::TaskWrap.invoke(Pipeline, hash: hash) + _, (ctx, _) = Activity::TaskWrap.invoke(Pipeline, [{hash: hash}, {}]) ctx[:intermediate] end diff --git a/lib/trailblazer/developer/render/circuit.rb b/lib/trailblazer/developer/render/circuit.rb index 81290f6..d59f512 100644 --- a/lib/trailblazer/developer/render/circuit.rb +++ b/lib/trailblazer/developer/render/circuit.rb @@ -2,8 +2,8 @@ module Trailblazer module Developer module_function - def render(activity) - Render::Circuit.(activity) + def render(activity, **options) + Render::Circuit.(activity, **options) end module Render diff --git a/lib/trailblazer/developer/trace/present.rb b/lib/trailblazer/developer/trace/present.rb index 9b38b22..51e9d09 100644 --- a/lib/trailblazer/developer/trace/present.rb +++ b/lib/trailblazer/developer/trace/present.rb @@ -28,7 +28,7 @@ def tree_for(stack, level, tree:, **options) stack.each do |lvl| # always a Stack::Task[input, ..., output] input, output, nested = Trace::Level.input_output_nested_for_level(lvl) - tree.push(*TreeNodes.for(level, options.merge(input: input, output: output))) + tree.push(*TreeNodes.for(level, **options.merge(input: input, output: output))) if nested.any? # nesting opts = options.merge(tree: tree) diff --git a/lib/trailblazer/developer/wtf.rb b/lib/trailblazer/developer/wtf.rb index 16ba658..9585609 100644 --- a/lib/trailblazer/developer/wtf.rb +++ b/lib/trailblazer/developer/wtf.rb @@ -1,8 +1,8 @@ module Trailblazer::Developer module_function - def wtf(activity, *args) - Wtf.invoke(activity, *args) + def wtf(activity, *args, **circuit_options) + Wtf.invoke(activity, *args, **circuit_options) end class << self @@ -16,11 +16,11 @@ module Wtf # This allows to display the trace even when an exception happened def invoke(activity, (ctx, flow_options), **circuit_options) activity, (ctx, flow_options), circuit_options = Wtf.arguments_for_trace( - activity, [ctx, flow_options], circuit_options + activity, [ctx, flow_options], **circuit_options ) _returned_stack, signal, (ctx, flow_options) = Trace.invoke( - activity, [ctx, flow_options], circuit_options + activity, [ctx, flow_options], **circuit_options ) return signal, [ctx, flow_options], circuit_options diff --git a/test/trace/wtf_test.rb b/test/trace/wtf_test.rb index 666d569..da31955 100644 --- a/test/trace/wtf_test.rb +++ b/test/trace/wtf_test.rb @@ -381,7 +381,7 @@ def <<(value) Trailblazer::Developer.wtf?( alpha, [ctx, flow_options], - circuit_options + **circuit_options ) end