lib/oboe/frameworks/padrino/templates.rb in oboe-2.7.1.7-java vs lib/oboe/frameworks/padrino/templates.rb in oboe-2.7.2.fuchs1
- old
+ new
@@ -6,14 +6,12 @@
module Rendering
def self.included(klass)
::Oboe::Util.method_alias(klass, :render, ::Padrino::Rendering)
end
- def render_with_oboe(engine, data=nil, options={}, locals={}, &block)
- unless Oboe.tracing?
- render_without_oboe(engine, data, options, locals, &block)
- else
+ def render_with_oboe(engine, data = nil, options = {}, locals = {}, &block)
+ if Oboe.tracing?
report_kvs = {}
if data
report_kvs[:engine] = engine
report_kvs[:template] = data
@@ -30,11 +28,11 @@
report_kvs[:Module] = 'Padrino'
report_kvs[:File] = __FILE__
report_kvs[:LineNumber] = __LINE__
rescue StandardError => e
::Oboe.logger.debug e.message
- ::Oboe.logger.debug e.backtrace.join(", ")
+ ::Oboe.logger.debug e.backtrace.join(', ')
end
Oboe::API.profile(report_kvs[:template], report_kvs, false) do
render_without_oboe(engine, data, options, locals, &block)
end
@@ -49,11 +47,12 @@
render_without_oboe(engine, data, options, locals, &block)
ensure
::Oboe::API.log_exit('render', report_kvs)
end
end
+ else
+ render_without_oboe(engine, data, options, locals, &block)
end
end
end
end
end
-