<commit_before>require 'simplecov'
SimpleCov.start

require 'bundler/setup'
require 'counter_culture'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rails/all'

module PapertrailSupport
  def self.supported_here?
    return false if Gem::Version.new(Rails.version) < Gem::Version.new('5.0.0')
    return false if Gem::Version.new(Rails.version) >= Gem::Version.new('6.1.0')
    return false if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.0.0')
    true
  end
end

require 'rspec'
require 'timecop'

if PapertrailSupport.supported_here?
  require 'paper_trail'
  require 'paper_trail/frameworks/active_record/models/paper_trail/version'
  require 'paper_trail/frameworks/rspec'
end

case ENV['DB']
when 'postgresql'
  require 'pg'
when 'mysql2'
  require 'mysql2'
else
  require 'sqlite3'
end

CI_TEST_RUN = (ENV['TRAVIS'] && 'TRAVIS') \
                || (ENV['CIRCLECI'] && 'CIRCLE') \
                || ENV['CI'] \
                && 'CI'

DB_CONFIG = {
  defaults: {
    pool: 5,<commit_msg>Re-enable paper_trail tests with newest Rails and Ruby (#315)<commit_after>require 'simplecov'
SimpleCov.start

require 'bundler/setup'
require 'counter_culture'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rails/all'

module PapertrailSupport
  def self.supported_here?
    return false if Gem::Version.new(Rails.version) < Gem::Version.new('5.0.0')
    true
  end
end

require 'rspec'
require 'timecop'

if PapertrailSupport.supported_here?
  require 'paper_trail'
  require "paper_trail/frameworks/active_record"
  require 'paper_trail/frameworks/active_record/models/paper_trail/version'
  require 'paper_trail/frameworks/rspec'
end

case ENV['DB']
when 'postgresql'
  require 'pg'
when 'mysql2'
  require 'mysql2'
else
  require 'sqlite3'
end

CI_TEST_RUN = (ENV['TRAVIS'] && 'TRAVIS') \
                || (ENV['CIRCLECI'] && 'CIRCLE') \
                || ENV['CI'] \
                && 'CI'

DB_CONFIG = {
  defaults: {
    pool: 5,
{'fraction_non_alphanumeric': 0.14551526717557253, 'fraction_numerical': 0.01097328244274809, 'mean_word_length': 3.9574468085106385, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2715207', 'n_tokens_mistral': 775, 'n_tokens_neox': 756, 'n_words': 143}