<commit_before>require 'faraday'

module SBA
  module Configuration
    VALID_OPTIONS_KEYS = [
      :adapter,
      :endpoint,
      :user_agent,
      :proxy,
      :format].freeze

    VALID_FORMATS = [
      :json,
      :xml].freeze

    DEFAULT_ADAPTER      = Faraday.default_adapter
    DEFAULT_ENDPOINT     = nil
    DEFAULT_PROXY        = nil
    DEFAULT_FORMAT       = nil
    DEFAULT_USER_AGENT   = "SBA Ruby Gem #{SBA::VERSION}".freeze

    attr_accessor *VALID_OPTIONS_KEYS

    def self.extended(base)
      base.reset
    end

    def configure
      yield self
    end

    def options
      VALID_OPTIONS_KEYS.inject({}){|o,k| o.merge!(k => send(k)) }
    end

    def reset
      self.adapter      = DEFAULT_ADAPTER
      self.user_agent   = DEFAULT_USER_AGENT
      self.endpoint     = DEFAULT_ENDPOINT
      self.format       = DEFAULT_FORMAT
      self.proxy        = DEFAULT_FORMAT
    end
  end
end<commit_msg>revert my earlier change<commit_after>require 'faraday'

module SBA
  module Configuration
    VALID_OPTIONS_KEYS = [
      :adapter,
      :endpoint,
      :user_agent,
      :proxy,
      :format].freeze

    VALID_FORMATS = [
      :json,
      :xml].freeze

    DEFAULT_ADAPTER      = Faraday.default_adapter
    DEFAULT_ENDPOINT     = nil
    DEFAULT_PROXY        = nil
    DEFAULT_FORMAT       = :json
    DEFAULT_USER_AGENT   = "SBA Ruby Gem #{SBA::VERSION}".freeze

    attr_accessor *VALID_OPTIONS_KEYS

    def self.extended(base)
      base.reset
    end

    def configure
      yield self
    end

    def options
      VALID_OPTIONS_KEYS.inject({}){|o,k| o.merge!(k => send(k)) }
    end

    def reset
      self.adapter      = DEFAULT_ADAPTER
      self.user_agent   = DEFAULT_USER_AGENT
      self.endpoint     = DEFAULT_ENDPOINT
      self.format       = DEFAULT_FORMAT
      self.proxy        = DEFAULT_FORMAT
    end
  end
end
{'fraction_non_alphanumeric': 0.07716870675891431, 'fraction_numerical': 0.0, 'mean_word_length': 2.0921052631578947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2816496', 'n_tokens_mistral': 620, 'n_tokens_neox': 595, 'n_words': 122}