lib/oboe/frameworks/sinatra.rb in oboe-2.7.1.7-java vs lib/oboe/frameworks/sinatra.rb in oboe-2.7.2.fuchs1
- old
+ new
@@ -50,11 +50,11 @@
return ERB.new(@@rum_hdr_tmpl).result
end
end
rescue StandardError => e
Oboe.logger.warn "oboe_rum_header: #{e.message}."
- return ""
+ return ''
end
def oboe_rum_footer
return unless Oboe::Config.rum_id
if Oboe.tracing?
@@ -62,35 +62,34 @@
# skip that step for now
return @@rum_ftr_tmpl
end
rescue StandardError => e
Oboe.logger.warn "oboe_rum_footer: #{e.message}."
- return ""
+ return ''
end
end
end
end
if defined?(::Sinatra)
require 'oboe/inst/rack'
require 'oboe/frameworks/sinatra/templates'
- Oboe.logger.info "[oboe/loading] Instrumenting Sinatra" if Oboe::Config[:verbose]
+ Oboe.logger.info '[oboe/loading] Instrumenting Sinatra' if Oboe::Config[:verbose]
Oboe::Loading.load_access_key
Oboe::Inst.load_instrumentation
::Sinatra::Base.use Oboe::Rack
# When in the gem TEST environment, we load this instrumentation regardless.
# Otherwise, only when Padrino isn't around.
- unless defined?(::Padrino) and not (ENV.has_key?("OBOE_GEM_TEST"))
+ unless defined?(::Padrino) and not (ENV.key?('OBOE_GEM_TEST'))
# Padrino has 'enhanced' routes and rendering so the Sinatra
# instrumentation won't work anyways. Only load for pure Sinatra apps.
::Oboe::Util.send_include(::Sinatra::Base, ::Oboe::Sinatra::Base)
::Oboe::Util.send_include(::Sinatra::Templates, ::Oboe::Sinatra::Templates)
# Report __Init after fork when in Heroku
Oboe::API.report_init unless Oboe.heroku?
end
end
-