class Bundler::Source::Rubygems::Remote
def cache_slug
-
(String)
- A slug suitable for use as a cache key for this
def cache_slug @cache_slug ||= begin return nil unless SharedHelpers.md5_available? cache_uri = original_uri || uri host = cache_uri.to_s.start_with?("file://") ? nil : cache_uri.host uri_parts = [host, cache_uri.user, cache_uri.port, cache_uri.path] uri_digest = SharedHelpers.digest(:MD5).hexdigest(uri_parts.compact.join(".")) uri_parts[-1] = uri_digest uri_parts.compact.join(".") end end