<commit_before>$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rubygems'
require 'rspec'
require 'active_schema'
require 'connection'
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.include(ActiveSchemaMatchers)
end

def load_schema(name)
  ActiveRecord::Migration.suppress_messages do
    eval(File.read(File.join(File.dirname(__FILE__), 'schema', name)))
  end
end

def load_core_schema
  ActiveSchema.config.foreign_keys.auto_create = false;
  load_schema('core_schema.rb')<commit_msg>Use Railties to insert the plugin.  This forces a dependency on rails 3, but I'm OK with that.<commit_after>$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rubygems'
require 'rspec'
require 'active_record'
require 'active_schema'
require 'connection'

ActiveSchema.insert_into_active_record

Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}

RSpec.configure do |config|
  config.include(ActiveSchemaMatchers)
end

def load_schema(name)
  ActiveRecord::Migration.suppress_messages do
    eval(File.read(File.join(File.dirname(__FILE__), 'schema', name)))
  end
end

def load_core_schema
  ActiveSchema.config.foreign_keys.auto_create = false;
  load_schema('core_schema.rb')
{'fraction_non_alphanumeric': 0.13800578034682082, 'fraction_numerical': 0.000722543352601156, 'mean_word_length': 6.651933701657459, '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': '1262057', 'n_tokens_mistral': 466, 'n_tokens_neox': 460, 'n_words': 89}