mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to RubyGems 1.1.1 r1701.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0ae6c7f816
commit
e72b71d56a
31 changed files with 272 additions and 888 deletions
|
@ -58,7 +58,7 @@ class Gem::Commands::UpdateCommand < Gem::Command
|
|||
say "Updating installed gems"
|
||||
end
|
||||
|
||||
hig = {}
|
||||
hig = {} # highest installed gems
|
||||
|
||||
Gem::SourceIndex.from_installed_gems.each do |name, spec|
|
||||
if hig[spec.name].nil? or hig[spec.name].version < spec.version then
|
||||
|
@ -67,7 +67,7 @@ class Gem::Commands::UpdateCommand < Gem::Command
|
|||
end
|
||||
|
||||
pattern = if options[:args].empty? then
|
||||
//
|
||||
//
|
||||
else
|
||||
Regexp.union(*options[:args])
|
||||
end
|
||||
|
@ -78,12 +78,14 @@ class Gem::Commands::UpdateCommand < Gem::Command
|
|||
|
||||
updated = []
|
||||
|
||||
# HACK use the real API
|
||||
installer = Gem::DependencyInstaller.new options
|
||||
|
||||
gems_to_update.uniq.sort.each do |name|
|
||||
next if updated.any? { |spec| spec.name == name }
|
||||
|
||||
say "Updating #{name}"
|
||||
installer = Gem::DependencyInstaller.new options
|
||||
installer.install name
|
||||
|
||||
installer.installed_gems.each do |spec|
|
||||
updated << spec
|
||||
say "Successfully installed #{spec.full_name}"
|
||||
|
@ -115,6 +117,7 @@ class Gem::Commands::UpdateCommand < Gem::Command
|
|||
args.push '--prefix', Gem.prefix unless Gem.prefix.nil?
|
||||
args << '--no-rdoc' unless options[:generate_rdoc]
|
||||
args << '--no-ri' unless options[:generate_ri]
|
||||
args << '--no-format-executable' if options[:no_format_executable]
|
||||
|
||||
update_dir = File.join Gem.dir, 'gems', "rubygems-update-#{version}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue