<commit_before>require 'rubygems'
require 'test/unit'
gem 'activerecord', '>= 3.0.0'
require 'active_record'

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$:.unshift(File.dirname(__FILE__))
require 'nestable'

# ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => ':memory:'

def setup_tables
  ActiveRecord::Base.connection.tables.each { |table| ActiveRecord::Base.connection.drop_table(table) }
  silence_stream(STDOUT) do
    ActiveRecord::Schema.define(:version => 1) do
      create_table :categories do |t|
        t.integer  :site_id
        t.integer  :parent_id
        t.integer  :level # optional
      end

      create_table :nests do |t|
        t.integer  :site_id
        t.integer  :parent_id
      end

      create_table :pages do |t|<commit_msg>remove commented out line<commit_after>require 'rubygems'
require 'test/unit'
gem 'activerecord', '>= 3.0.0'
require 'active_record'

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$:.unshift(File.dirname(__FILE__))
require 'nestable'

ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => ':memory:'

def setup_tables
  ActiveRecord::Base.connection.tables.each { |table| ActiveRecord::Base.connection.drop_table(table) }
  silence_stream(STDOUT) do
    ActiveRecord::Schema.define(:version => 1) do
      create_table :categories do |t|
        t.integer  :site_id
        t.integer  :parent_id
        t.integer  :level # optional
      end

      create_table :nests do |t|
        t.integer  :site_id
        t.integer  :parent_id
      end

      create_table :pages do |t|
{'fraction_non_alphanumeric': 0.1358989777510523, 'fraction_numerical': 0.006013229104028864, 'mean_word_length': 3.727272727272727, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6570596', 'n_tokens_mistral': 559, 'n_tokens_neox': 538, 'n_words': 112}