<commit_before>class ExampleSuite
  def run
    run_core_examples
    run_rspec_examples
    run_test_unit_examples
  end

  def run_core_examples
    system("ruby #{dir}/core_spec_suite.rb #{spec_opts}") || raise("Core suite Failed")
  end

  def run_rspec_examples
    system("ruby #{dir}/rspec_spec_suite.rb #{spec_opts}") || raise("Rspec suite Failed")
  end

  def run_test_unit_examples
    system("ruby #{dir}/test_unit_spec_suite.rb") || raise("Test::Unit suite Failed")
  end

  def spec_opts
    File.read("#{dir}/spec.opts").split("\n").join(" ")
  end

  def dir
    File.dirname(__FILE__)
  end
end

if $0 == __FILE__
  ExampleSuite.new.run<commit_msg>Enable Ruby warnings during spec suite<commit_after>class ExampleSuite
  def run
    run_core_examples
    run_rspec_examples
    run_test_unit_examples
  end

  def run_core_examples
    system("ruby -W #{dir}/core_spec_suite.rb #{spec_opts}") || raise("Core suite Failed")
  end

  def run_rspec_examples
    system("ruby -W #{dir}/rspec_spec_suite.rb #{spec_opts}") || raise("Rspec suite Failed")
  end

  def run_test_unit_examples
    system("ruby -W #{dir}/test_unit_spec_suite.rb") || raise("Test::Unit suite Failed")
  end

  def spec_opts
    File.read("#{dir}/spec.opts").split("\n").join(" ")
  end

  def dir
    File.dirname(__FILE__)
  end
end

if $0 == __FILE__
  ExampleSuite.new.run
{'fraction_non_alphanumeric': 0.12683284457478006, 'fraction_numerical': 0.001466275659824047, 'mean_word_length': 4.018382352941177, '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': '1503347', 'n_tokens_mistral': 494, 'n_tokens_neox': 463, 'n_words': 101}