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
|
@ -39,7 +39,7 @@ class Gem::Commands::EnvironmentCommand < Gem::Command
|
|||
when nil then
|
||||
out = "RubyGems Environment:\n"
|
||||
|
||||
out << " - RUBYGEMS VERSION: #{Gem::RubyGemsVersion} (#{Gem::RubyGemsPackageVersion})\n"
|
||||
out << " - RUBYGEMS VERSION: #{Gem::RubyGemsVersion}\n"
|
||||
|
||||
out << " - RUBY VERSION: #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}"
|
||||
out << " patchlevel #{RUBY_PATCHLEVEL}" if defined? RUBY_PATCHLEVEL
|
||||
|
|
|
@ -126,6 +126,7 @@ revert the gem.
|
|||
end
|
||||
|
||||
installer.generate_bin
|
||||
installer.build_extensions
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -82,13 +82,15 @@ class Gem::Commands::QueryCommand < Gem::Command
|
|||
say "*** REMOTE GEMS ***"
|
||||
say
|
||||
|
||||
all = options[:all]
|
||||
|
||||
begin
|
||||
Gem::SourceInfoCache.cache.refresh options[:all]
|
||||
Gem::SourceInfoCache.cache all
|
||||
rescue Gem::RemoteFetcher::FetchError
|
||||
# no network
|
||||
end
|
||||
|
||||
output_query_results Gem::SourceInfoCache.search(name, false, true)
|
||||
output_query_results Gem::SourceInfoCache.search(name, false, all)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ class Gem::Commands::SourcesCommand < Gem::Command
|
|||
end
|
||||
|
||||
if options[:update] then
|
||||
Gem::SourceInfoCache.cache.refresh true
|
||||
Gem::SourceInfoCache.cache true
|
||||
Gem::SourceInfoCache.cache.flush
|
||||
|
||||
say "source cache successfully updated"
|
||||
|
|
|
@ -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