diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-11 20:57:02 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-11 20:57:02 +0000 |
commit | e72b71d56a1f369cb7eb3892c61715460bac8109 (patch) | |
tree | 6f55131cbd153845e71dadc91f08636aa6707423 /lib/rubygems/commands/update_command.rb | |
parent | 0ae6c7f816cbc3ba0cdd97f609b9ffcbf49bf9bb (diff) | |
download | ruby-e72b71d56a1f369cb7eb3892c61715460bac8109.tar.gz |
Update to RubyGems 1.1.1 r1701.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/update_command.rb')
-rw-r--r-- | lib/rubygems/commands/update_command.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index b8de911e20..31a97c4844 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -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}" |