<commit_before>require File.expand_path('../../test_helper', __FILE__)

require "logger"
require "active_record"
require "active_support"

# ActiveRecord::Base.logger = Logger.new($stdout)

require File.expand_path("../../../lib/friendly_id/active_record", __FILE__)
require File.expand_path("../../../generators/friendly_id/templates/create_slugs", __FILE__)
require File.expand_path("../support/models", __FILE__)
require File.expand_path('../core', __FILE__)
require File.expand_path('../slugged', __FILE__)
<commit_msg>Sets up logger for ActiveRecord 3.<commit_after>require File.expand_path('../../test_helper', __FILE__)

require "logger"
require "active_record"
require "active_support"

# If you want to see the ActiveRecord log, invoke the tests using `rake test LOG=true`
if ENV["LOG"]
  ActiveRecord::Base.logger = Logger.new($stdout)
  if ActiveRecord::VERSION::STRING >= "3"
    require "rails/log_subscriber/test_helper"
    require "active_record/railties/log_subscriber"
    ActiveRecord::Base.logger.level = Logger::DEBUG
    Rails::LogSubscriber.add(:active_record, ActiveRecord::Railties::LogSubscriber.new)
  end
end


require File.expand_path("../../../lib/friendly_id/active_record", __FILE__)
require File.expand_path("../../../generators/friendly_id/templates/create_slugs", __FILE__)
require File.expand_path("../support/models", __FILE__)
require File.expand_path('../core', __FILE__)
require File.expand_path('../slugged', __FILE__)

{'fraction_non_alphanumeric': 0.15753424657534246, 'fraction_numerical': 0.0013698630136986301, 'mean_word_length': 5.464601769911504, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5441548', 'n_tokens_mistral': 444, 'n_tokens_neox': 441, 'n_words': 87}