<commit_before>require 'ginger'

def create_scenario(version)
  scenario = Ginger::Scenario.new("Rails #{version}")
  scenario[/^action_?mailer$/] = version
  scenario[/^action_?pack$/] = version
  scenario[/^active_?support$/] = version
  scenario
end

Ginger.configure do |config|
  config.aliases["action_mailer"] = "actionmailer"
  config.aliases["action_pack"] = "actionpack"
  config.aliases["active_support"] = "activesupport"

  # Rails 3 doesn't work on Ruby 1.8.6 or 1.9.1 so skip it.
  if RUBY_VERSION == '1.8.7'
    rails3 = create_scenario('3.0.0.beta')
    rails3['mail'] = '2.1.3'
    config.scenarios << rails3
  end

  %w( 2.3.8 2.3.5 2.3.4 2.3.3 2.3.2 ).each do |version|
    config.scenarios << create_scenario(version)
  end

  # Rails 2.3 was the first version that ran on ruby 1.9, so don't bother testing older versions.
  if RUBY_VERSION =~ /^1\.8/
    %w(
    2.2.3 2.2.2
    2.1.2 2.1.1 2.1.0
    2.0.5 2.0.4 2.0.2 2.0.1 2.0.0
    ).each do |version|
      config.scenarios << create_scenario(version)
    end

    rails126 = Ginger::Scenario.new("Rails 1.2.6")
    rails126[/^action_?mailer$/] = '1.3.6'<commit_msg>Woops, forgot to update the version number to beta4.<commit_after>require 'ginger'

def create_scenario(version)
  scenario = Ginger::Scenario.new("Rails #{version}")
  scenario[/^action_?mailer$/] = version
  scenario[/^action_?pack$/] = version
  scenario[/^active_?support$/] = version
  scenario
end

Ginger.configure do |config|
  config.aliases["action_mailer"] = "actionmailer"
  config.aliases["action_pack"] = "actionpack"
  config.aliases["active_support"] = "activesupport"

  # Rails 3 doesn't work on Ruby 1.8.6 or 1.9.1 so skip it.
  if RUBY_VERSION == '1.8.7'
    rails3 = create_scenario('3.0.0.beta4')
    rails3['mail'] = '2.1.3'
    config.scenarios << rails3
  end

  %w( 2.3.8 2.3.5 2.3.4 2.3.3 2.3.2 ).each do |version|
    config.scenarios << create_scenario(version)
  end

  # Rails 2.3 was the first version that ran on ruby 1.9, so don't bother testing older versions.
  if RUBY_VERSION =~ /^1\.8/
    %w(
    2.2.3 2.2.2
    2.1.2 2.1.1 2.1.0
    2.0.5 2.0.4 2.0.2 2.0.1 2.0.0
    ).each do |version|
      config.scenarios << create_scenario(version)
    end

    rails126 = Ginger::Scenario.new("Rails 1.2.6")
    rails126[/^action_?mailer$/] = '1.3.6'
{'fraction_non_alphanumeric': 0.16351118760757316, 'fraction_numerical': 0.07142857142857142, 'mean_word_length': 3.0933098591549295, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, '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': '1505093', 'n_tokens_mistral': 1022, 'n_tokens_neox': 941, 'n_words': 207}