<commit_before># -*- encoding : utf-8 -*-
require File.expand_path('../../environment', __FILE__)
require 'cequel'
require 'tzinfo'

Dir.glob(File.expand_path('../../support/**/*.rb', __FILE__)).each do |file|
  require file
end
Dir.glob(File.expand_path('../../shared/**/*.rb', __FILE__)).each do |file|
  require file
end

RSpec.configure do |config|
  config.include(Cequel::SpecSupport::Helpers)
  config.extend(Cequel::SpecSupport::Macros)

  config.filter_run_excluding rails: ->(requirement) {
    !Gem::Requirement.new(requirement).
      satisfied_by?(Gem::Version.new(ActiveSupport::VERSION::STRING))
  }

  unless defined? CassandraCQL
    config.filter_run_excluding thrift: true
  end

  config.before(:all) do
    cequel.schema.create!
    Cequel::Record.connection = cequel
    Time.zone = 'UTC'
    I18n.enforce_available_locales = false
    SafeYAML::OPTIONS[:default_mode] = :safe
  end

  config.after(:all) do
    cequel.schema.drop!
  end
end

if defined? byebug
  Kernel.module_eval { alias_method :debugger, :byebug }
end<commit_msg>Version compatibility for spec helper<commit_after># -*- encoding : utf-8 -*-
require File.expand_path('../../environment', __FILE__)
require 'cequel'
require 'tzinfo'

Dir.glob(File.expand_path('../../support/**/*.rb', __FILE__)).each do |file|
  require file
end
Dir.glob(File.expand_path('../../shared/**/*.rb', __FILE__)).each do |file|
  require file
end

RSpec.configure do |config|
  config.include(Cequel::SpecSupport::Helpers)
  config.extend(Cequel::SpecSupport::Macros)

  config.filter_run_excluding rails: ->(requirement) {
    !Gem::Requirement.new(requirement).
      satisfied_by?(Gem::Version.new(ActiveSupport::VERSION::STRING))
  }

  unless defined? CassandraCQL
    config.filter_run_excluding thrift: true
  end

  config.before(:all) do
    cequel.schema.create!
    Cequel::Record.connection = cequel
    Time.zone = 'UTC'
    I18n.enforce_available_locales = false
    SafeYAML::OPTIONS[:default_mode] = :safe if defined? SafeYAML
  end

  config.after(:all) do
    cequel.schema.drop!
  end
end

if defined? byebug
  Kernel.module_eval { alias_method :debugger, :byebug }
end
{'fraction_non_alphanumeric': 0.14974501622624015, 'fraction_numerical': 0.0027816411682892906, 'mean_word_length': 4.237864077669903, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3685237', 'n_tokens_mistral': 748, 'n_tokens_neox': 730, 'n_words': 138}