# File lib/airbrake/capistrano/tasks.rb, line 31
      def self.load_into(config)
        config.load do
          after 'deploy',            'airbrake:deploy'
          after 'deploy:migrations', 'airbrake:deploy'
          after 'deploy:cold',       'airbrake:deploy'

          namespace :airbrake do
            desc "Notify Airbrake of the deploy"
            task :deploy, except: { no_release: true }, on_error: :continue do
              username = Shellwords.shellescape(ENV['USER'] || ENV['USERNAME'])
              command = "cd \#{config.release_path} && \\\n\nRACK_ENV=\#{fetch(:rack_env, nil)} \\\nRAILS_ENV=\#{fetch(:rails_env, nil)} \\\n\nbundle exec rake airbrake:deploy \\\nUSERNAME=\#{username} \\\nENVIRONMENT=\#{fetch(:rails_env, 'production')} \\\nREVISION=\#{current_revision.strip} \\\nREPOSITORY=\#{repository} \\\nVERSION=\#{fetch(:app_version, nil)}\n"

              run(command, once: true)
              logger.info 'Notified Airbrake of the deploy'
            end
          end
        end
      end