Sha256: f3dd86b26bdcdf94c23bd7e34813f9e8692f7c753a3ed028d6ed2e83db630ca0

Contents?: true

Size: 1.23 KB

Versions: 11

Compression:

Stored size: 1.23 KB

Contents

# this loads all of 'git-multi'
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'git/multi'

# this loads all 'git multi' contribs
Dir.glob File.join(__dir__, 'contrib', '*', '*.rb'), &method(:require)

# configure a logger
require 'logger'
logger = Logger.new(STDOUT)
logger.level = Logger::INFO

# configure Octokit middleware with logger
require 'octokit'
Octokit.middleware.response :logger, logger

# enumerator for Faraday middleware apps
def (_middleware = Octokit.middleware).each_app
  Enumerator.new do |yielder|
    next_app = app
    while next_app
      yielder << next_app
      next_app = next_app.instance_variable_get(:@app)
    end
  end
end

# utility function to set pry context
# to an instance of <Octokit::Client>
def client() pry(Git::Hub.send(:client)); end

# utility function to set pry context
# to the Array of github repositories
def repos() pry(Git::Multi.repositories); end

# utility function to set pry context
# to the various 'git multi' commands:
def cmds() pry(Git::Multi::Commands); end

# utility function to set context
# to the named github repository:
def repo_named(full_name)
  pry(Git::Multi.repositories.find { |repo| repo.full_name == full_name })
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
git-multi-4.0.1 .pryrc
git-multi-4.0.0 .pryrc
git-multi-3.0.3 .pryrc
git-multi-3.0.2 .pryrc
git-multi-3.0.0 .pryrc
git-multi-2.10.0 .pryrc
git-multi-2.9.0 .pryrc
git-multi-2.8.0 .pryrc
git-multi-2.7.0 .pryrc
git-multi-2.6.1 .pryrc
git-multi-2.6.0 .pryrc