summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2021-10-20 19:27:06 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-10-25 20:48:50 +0900
commit9b1b1718666ab73bb2a9200a074b8c836cde8b30 (patch)
tree1ecf073f5d4f1245d8d9997a0545452a9c33aeb4
parent38542cfffc02216eb9de7e470f3e1574dee1aeea (diff)
[rubygems/rubygems] Use `Gem::Specification#file_name` consistently
https://github.com/rubygems/rubygems/commit/13b933f49a
-rw-r--r--lib/bundler/source/rubygems.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index fb5234cbb4..12b7a941f1 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -238,7 +238,7 @@ module Bundler
else
cached_path = cached_gem(spec)
end
- raise GemNotFound, "Missing gem file '#{spec.full_name}.gem'." unless cached_path
+ raise GemNotFound, "Missing gem file '#{spec.file_name}'." unless cached_path
return if File.dirname(cached_path) == Bundler.app_cache.to_s
Bundler.ui.info " * #{File.basename(cached_path)}"
FileUtils.cp(cached_path, Bundler.app_cache(custom_path))
@@ -461,7 +461,7 @@ module Bundler
download_path = requires_sudo? ? Bundler.tmp(spec.full_name) : rubygems_dir
download_cache_path = "#{download_path}/cache"
- gem_path = "#{default_cache_path}/#{spec.full_name}.gem"
+ gem_path = "#{default_cache_path}/#{spec.file_name}"
SharedHelpers.filesystem_access(download_cache_path) do |p|
FileUtils.mkdir_p(p)
@@ -472,7 +472,7 @@ module Bundler
SharedHelpers.filesystem_access(default_cache_path) do |p|
Bundler.mkdir_p(p)
end
- Bundler.sudo "mv #{download_cache_path}/#{spec.full_name}.gem #{gem_path}"
+ Bundler.sudo "mv #{download_cache_path}/#{spec.file_name} #{gem_path}"
end
gem_path
@@ -512,7 +512,7 @@ module Bundler
# the local directory the .gem will end up in.
#
def download_gem(spec, download_cache_path)
- local_path = File.join(download_cache_path, "#{spec.full_name}.gem")
+ local_path = File.join(download_cache_path, spec.file_name)
if (cache_path = download_cache_path(spec)) && cache_path.file?
SharedHelpers.filesystem_access(local_path) do