mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
Merge the current master branch of rubygems/rubygems.
Just started to develop RubyGems 3.2.0.
This commit is contained in:
parent
adc3031311
commit
600a715c9b
54 changed files with 1236 additions and 1207 deletions
|
@ -20,7 +20,8 @@ class Gem::Commands::SetupCommand < Gem::Command
|
|||
:force => true,
|
||||
:site_or_vendor => 'sitelibdir',
|
||||
:destdir => '', :prefix => '', :previous_version => '',
|
||||
:regenerate_binstubs => true
|
||||
:regenerate_binstubs => true,
|
||||
:regenerate_plugins => true
|
||||
|
||||
add_option '--previous-version=VERSION',
|
||||
'Previous version of RubyGems',
|
||||
|
@ -89,6 +90,11 @@ class Gem::Commands::SetupCommand < Gem::Command
|
|||
options[:regenerate_binstubs] = value
|
||||
end
|
||||
|
||||
add_option '--[no-]regenerate-plugins',
|
||||
'Regenerate gem plugins' do |value, options|
|
||||
options[:regenerate_plugins] = value
|
||||
end
|
||||
|
||||
add_option '-f', '--[no-]force',
|
||||
'Forcefully overwrite binstubs' do |value, options|
|
||||
options[:force] = value
|
||||
|
@ -181,6 +187,7 @@ By default, this RubyGems will install gem as:
|
|||
say "RubyGems #{Gem::VERSION} installed"
|
||||
|
||||
regenerate_binstubs if options[:regenerate_binstubs]
|
||||
regenerate_plugins if options[:regenerate_plugins]
|
||||
|
||||
uninstall_old_gemcutter
|
||||
|
||||
|
@ -626,6 +633,16 @@ abort "#{deprecation_message}"
|
|||
command.invoke(*args)
|
||||
end
|
||||
|
||||
def regenerate_plugins
|
||||
require "rubygems/commands/pristine_command"
|
||||
say "Regenerating plugins"
|
||||
|
||||
args = %w[--all --only-plugins --silent]
|
||||
|
||||
command = Gem::Commands::PristineCommand.new
|
||||
command.invoke(*args)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def target_bin_path(bin_dir, bin_file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue