Class: Rack::Failtale
- Inherits:
-
Object
- Object
- Rack::Failtale
- Defined in:
- lib/rack/failtale.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, api_key = nil) ⇒ Failtale
constructor
A new instance of Failtale.
Constructor Details
#initialize(app, api_key = nil) ⇒ Failtale
Returns a new instance of Failtale.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rack/failtale.rb', line 8 def initialize(app, api_key = nil) @app = app FailtaleReporter.configure do |config| config.default_reporter "rack" config.api_token api_key config.application_root ::File.dirname(::File.dirname(__FILE__)) config.information_collector do |error,env| error.environment.merge!(env) end end end |
Instance Method Details
#call(env) ⇒ Object
20 21 22 23 24 |
# File 'lib/rack/failtale.rb', line 20 def call(env) FailtaleReporter.report(nil,env) do @app.call(env) end end |