Merge RubyGems-3.3.18 and Bundler-2.3.18

This commit is contained in:
Hiroshi SHIBATA 2022-08-22 11:49:20 +09:00 committed by nagachika
parent 7ef68dd74a
commit 0918783347
69 changed files with 586 additions and 167 deletions

View file

@ -365,10 +365,11 @@ By default, this RubyGems will install gem as:
bundler_spec = Dir.chdir("bundler") { Gem::Specification.load("bundler.gemspec") }
# Remove bundler-*.gemspec in default specification directory.
Dir.entries(specs_dir).
select {|gs| gs.start_with?("bundler-") }.
each {|gs| File.delete(File.join(specs_dir, gs)) }
current_default_spec = Gem::Specification.default_stubs.find {|s| s.name == "bundler" }
if current_default_spec
File.delete(current_default_spec.loaded_from)
Gem::Specification.remove_spec current_default_spec
end
default_spec_path = File.join(specs_dir, "#{bundler_spec.full_name}.gemspec")
Gem.write_binary(default_spec_path, bundler_spec.to_ruby)

View file

@ -118,15 +118,19 @@ command to remove old versions.
updated = update_gems gems_to_update
installed_names = highest_installed_gems.keys
updated_names = updated.map {|spec| spec.name }
not_updated_names = options[:args].uniq - updated_names
not_installed_names = not_updated_names - installed_names
up_to_date_names = not_updated_names - not_installed_names
if updated.empty?
say "Nothing to update"
else
say "Gems updated: #{updated_names.join(' ')}"
say "Gems already up-to-date: #{not_updated_names.join(' ')}" unless not_updated_names.empty?
end
say "Gems already up-to-date: #{up_to_date_names.join(' ')}" unless up_to_date_names.empty?
say "Gems not currently installed: #{not_installed_names.join(' ')}" unless not_installed_names.empty?
end
def fetch_remote_gems(spec) # :nodoc: