<commit_before>require "teaspoon/exceptions"

module Teaspoon
  module Environment

    def self.load(options = {})
      unless rails_loaded?
        require_environment(options[:environment])
        raise "Rails environment not found." unless rails_loaded?
      end

      require "teaspoon"
      require "teaspoon/suite"
      require "teaspoon/server"
      require "teaspoon/exception_handling"

      configure_from_options(options)
    end

    def self.require_environment(override = nil)
      return require_env(File.expand_path(override, Dir.pwd)) if override

      standard_environments.each do |filename|
        file = File.expand_path(filename, Dir.pwd)<commit_msg>loads teaspoon_env.rb for rake task as well. #129<commit_after>require "teaspoon/exceptions"

module Teaspoon
  module Environment

    def self.load(options = {})
      require_environment(options[:environment])
      raise "Rails environment not found." unless rails_loaded?

      require "teaspoon"
      require "teaspoon/suite"
      require "teaspoon/server"
      require "teaspoon/exception_handling"

      configure_from_options(options)
    end

    def self.require_environment(override = nil)
      return require_env(File.expand_path(override, Dir.pwd)) if override

      standard_environments.each do |filename|
        file = File.expand_path(filename, Dir.pwd)
{'fraction_non_alphanumeric': 0.08217168011738811, 'fraction_numerical': 0.0022010271460014674, 'mean_word_length': 3.5016501650165015, 'pattern_counts': {'":': 0, '<': 3, '<?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': '786561', 'n_tokens_mistral': 401, 'n_tokens_neox': 384, 'n_words': 89}