mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to RubyGems 1.3.4 r2223
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6afbaeb3b
commit
31c94ffeb5
126 changed files with 7610 additions and 3747 deletions
|
@ -16,9 +16,9 @@ class Gem::Commands::UpdateCommand < Gem::Command
|
|||
super 'update',
|
||||
'Update the named gems (or all installed gems) in the local repository',
|
||||
:generate_rdoc => true,
|
||||
:generate_ri => true,
|
||||
:force => false,
|
||||
:test => false
|
||||
:generate_ri => true,
|
||||
:force => false,
|
||||
:test => false
|
||||
|
||||
add_install_update_options
|
||||
|
||||
|
@ -80,20 +80,27 @@ class Gem::Commands::UpdateCommand < Gem::Command
|
|||
|
||||
gems_to_update.uniq.sort.each do |name|
|
||||
next if updated.any? { |spec| spec.name == name }
|
||||
success = false
|
||||
|
||||
say "Updating #{name}"
|
||||
installer.install name
|
||||
begin
|
||||
installer.install name
|
||||
success = true
|
||||
rescue Gem::InstallError => e
|
||||
alert_error "Error installing #{name}:\n\t#{e.message}"
|
||||
success = false
|
||||
end
|
||||
|
||||
installer.installed_gems.each do |spec|
|
||||
updated << spec
|
||||
say "Successfully installed #{spec.full_name}"
|
||||
say "Successfully installed #{spec.full_name}" if success
|
||||
end
|
||||
end
|
||||
|
||||
if gems_to_update.include? "rubygems-update" then
|
||||
Gem.source_index.refresh!
|
||||
|
||||
update_gems = Gem.source_index.search 'rubygems-update'
|
||||
update_gems = Gem.source_index.find_name 'rubygems-update'
|
||||
|
||||
latest_update_gem = update_gems.sort_by { |s| s.version }.last
|
||||
|
||||
|
@ -106,6 +113,20 @@ class Gem::Commands::UpdateCommand < Gem::Command
|
|||
say "Nothing to update"
|
||||
else
|
||||
say "Gems updated: #{updated.map { |spec| spec.name }.join ', '}"
|
||||
|
||||
if options[:generate_ri] then
|
||||
updated.each do |gem|
|
||||
Gem::DocManager.new(gem, options[:rdoc_args]).generate_ri
|
||||
end
|
||||
|
||||
Gem::DocManager.update_ri_cache
|
||||
end
|
||||
|
||||
if options[:generate_rdoc] then
|
||||
updated.each do |gem|
|
||||
Gem::DocManager.new(gem, options[:rdoc_args]).generate_rdoc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue