<commit_before>plugin_test_dir = File.dirname(__FILE__)

require 'rubygems'

require 'simplecov'
require 'coveralls'

if ENV["TRAVIS"]
  SimpleCov.formatter = Coveralls::SimpleCov::Formatter
end

SimpleCov.start do
  add_filter '/test'
end

require 'bundler/setup'
require 'pry'

require 'combustion'

require 'minitest/autorun'
require 'minitest/unit'
require 'minitest/spec'
require 'minitest/pride'
require 'minitest/benchmark' if ENV['BENCH']

require 'active_record'
require 'mongoid'

require 'consort'

require 'yaml'
require 'erb'
ActiveRecord::Base.configurations = YAML.load(ERB.new(IO.read(plugin_test_dir + '/db/database.yml')).result)
ActiveRecord::Base.establish_connection(ENV['DB'] ||= 'sqlite3mem')
ActiveRecord::Migration.verbose = false

require 'combustion/database'
Combustion::Database.create_database(ActiveRecord::Base.configurations[ENV["DB"]])
load(File.join(plugin_test_dir, 'db', 'schema.rb'))

require 'models'<commit_msg>Stash away unused requires for a rainy day<commit_after>plugin_test_dir = File.dirname(__FILE__)

require 'rubygems'

require 'simplecov'
require 'coveralls'

if ENV["TRAVIS"]
  SimpleCov.formatter = Coveralls::SimpleCov::Formatter
end

SimpleCov.start do
  add_filter '/test'
end

require 'bundler/setup'
require 'pry'

require 'combustion'

require 'minitest/autorun'
require 'minitest/unit'
require 'minitest/spec'
require 'minitest/pride'
require 'minitest/benchmark' if ENV['BENCH']

# require 'active_record'
# require 'mongoid'

require 'consort'

require 'yaml'
require 'erb'
ActiveRecord::Base.configurations = YAML.load(ERB.new(IO.read(plugin_test_dir + '/db/database.yml')).result)
ActiveRecord::Base.establish_connection(ENV['DB'] ||= 'sqlite3mem')
ActiveRecord::Migration.verbose = false

require 'combustion/database'
Combustion::Database.create_database(ActiveRecord::Base.configurations[ENV["DB"]])
load(File.join(plugin_test_dir, 'db', 'schema.rb'))

require 'models'
{'fraction_non_alphanumeric': 0.13746770025839794, 'fraction_numerical': 0.0010335917312661498, 'mean_word_length': 7.642857142857143, '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': '4781844', 'n_tokens_mistral': 680, 'n_tokens_neox': 676, 'n_words': 128}