<commit_before>require 'rubygems'

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'

if ENV['RAILS_ENV'] == 'test'
  require 'simplecov'
  SimpleCov.start 'rails'
  class SimpleCov::Formatter::QualityFormatter
    def format(result)
      SimpleCov::Formatter::HTMLFormatter.new.format(result)
      File.open("coverage/covered_percent", "w") do |f|
        f.puts result.source_files.covered_percent.to_f
      end
    end
  end
  SimpleCov.formatter = SimpleCov::Formatter::QualityFormatter
end

require 'subordinate'
require 'vcr'
require "webmock/rspec"
require "mocha/api"

authentications = YAML::load(File.open(File.expand_path("../fixtures/authentications.yml", __FILE__)))
VCR.configure do |c|
  c.cassette_library_dir = 'spec/cassettes'<commit_msg>load auth items into an ENV variable instead of hash<commit_after>require 'rubygems'

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'

if ENV['RAILS_ENV'] == 'test'
  require 'simplecov'
  SimpleCov.start 'rails'
  class SimpleCov::Formatter::QualityFormatter
    def format(result)
      SimpleCov::Formatter::HTMLFormatter.new.format(result)
      File.open("coverage/covered_percent", "w") do |f|
        f.puts result.source_files.covered_percent.to_f
      end
    end
  end
  SimpleCov.formatter = SimpleCov::Formatter::QualityFormatter
end

require 'subordinate'
require 'vcr'
require "webmock/rspec"
require "mocha/api"

authentications = File.open(File.expand_path("../fixtures/authentications.yml", __FILE__))
if File.exists?(authentications)
  ENV.update YAML::load(File.open(authentications))
end

VCR.configure do |c|
  c.cassette_library_dir = 'spec/cassettes'
{'fraction_non_alphanumeric': 0.12406662837449742, 'fraction_numerical': 0.0, 'mean_word_length': 5.027681660899654, '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': '3471201', 'n_tokens_mistral': 608, 'n_tokens_neox': 585, 'n_words': 125}