cache_dir(uri)
Returns the local directory to write uri to.
# File lib/rubygems/source.rb, line 111 def cache_dir(uri) # Correct for windows paths escaped_path = uri.path.sub(/^\/([a-z]):\//, '/\1-/') escaped_path.untaint File.join Gem.spec_cache_dir, "#{uri.host}%#{uri.port}", File.dirname(escaped_path) end