Class: Rack::BugzScout
- Inherits:
-
Object
- Object
- Rack::BugzScout
- Defined in:
- lib/rack_bugzscout.rb
Overview
Catches all exceptions raised, and submits them to FogBugz via BugzScout.
Instance Attribute Summary collapse
-
#fogbugz_area ⇒ Object
readonly
Returns the value of attribute fogbugz_area.
-
#fogbugz_project ⇒ Object
readonly
Returns the value of attribute fogbugz_project.
-
#fogbugz_url ⇒ Object
readonly
Returns the value of attribute fogbugz_url.
-
#fogbugz_user ⇒ Object
readonly
Returns the value of attribute fogbugz_user.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, fogbugz_url, fogbugz_user, fogbugz_project = 'inbox', fogbugz_area = 'undecided') ⇒ BugzScout
constructor
A new instance of BugzScout.
Constructor Details
#initialize(app, fogbugz_url, fogbugz_user, fogbugz_project = 'inbox', fogbugz_area = 'undecided') ⇒ BugzScout
Returns a new instance of BugzScout.
10 11 12 13 14 15 16 |
# File 'lib/rack_bugzscout.rb', line 10 def initialize(app,fogbugz_url,fogbugz_user,fogbugz_project='inbox',fogbugz_area='undecided') @app = app @fogbugz_url = fogbugz_url @fogbugz_user = fogbugz_user @fogbugz_project = fogbugz_project @fogbugz_area = fogbugz_area end |
Instance Attribute Details
#fogbugz_area ⇒ Object (readonly)
Returns the value of attribute fogbugz_area.
8 9 10 |
# File 'lib/rack_bugzscout.rb', line 8 def fogbugz_area @fogbugz_area end |
#fogbugz_project ⇒ Object (readonly)
Returns the value of attribute fogbugz_project.
8 9 10 |
# File 'lib/rack_bugzscout.rb', line 8 def fogbugz_project @fogbugz_project end |
#fogbugz_url ⇒ Object (readonly)
Returns the value of attribute fogbugz_url.
8 9 10 |
# File 'lib/rack_bugzscout.rb', line 8 def fogbugz_url @fogbugz_url end |
#fogbugz_user ⇒ Object (readonly)
Returns the value of attribute fogbugz_user.
8 9 10 |
# File 'lib/rack_bugzscout.rb', line 8 def fogbugz_user @fogbugz_user end |
Instance Method Details
#call(env) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rack_bugzscout.rb', line 18 def call(env) status, headers, body = begin @app.call(env) rescue => boom send_notification boom, env raise end send_notification env['rack.exception'], env if env['rack.exception'] [status, headers, body] end |