aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-11 20:57:02 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-11 20:57:02 +0000
commite72b71d56a1f369cb7eb3892c61715460bac8109 (patch)
tree6f55131cbd153845e71dadc91f08636aa6707423 /lib/rubygems/commands
parent0ae6c7f816cbc3ba0cdd97f609b9ffcbf49bf9bb (diff)
downloadruby-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')
-rw-r--r--lib/rubygems/commands/environment_command.rb2
-rw-r--r--lib/rubygems/commands/pristine_command.rb1
-rw-r--r--lib/rubygems/commands/query_command.rb6
-rw-r--r--lib/rubygems/commands/sources_command.rb2
-rw-r--r--lib/rubygems/commands/update_command.rb11
5 files changed, 14 insertions, 8 deletions
diff --git a/lib/rubygems/commands/environment_command.rb b/lib/rubygems/commands/environment_command.rb
index 56b373cfbe..342f93ca54 100644
--- a/lib/rubygems/commands/environment_command.rb
+++ b/lib/rubygems/commands/environment_command.rb
@@ -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
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb
index 2900e7e739..bbea835133 100644
--- a/lib/rubygems/commands/pristine_command.rb
+++ b/lib/rubygems/commands/pristine_command.rb
@@ -126,6 +126,7 @@ revert the gem.
end
installer.generate_bin
+ installer.build_extensions
end
end
diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb
index fdc5a6a4ea..ea83b93bbb 100644
--- a/lib/rubygems/commands/query_command.rb
+++ b/lib/rubygems/commands/query_command.rb
@@ -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
diff --git a/lib/rubygems/commands/sources_command.rb b/lib/rubygems/commands/sources_command.rb
index 6d9d5b5b90..1558d79b8b 100644
--- a/lib/rubygems/commands/sources_command.rb
+++ b/lib/rubygems/commands/sources_command.rb
@@ -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"
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}"