In Files

  • rubygems/resolver/git_set.rb

Class/Module Index [+]



frozen_string_literal: false

A GitSet represents gems that are sourced from git repositories.

This is used for gem dependency file support.


set =
set.add_git_gem 'rake', 'git://example/rake.git', tag: 'rake-10.1.0'



The root directory for git gems in this set. This is usually Gem.dir, the installation directory for regular gems.

Public Instance Methods

find_all(req) click to toggle source

Finds all git gems matching req

               # File rubygems/resolver/git_set.rb, line 80
def find_all req
  prefetch nil do |spec|
    req.match? spec
prefetch(reqs) click to toggle source

Prefetches specifications from the git repositories in this set.

               # File rubygems/resolver/git_set.rb, line 91
def prefetch reqs
  return unless @specs.empty?

  @repositories.each do |name, (repository, reference)|
    source = name, repository, reference
    source.root_dir = @root_dir
    source.remote = @remote

    source.specs.each do |spec|
      git_spec = self, spec, source

      @specs[] = git_spec

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit