<commit_before>require 'rubygems'

unless ENV['NO_COVERALLS']
  require 'simplecov' if RUBY_VERSION.to_f > 1.8
  require 'coveralls'
  Coveralls.wear! do
    add_filter '/bundle/'
    add_filter '/spec/'
    add_filter '/tmp/'
  end
end

begin
  require 'spork'
rescue LoadError
  module Spork
    def self.prefork
      yield
    end

    def self.each_run
      yield
    end
  end
end

Spork.prefork do
  require 'rspec/autorun'
  require 'aruba/api'

  if RUBY_PLATFORM == 'java'
    # Works around https://jira.codehaus.org/browse/JRUBY-5678
    require 'fileutils'
    ENV['TMPDIR'] = File.expand_path('../../tmp', __FILE__)
    FileUtils.mkdir_p(ENV['TMPDIR'])
  end

  Dir['./spec/support/**/*.rb'].map {|f| require f}

  class NullObject
    private
    def method_missing(method, *args, &block)<commit_msg>Silence ruby warnings from 3rd party libs.<commit_after>require 'rubygems' if RUBY_VERSION.to_f < 1.9

begin
  require 'spork'
rescue LoadError
  module Spork
    def self.prefork
      yield
    end

    def self.each_run
      yield
    end
  end
end

Spork.prefork do
  old_verbose, $VERBOSE = $VERBOSE, false
  if ENV['TRAVIS'] && !ENV['NO_COVERALLS']
    require 'simplecov' if RUBY_VERSION.to_f > 1.8
    require 'coveralls'
    Coveralls.wear! do
      add_filter '/bundle/'
      add_filter '/spec/'
      add_filter '/tmp/'
    end
  end
  require 'aruba/api'
  $VERBOSE = old_verbose

  if RUBY_PLATFORM == 'java'
    # Works around https://jira.codehaus.org/browse/JRUBY-5678
    require 'fileutils'
    ENV['TMPDIR'] = File.expand_path('../../tmp', __FILE__)
    FileUtils.mkdir_p(ENV['TMPDIR'])
  end

  Dir['./spec/support/**/*.rb'].map {|f| require f}

  class NullObject
    private
    def method_missing(method, *args, &block)
{'fraction_non_alphanumeric': 0.12670454545454546, 'fraction_numerical': 0.008522727272727272, 'mean_word_length': 2.9308035714285716, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6050987', 'n_tokens_mistral': 670, 'n_tokens_neox': 642, 'n_words': 149}