End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Gem::Source::Git.new
new(name, repository, reference, submodules = false)
lib/rubygems/source/git.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/source/git.rb, line 51
def initialize(name, repository, reference, submodules = false)
require_relative "../uri"
@uri = Gem::Uri.parse(repository)
@name = name
@repository = repository
@reference = reference
@need_submodules = submodules
@remote = true
@root_dir = Gem.dir
@git = ENV["git"] || "git"
end
Creates a new git gem source for a gems from loaded from repository at the given reference. The name is only used to track the repository back to a gem dependencies file, it has no real significance as a git repository may contain multiple gems. If submodules is true, submodules will be checked out when the gem is installed.