lib/airbrake/rails3_tasks.rb in airbrake-3.1.10 vs lib/airbrake/rails3_tasks.rb in airbrake-3.1.11

- old
+ new

@@ -1,8 +1,18 @@ require 'airbrake' require File.join(File.dirname(__FILE__), 'shared_tasks') +# Override error handling in Rack so we don't clutter STDERR +# with unnecesarry stack trace +Rake.application.instance_eval do + class << self + def display_error_message(exception) + puts exception + end + end +end + namespace :airbrake do desc "Verify your gem installation by sending a test exception to the airbrake service" task :test => [:environment] do Rails.logger = defined?(ActiveSupport::TaggedLogging) ? ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) : @@ -25,9 +35,10 @@ Airbrake.configure(true) do |config| config.logger = Rails.logger end # Override Rails exception middleware, so we stop cluttering STDOUT + # with stack trace from Rails class ActionDispatch::DebugExceptions; def call(env); @app.call(env); end; end class ActionDispatch::ShowExceptions; def call(env); @app.call(env); end; end require './app/controllers/application_controller'