<commit_before># Defines deploy:notify_airbrake which will send information about the deploy to Airbrake.

Capistrano::Configuration.instance(:must_exist).load do
  after "deploy",            "deploy:notify_airbrake"
  after "deploy:migrations", "deploy:notify_airbrake"

  namespace :deploy do
    desc "Notify Airbrake of the deployment"
    task :notify_airbrake, :except => { :no_release => true } do
      rails_env = fetch(:airbrake_env, fetch(:rails_env, "production"))
      local_user = ENV['USER'] || ENV['USERNAME']
      executable = RUBY_PLATFORM.downcase.include?('mswin') ? fetch(:rake, 'rake.bat') : fetch(:rake, 'rake')
      notify_command = "#{executable} airbrake:deploy TO=#{rails_env} REVISION=#{current_revision} REPO=#{repository} USER=#{local_user}"
      notify_command << " DRY_RUN=true" if dry_run
      notify_command << " API_KEY=#{ENV['API_KEY']}" if ENV['API_KEY']
      puts "Notifying Airbrake of Deploy (#{notify_command})"
      `#{notify_command}`
      puts "Airbrake Notification Complete."
    end
  end
end<commit_msg>Using the Capistrano logger for great justice<commit_after># Defines deploy:notify_airbrake which will send information about the deploy to Airbrake.

Capistrano::Configuration.instance(:must_exist).load do
  after "deploy",            "deploy:notify_airbrake"
  after "deploy:migrations", "deploy:notify_airbrake"

  namespace :deploy do
    desc "Notify Airbrake of the deployment"
    task :notify_airbrake, :except => { :no_release => true } do
      rails_env = fetch(:airbrake_env, fetch(:rails_env, "production"))
      local_user = ENV['USER'] || ENV['USERNAME']
      executable = RUBY_PLATFORM.downcase.include?('mswin') ? fetch(:rake, 'rake.bat') : fetch(:rake, 'rake')
      notify_command = "#{executable} airbrake:deploy TO=#{rails_env} REVISION=#{current_revision} REPO=#{repository} USER=#{local_user}"
      notify_command << " DRY_RUN=true" if dry_run
      notify_command << " API_KEY=#{ENV['API_KEY']}" if ENV['API_KEY']
      logger.info "Notifying Airbrake of Deploy (#{notify_command})"
      `#{notify_command}`
      logger.info "Airbrake Notification Complete."
    end
  end
end
{'fraction_non_alphanumeric': 0.133086876155268, 'fraction_numerical': 0.0, 'mean_word_length': 4.712401055408971, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5800821', 'n_tokens_mistral': 711, 'n_tokens_neox': 694, 'n_words': 159}