<commit_before># -*- encoding : utf-8 -*-
require 'yaml'

begin
  options = YAML.load_file(Rails.root.join('config', 'mandrill.yml'))[Rails.env]

  ActionMailer::Base.smtp_settings = {
    :address   => "smtp.mandrillapp.com",
    :port      => 587,
    :user_name => options['username'],
    :password  => options['password'],
    :domain    => 'heroku.com'
  }
  ActionMailer::Base.delivery_method = :smtp

  MandrillMailer.configure do |config|
    config.api_key = options['api_key']
  end
rescue LoadError
  puts "The Mandrill configuration (config/mandrill.yml) is missing or malformed"
  exit(1)
end
<commit_msg>Read env variables for Mandrill api_key, username, and password.<commit_after># -*- encoding : utf-8 -*-
require 'yaml'

begin
  options = YAML.load_file(Rails.root.join('config', 'mandrill.yml'))[Rails.env]

  ActionMailer::Base.smtp_settings = {
    :address   => "smtp.mandrillapp.com",
    :port      => 587,
    :user_name => ENV["MANDRILL_USERNAME"],
    :password  => ENV["<PASSWORD>"],
    :domain    => 'heroku.com'
  }
  ActionMailer::Base.delivery_method = :smtp

  MandrillMailer.configure do |config|
    config.api_key = ENV["MANDRILL_API_KEY"]
  end
rescue LoadError
  puts "The Mandrill configuration (config/mandrill.yml) is missing or malformed"
  exit(1)
end

{'fraction_non_alphanumeric': 0.14726291441788744, 'fraction_numerical': 0.007710100231303007, 'mean_word_length': 3.8796992481203008, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 14, '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': '4009820', 'n_tokens_mistral': 484, 'n_tokens_neox': 456, 'n_words': 90}