<commit_before># encoding: utf-8

begin
  require 'reek/rake/task'


  allowed_failures = %w(mri-1.9.2 rbx-1.7.7)
  allow_failure = allowed_failures.include?(Devtools.rvm)

  namespace :metrics do
    Reek::Rake::Task.new do |t|
      # reek has some problems under rbx in 1.8 mode that cause the underlying
      # script to raise an exception. Rather than halt the "rake ci" process due
      # to one bug, we choose to ignore it in this specific case until reek can be
      # fixed.
      t.fail_on_error = !allow_failure
    end
  end
rescue LoadError
  namespace :metrics do
    task :reek do
      $stderr.puts 'Reek is not available. In order to run reek, you must: gem install reek'
    end<commit_msg>Correctly allow reek failure on rbx-1.8.7<commit_after># encoding: utf-8

begin
  require 'reek/rake/task'


  allowed_failures = %w(mri-1.9.2 rbx-1.8.7)
  allow_failure = allowed_failures.include?(Devtools.rvm)

  namespace :metrics do
    Reek::Rake::Task.new do |t|
      # reek has some problems under rbx in 1.8 mode that cause the underlying
      # script to raise an exception. Rather than halt the "rake ci" process due
      # to one bug, we choose to ignore it in this specific case until reek can be
      # fixed.
      t.fail_on_error = !allow_failure
    end
  end
rescue LoadError
  namespace :metrics do
    task :reek do
      $stderr.puts 'Reek is not available. In order to run reek, you must: gem install reek'
    end
{'fraction_non_alphanumeric': 0.07931034482758621, 'fraction_numerical': 0.014482758620689656, 'mean_word_length': 2.932249322493225, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4591058', 'n_tokens_mistral': 480, 'n_tokens_neox': 472, 'n_words': 180}