<commit_before>module Faraday
  VERSION = "0.8.0"

  class << self
    attr_accessor :root_path, :lib_path
    attr_accessor :default_adapter
    attr_writer   :default_connection

    def new(url = nil, options = {})
      block = block_given? ? Proc.new : nil
      Faraday::Connection.new(url, options, &block)
    end

    def require_libs(*libs)
      libs.each do |lib|
        require "#{lib_path}/#{lib}"
      end
    end

    alias require_lib require_libs

  private
    def method_missing(name, *args, &block)
      default_connection.send(name, *args, &block)
    end
  end

  self.root_path = File.expand_path "..", __FILE__
  self.lib_path = File.expand_path "../faraday", __FILE__
  self.default_adapter = :net_http

  def self.default_connection
    @default_connection ||= Connection.new
  end

  begin
    require RUBY_VERSION < '1.9' ? 'system_timer' : 'timeout'
  rescue LoadError
    require 'timeout'
    warn "Faraday: you may want to install system_timer for reliable timeouts" unless defined?(JRUBY_VERSION)
  ensure
    Timer = defined?(::SystemTimer) ? ::SystemTimer : ::Timeout
  end

  module MiddlewareRegistry
    # Internal: Register middleware class(es) on the current module.
    #
    # mapping - A Hash mapping Symbol keys to classes. See
    #           Faraday.register_middleware for more details.
    def register_middleware(mapping)
      (@registered_middleware ||= {}).update(mapping)
    end

    # Internal: Lookup middleware class with a registered Symbol shortcut.
    #<commit_msg>Use RUBY_ENGINE to determine if system_timer is needed.<commit_after>module Faraday
  VERSION = "0.8.0"

  class << self
    attr_accessor :root_path, :lib_path
    attr_accessor :default_adapter
    attr_writer   :default_connection

    def new(url = nil, options = {})
      block = block_given? ? Proc.new : nil
      Faraday::Connection.new(url, options, &block)
    end

    def require_libs(*libs)
      libs.each do |lib|
        require "#{lib_path}/#{lib}"
      end
    end

    alias require_lib require_libs

  private
    def method_missing(name, *args, &block)
      default_connection.send(name, *args, &block)
    end
  end

  self.root_path = File.expand_path "..", __FILE__
  self.lib_path = File.expand_path "../faraday", __FILE__
  self.default_adapter = :net_http

  def self.default_connection
    @default_connection ||= Connection.new
  end

  begin
    require defined?(RUBY_ENGINE) ? 'timeout' : 'system_timer'
  rescue LoadError
    require 'timeout'
    warn "Faraday: you may want to install system_timer for reliable timeouts"
  ensure
    Timer = defined?(::SystemTimer) ? ::SystemTimer : ::Timeout
  end

  module MiddlewareRegistry
    # Internal: Register middleware class(es) on the current module.
    #
    # mapping - A Hash mapping Symbol keys to classes. See
    #           Faraday.register_middleware for more details.
    def register_middleware(mapping)
      (@registered_middleware ||= {}).update(mapping)
    end

    # Internal: Lookup middleware class with a registered Symbol shortcut.
    #
{'fraction_non_alphanumeric': 0.09537760416666667, 'fraction_numerical': 0.0026041666666666665, 'mean_word_length': 3.1752717391304346, 'pattern_counts': {'":': 0, '<': 8, '<?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': '1249432', 'n_tokens_mistral': 973, 'n_tokens_neox': 922, 'n_words': 258}