<commit_before>$:.unshift File.expand_path('..', __FILE__)
$:.unshift File.expand_path('../../lib', __FILE__)

require 'rubygems'

require 'simplecov'

SimpleCov.start

require 'henson'

require 'rspec'
require 'mocha_standalone'
require 'fakeweb'

RSpec.configure do |config|
  config.before(:all) do
    @stdout = $stdout
    @stderr = $stderr

    $stdout = File.new('spec/fixtures/stdout.log', 'w+')
    $stderr = File.new('spec/fixtures/stderr.log', 'w+')
  end

  config.after(:all) do
    require 'fileutils'

    $stdout = @stdout
    $stderr = @stderr

    FileUtils.rm_rf('spec/fixtures/*.log')
  end

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end
end

module Henson<commit_msg>Filter out vendor/gems from simplecov results<commit_after>$:.unshift File.expand_path('..', __FILE__)
$:.unshift File.expand_path('../../lib', __FILE__)

require 'rubygems'

require 'simplecov'

SimpleCov.start do
  add_filter '/vendor/gems/'
end

require 'henson'

require 'rspec'
require 'mocha_standalone'
require 'fakeweb'

RSpec.configure do |config|
  config.before(:all) do
    @stdout = $stdout
    @stderr = $stderr

    $stdout = File.new('spec/fixtures/stdout.log', 'w+')
    $stderr = File.new('spec/fixtures/stderr.log', 'w+')
  end

  config.after(:all) do
    require 'fileutils'

    $stdout = @stdout
    $stderr = @stderr

    FileUtils.rm_rf('spec/fixtures/*.log')
  end

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end
end

module Henson
{'fraction_non_alphanumeric': 0.15405405405405406, 'fraction_numerical': 0.0, 'mean_word_length': 3.657232704402516, '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': '6158458', 'n_tokens_mistral': 544, 'n_tokens_neox': 527, 'n_words': 118}