lib/rake/funnel/tasks/timing.rb in rake-funnel-0.0.5.pre vs lib/rake/funnel/tasks/timing.rb in rake-funnel-0.0.6.pre

- old
+ new

@@ -36,15 +36,15 @@ self end def patches - @patches ||= create_patches + @patches ||= [report, benchmark] end - def create_patches - report = Rake::Funnel::Support::Patch.new do |p| + def report + Rake::Funnel::Support::Patch.new do |p| report_invoker = -> (opts) { TimingSupport::Report.new(@stats, opts).render } p.setup do Rake::Application.class_eval do orig_display_error_message = instance_method(:display_error_message) @@ -65,12 +65,14 @@ memo.bind(self).call(ex) end end end end + end - benchmark = Rake::Funnel::Support::Patch.new do |p| + def benchmark + Rake::Funnel::Support::Patch.new do |p| benchmark_invoker = -> (task, &block) { @stats.benchmark(task, &block) } p.setup do Rake::Task.class_eval do orig_execute = instance_method(:execute) @@ -91,10 +93,8 @@ memo.bind(self).call(ex) end end end end - - [report, benchmark] end end end