summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-09-09 20:25:26 -0700
committerAndre Arko <andre@arko.net>2015-09-09 20:41:55 -0700
commit2adf6c7ce4f74e2afe676281864339a81609ee3a (patch)
tree0f17c5924f4ec971536295082f8acdc418390ec4
parente95f6f946d117937fa9737edd6e8b13bce84467d (diff)
downloadbundler-2adf6c7ce4f74e2afe676281864339a81609ee3a.tar.gz
skip both empty and forward slash paths
-rw-r--r--spec/support/path.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/path.rb b/spec/support/path.rb
index 35bd28fa54..15ead0c9bb 100644
--- a/spec/support/path.rb
+++ b/spec/support/path.rb
@@ -43,7 +43,7 @@ module Spec
def download_cache_source_dir(source)
uri = URI(source.to_s)
port = uri.port unless uri.port == 80
- path = Digest::MD5.hexdigest(uri.path) unless uri.path.empty?
+ path = Digest::MD5.hexdigest(uri.path) unless uri.path =~ /\A\/?\Z/
[uri.hostname, port, path].compact.join(".")
end