Merge RubyGems 2.7.7

see release details here: https://blog.rubygems.org/2018/05/18/2.7.7-released.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2018-05-18 01:39:13 +00:00
parent ecedebab2c
commit c6da9cadb3
29 changed files with 161 additions and 60 deletions

View file

@ -429,6 +429,14 @@ EOM
destination
end
def normalize_path(pathname)
if Gem.win_platform?
pathname.downcase
else
pathname
end
end
def mkdir_p_safe mkdir, mkdir_options, destination_dir, file_name
destination_dir = realpath File.expand_path(destination_dir)
parts = mkdir.split(File::SEPARATOR)
@ -437,7 +445,7 @@ EOM
path = File.expand_path(path + File::SEPARATOR + basename)
lstat = File.lstat path rescue nil
if !lstat || !lstat.directory?
unless path.start_with? destination_dir and (FileUtils.mkdir path, mkdir_options rescue false)
unless normalize_path(path).start_with? normalize_path(destination_dir) and (FileUtils.mkdir path, mkdir_options rescue false)
raise Gem::Package::PathError.new(file_name, destination_dir)
end
end
@ -591,7 +599,7 @@ EOM
end
case file_name
when /^metadata(.gz)?$/ then
when "metadata", "metadata.gz" then
load_spec entry
when 'data.tar.gz' then
verify_gz entry