<commit_before># encoding: utf-8

require 'github_api/version'
require 'github_api/configuration'
require 'github_api/connection'

module Github
  extend Configuration

  class << self
    # Alias for Github::Client.new
    #
    # @return [Github::Client]
    def new(options = {}, &block)
      Github::Client.new(options, &block)
    end

    # Delegate to Github::Client
    #
    def method_missing(method, *args, &block)
      return super unless new.respond_to?(method)
      new.send(method, *args, &block)
    end

    def respond_to?(method, include_private = false)
      new.respond_to?(method, include_private) || super(method, include_private)
    end

  end

  module AutoloadHelper

    def autoload_all(prefix, options)
      options.each do |const_name, path|
        autoload const_name, File.join(prefix, path)
      end
    end

    def register_constant(options)
      options.each do |const_name, value|
        const_set const_name.upcase.to_s, value
      end
    end

    def lookup_constant(const_name)
      const_get const_name.upcase.to_s
    end

  end

  extend AutoloadHelper

  autoload_all 'github_api',
    :API          => 'api',
    :Client       => 'client',
    :Repos        => 'repos',
    :Request      => 'request',
    :Response     => 'response',
    :Result       => 'result',
    :Error        => 'error',
    :Issues       => 'issues',
    :Gists        => 'gists',
    :GitData      => 'git_data',
    :Orgs         => 'orgs',
    :PullRequests => 'pull_requests',
    :Users        => 'users',
    :Events       => 'events',
    :CoreExt      => 'core_ext',
    :MimeType     => 'mime_type',
    :Authorization => 'authorization',
    :Authorizations => 'authorizations'

end # Github<commit_msg>Update new modules loading paths, add api client accessor.<commit_after># encoding: utf-8

require 'github_api/version'
require 'github_api/configuration'
require 'github_api/constants'
require 'github_api/utils/url'
require 'github_api/connection'

module Github
  extend Configuration

  class << self
    # Alias for Github::Client.new
    #
    # @return [Github::Client]
    def new(options = {}, &block)
      @@api_client = Github::Client.new(options, &block)
    end

    # Returns handle for the client instance
    def api_client
      @@api_client
    end

    # Delegate to Github::Client
    #
    def method_missing(method, *args, &block)
      return super unless new.respond_to?(method)
      new.send(method, *args, &block)
    end

    def respond_to?(method, include_private = false)
      new.respond_to?(method, include_private) || super(method, include_private)
    end

  end

  module AutoloadHelper

    def autoload_all(prefix, options)
      options.each do |const_name, path|
        autoload const_name, File.join(prefix, path)
      end
    end

    def register_constant(options)
      options.each do |const_name, value|
        const_set const_name.upcase.to_s, value
      end
    end

    def lookup_constant(const_name)
      const_get const_name.upcase.to_s
    end

  end

  extend AutoloadHelper

  autoload_all 'github_api',
    :API          => 'api',
    :Client       => 'client',
    :Repos        => 'repos',
    :Request      => 'request',
    :Response     => 'response',
    :Result       => 'result',
    :Error        => 'error',
    :Issues       => 'issues',
    :Gists        => 'gists',
    :GitData      => 'git_data',
    :Orgs         => 'orgs',
    :PullRequests => 'pull_requests',
    :Users        => 'users',
    :Events       => 'events',
    :CoreExt      => 'core_ext',
    :MimeType     => 'mime_type',
    :Authorization => 'authorization',
    :Authorizations => 'authorizations',
    :PageLinks    => 'page_links',
    :PageIterator => 'page_iterator',
    :PagedRequest => 'paged_request'

end # Github
{'fraction_non_alphanumeric': 0.1207122283320241, 'fraction_numerical': 0.0005236973029588898, 'mean_word_length': 2.566760037348273, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 42, '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': '5240853', 'n_tokens_mistral': 1233, 'n_tokens_neox': 1208, 'n_words': 278}