<commit_before>module Fetch
  module Configuration
    class << self
      DEFAULT_USER_AGENT = "Mozilla/5.0"
      DEFAULT_TIMEOUT = 10
      DEFAULT_RAISE_ON_ERROR = false
      DEFAULT_NAMESPACES = ["fetch_modules"]

      # Default user agent for async fetches.
      def user_agent
        @user_agent ||= DEFAULT_USER_AGENT
      end

      attr_writer :user_agent

      # Timeout for async fetches.
      def timeout
        @timeout ||= DEFAULT_TIMEOUT
      end

      attr_writer :timeout

      # Whether to raise exception on fetch error. Default is +false+.
      # In Rails, errors will be raised in the development and test environments,
      # but not in other environments.
      def raise_on_error
        return @raise_on_error if defined?(@raise_on_error)
        @raise_on_error = if defined?(Rails.env)
          %w{development test}.include?(Rails.env)
        else
          DEFAULT_RAISE_ON_ERROR
        end
      end

      attr_writer :raise_on_error

      # Namespaces in which to look for fetch modules.
      # Default is +["fetch_modules"]+.
      def namespaces
        @namespaces ||= DEFAULT_NAMESPACES
      end

      attr_writer :namespaces

      # Convenience method for defining a single namespace that contains fetch modules.
      def namespace=(value)
        self.namespaces = [value]
      end
    end
  end
end<commit_msg>Add info on defaults<commit_after>module Fetch
  module Configuration
    class << self
      DEFAULT_USER_AGENT = "Mozilla/5.0"
      DEFAULT_TIMEOUT = 10
      DEFAULT_RAISE_ON_ERROR = false
      DEFAULT_NAMESPACES = ["fetch_modules"]

      # User agent for async fetches.
      # Default is 'Mozilla/5.0'.
      def user_agent
        @user_agent ||= DEFAULT_USER_AGENT
      end

      attr_writer :user_agent

      # Timeout for async fetches.
      # Default is 10 seconds.
      def timeout
        @timeout ||= DEFAULT_TIMEOUT
      end

      attr_writer :timeout

      # Whether to raise exception on fetch error. Default is +false+.
      # In Rails, errors will be raised in the development and test environments,
      # but not in other environments.
      def raise_on_error
        return @raise_on_error if defined?(@raise_on_error)
        @raise_on_error = if defined?(Rails.env)
          %w{development test}.include?(Rails.env)
        else
          DEFAULT_RAISE_ON_ERROR
        end
      end

      attr_writer :raise_on_error

      # Namespaces in which to look for fetch modules.
      # Default is +["fetch_modules"]+.
      def namespaces
        @namespaces ||= DEFAULT_NAMESPACES
      end

      attr_writer :namespaces

      # Convenience method for defining a single namespace that contains fetch modules.
      def namespace=(value)
        self.namespaces = [value]
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0633903133903134, 'fraction_numerical': 0.004273504273504274, 'mean_word_length': 2.304705882352941, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5494267', 'n_tokens_mistral': 815, 'n_tokens_neox': 786, 'n_words': 246}