<commit_before>require 'ostruct'
require 'yaml'

module APIConfig

  VERSION = '0.1.0'
  FILE    = 'config/api.yml'

  class Error < StandardError
  end

  class << self
    def env
      ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
    end

    def method_missing(m, *args, &block)
      configuration.public_send(m)
    end

    def reload!
      @configuration = nil
      configuration
    end

    protected
      def configuration
        @configuration ||= DeepStruct.new YAML.load_file(FILE).fetch(APIConfig.env)
      end
  end

  class DeepStruct < OpenStruct<commit_msg>Bump v0.2.0<commit_after>require 'ostruct'
require 'yaml'

module APIConfig

  VERSION = '0.2.0'
  FILE    = 'config/api.yml'

  class Error < StandardError
  end

  class << self
    def env
      ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
    end

    def method_missing(m, *args, &block)
      configuration.public_send(m)
    end

    def reload!
      @configuration = nil
      configuration
    end

    protected
      def configuration
        @configuration ||= DeepStruct.new YAML.load_file(FILE).fetch(APIConfig.env)
      end
  end

  class DeepStruct < OpenStruct
{'fraction_non_alphanumeric': 0.10204081632653061, 'fraction_numerical': 0.007653061224489796, 'mean_word_length': 2.6552795031055902, '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': '184828', 'n_tokens_mistral': 400, 'n_tokens_neox': 373, 'n_words': 90}