# File lib/rubygems/test_utilities.rb, line 70 def download spec, source_uri, install_dir = Gem.dir name = "#{spec.full_name}.gem" path = File.join(install_dir, 'cache', name) Gem.ensure_gem_subdirectories install_dir if source_uri =~ /^http/ then File.open(path, "wb") do |f| f.write fetch_path(File.join(source_uri, "gems", name)) end else FileUtils.cp source_uri, path end path end