Class: Bugsnag::Middleware::Rake
- Inherits:
-
Object
- Object
- Bugsnag::Middleware::Rake
- Defined in:
- lib/bugsnag/middleware/rake.rb
Overview
Extracts and attaches rake task information to an error report
Instance Method Summary collapse
- #call(report) ⇒ Object
-
#initialize(bugsnag) ⇒ Rake
constructor
A new instance of Rake.
Constructor Details
#initialize(bugsnag) ⇒ Rake
Returns a new instance of Rake.
5 6 7 |
# File 'lib/bugsnag/middleware/rake.rb', line 5 def initialize(bugsnag) @bugsnag = bugsnag end |
Instance Method Details
#call(report) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bugsnag/middleware/rake.rb', line 9 def call(report) task = report.request_data[:bugsnag_running_task] if task report.add_tab(:rake_task, { :name => task.name, :description => task.full_comment, :arguments => task.arg_description }) report.automatic_context ||= task.name end @bugsnag.call(report) end |