lib/airbrake/rake/tasks.rb in airbrake-6.2.0 vs lib/airbrake/rake/tasks.rb in airbrake-6.2.1

- old
+ new

@@ -28,23 +28,23 @@ end end desc 'Notify Airbrake of a new deploy' task :deploy do - unless Airbrake.configured? - raise Airbrake::Error, 'airbrake-ruby is not configured' - end - if defined?(Rails) initializer = Rails.root.join('config', 'initializers', 'airbrake.rb') # Avoid loading the environment to speed up the deploy task and try guess # the initializer file location. if initializer.exist? && !Airbrake.configured? load(initializer) else Rake::Task[:environment].invoke end + end + + unless Airbrake.configured? + raise Airbrake::Error, 'airbrake-ruby is not configured' end deploy_params = { environment: ENV['ENVIRONMENT'], username: ENV['USERNAME'],