<commit_before>require 'rubygems'
ENV['RACK_ENV'] = 'test'

module SharedContext
  def self.included(klass)
    klass.class_eval <<-RUBY
      require 'rack'
      require 'rspec'
      require 'truss-router'
      require 'active_support'

      RSpec.configure do |config|
          config.treat_symbols_as_metadata_keys_with_true_values = true
          config.run_all_when_everything_filtered = true
          config.filter_run :focus
          config.backtrace_clean_patterns << /gems/
          config.order = 'random'
      end

      Dir['spec/support.*.rb'].each { |file| require file }
    RUBY
  end
end

if RUBY_ENGINE =~ /rbx/ || RUBY_ENGINE =~ /jruby/
  include SharedContext
  require 'truss'
else
  require 'spork'
  Spork.prefork do
    include SharedContext
  end

  Spork.each_run do
    require 'truss'
  end
end<commit_msg>Yeessssss, this would be better.<commit_after>require 'rubygems'
ENV['RACK_ENV'] = 'test'

module SharedContext
  def self.included(klass)
    klass.class_eval <<-RUBY
      require 'rack'
      require 'rspec'
      require 'truss-router'
      require 'active_support'

      RSpec.configure do |config|
          config.treat_symbols_as_metadata_keys_with_true_values = true
          config.run_all_when_everything_filtered = true
          config.filter_run :focus
          config.backtrace_clean_patterns << /gems/
          config.order = 'random'
      end

      Dir['spec/support.*.rb'].each { |file| require file }
    RUBY
  end
end

if RUBY_ENGINE =~ /(rbx|jruby)/
  include SharedContext
  require 'truss'
else
  require 'spork'
  Spork.prefork do
    include SharedContext
  end

  Spork.each_run do
    require 'truss'
  end
end
{'fraction_non_alphanumeric': 0.0905861456483126, 'fraction_numerical': 0.0, 'mean_word_length': 2.7723214285714284, 'pattern_counts': {'":': 0, '<': 11, '<?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': '2805924', 'n_tokens_mistral': 590, 'n_tokens_neox': 556, 'n_words': 125}