Sha256: d6b9237c663229df141f7447228b31ff4eff46d2c928c720f6fd75b5351dd201
Contents?: true
Size: 824 Bytes
Versions: 2
Compression:
Stored size: 824 Bytes
Contents
module Errplane def self.get_logger if( defined?(logger)) logger else ENV['rack.logger'] end end end Errplane.configure(true) do |config| config.logger ||= Errplane::get_logger config.rails_environment ||= settings.environment if defined?(settings) config.application_root ||= settings.root if defined?(settings) config.framework = "Sinatra" config.framework_version = ::Sinatra::VERSION end if defined?(error) error do Errplane.transmit_unless_ignorable(request.env['sinatra.error'], request.env) raise request.env['sinatra.error'] end elsif defined?(Sinatra::Base) class Sinatra::Base error do Errplane.transmit_unless_ignorable(request.env['sinatra.error'], request.env) raise request.env['sinatra.error'] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
errplane-0.4.7 | lib/errplane/sinatra.rb |
errplane-0.4.6 | lib/errplane/sinatra.rb |