class Bundler::Source::Git
def uri_hash
def uri_hash if %r{^\w+://(\w+@)?}.match?(uri) # Downcase the domain component of the URI # and strip off a trailing slash, if one is present input = Gem::URI.parse(uri).normalize.to_s.sub(%r{/$}, "") else # If there is no URI scheme, assume it is an ssh/git URI input = uri end # We use SHA1 here for historical reason and to preserve backward compatibility. # But a transition to a simpler mangling algorithm would be welcome. Bundler::Digest.sha1(input) end