<commit_before>require 'simplecov'
require 'coveralls'

SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start do
  add_filter '/spec/'
end

require 'rspec'
require 'octoauth'

require 'webmock/rspec'
WebMock.disable_net_connect!(allow_localhost: true)

module WebMock
  ##
  # Patch WebMock to allow Structs as response bodies
  class Response
    def assert_valid_body!
      true
    end
  end
end<commit_msg>add initial vcr support<commit_after>require 'simplecov'
require 'coveralls'

SimpleCov.formatter = Coveralls::SimpleCov::Formatter
SimpleCov.start do
  add_filter '/spec/'
end

require 'rspec'
require 'octoauth'

require 'vcr'
VCR.configure do |c|
  c.cassette_library_dir = 'spec/fixtures/cassettes'
  c.hook_into :webmock
  c.before_record do |i|
    i.request.headers.delete 'Authorization'
    %w(Etag X-Github-Request-Id X-Served-By).each do |header|
      i.response.headers.delete header
    end
  end
end

{'fraction_non_alphanumeric': 0.09670563230605739, 'fraction_numerical': 0.0, 'mean_word_length': 4.508771929824562, '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': '2715208', 'n_tokens_mistral': 328, 'n_tokens_neox': 327, 'n_words': 78}