<commit_before>require 'rubygems'

if RUBY_VERSION =~ /1.9/ && RUBY_ENGINE == 'ruby'
  require 'simplecov'

  SimpleCov.start do
    add_filter "/spec"
    add_filter "/features"
    add_filter "/bin"
    add_filter "/bundle"

    # internet_connection mostly contains logic copied from the ruby 1.8.7
    # stdlib for which I haven't written tests.
    add_filter "internet_connection"
  end

  SimpleCov.at_exit do
    File.open(File.join(SimpleCov.coverage_path, 'coverage_percent.txt'), 'w') do |f|
      f.write SimpleCov.result.covered_percent
    end
    SimpleCov.result.format!
  end
end

using_git = File.exist?(File.expand_path('../../.git/', __FILE__))
require 'bundler/setup' if using_git

require 'rspec'

require "support/fixnum_extension"
require "support/limited_uri"
require "support/ruby_interpreter"
require "support/shared_example_groups/hook_into_http_library"
require "support/shared_example_groups/request_hooks"
require "support/sinatra_app"
require "support/vcr_localhost_server"
require "support/vcr_stub_helpers"

require 'vcr'<commit_msg>Setup bundler before loading simplecov.<commit_after>require 'rubygems'

using_git = File.exist?(File.expand_path('../../.git/', __FILE__))
require 'bundler/setup' if using_git

if RUBY_VERSION =~ /1.9/ && RUBY_ENGINE == 'ruby'
  require 'simplecov'

  SimpleCov.start do
    add_filter "/spec"
    add_filter "/features"
    add_filter "/bin"
    add_filter "/bundle"

    # internet_connection mostly contains logic copied from the ruby 1.8.7
    # stdlib for which I haven't written tests.
    add_filter "internet_connection"
  end

  SimpleCov.at_exit do
    File.open(File.join(SimpleCov.coverage_path, 'coverage_percent.txt'), 'w') do |f|
      f.write SimpleCov.result.covered_percent
    end
    SimpleCov.result.format!
  end
end

require 'rspec'

require "support/fixnum_extension"
require "support/limited_uri"
require "support/ruby_interpreter"
require "support/shared_example_groups/hook_into_http_library"
require "support/shared_example_groups/request_hooks"
require "support/sinatra_app"
require "support/vcr_localhost_server"
require "support/vcr_stub_helpers"

require 'vcr'
{'fraction_non_alphanumeric': 0.10601851851851851, 'fraction_numerical': 0.004629629629629629, 'mean_word_length': 4.627604166666667, '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': '1159947', 'n_tokens_mistral': 739, 'n_tokens_neox': 726, 'n_words': 159}