lib/bundler/source/git.rb in bundler-2.1.0.pre.3 vs lib/bundler/source/git.rb in bundler-2.1.0

- old
+ new

@@ -1,16 +1,15 @@ # frozen_string_literal: true require_relative "../vendored_fileutils" -require "uri" module Bundler class Source class Git < Path autoload :GitProxy, File.expand_path("git/git_proxy", __dir__) - attr_reader :uri, :ref, :branch, :options, :submodules + attr_reader :uri, :ref, :branch, :options, :glob, :submodules def initialize(options) @options = options @glob = options["glob"] || DEFAULT_GLOB @@ -46,17 +45,18 @@ out << " glob: #{@glob}\n" unless @glob == DEFAULT_GLOB out << " specs:\n" end def hash - [self.class, uri, ref, branch, name, version, submodules].hash + [self.class, uri, ref, branch, name, version, glob, submodules].hash end def eql?(other) other.is_a?(Git) && uri == other.uri && ref == other.ref && branch == other.branch && name == other.name && - version == other.version && submodules == other.submodules + version == other.version && glob == other.glob && + submodules == other.submodules end alias_method :==, :eql? def to_s @@ -282,10 +282,10 @@ def uri_hash if uri =~ %r{^\w+://(\w+@)?} # Downcase the domain component of the URI # and strip off a trailing slash, if one is present - input = URI.parse(uri).normalize.to_s.sub(%r{/$}, "") + input = Bundler::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 SharedHelpers.digest(:SHA1).hexdigest(input)