diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-08 06:01:49 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-08 06:01:49 +0000 |
commit | 75894547f50888b86f15c118b6e047d8b9a94a74 () | |
tree | 09640cd4d0e802d5071f2ed71934c230405d5bf8 /lib/rubygems/commands | |
parent | ee68f78c2462908882e3394f8a91631ec4a45beb (diff) |
* lib/rubygems/commands/cleanup_command.rb: Skip default gems when
cleaning up. * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above. * lib/rubygems/commands/query_command.rb: Fixed listing remote gems. * lib/rubygems/dependency_installer.rb: Ignore non-files when looking for local gems. * test/rubygems/test_gem_dependency_installer.rb: Test for above. * lib/rubygems/uninstaller.rb: The user must confirm uninstalling gems that have dependencies. * test/rubygems/test_gem_uninstaller.rb: Test for above. * lib/rubygems.rb (module Gem): Updated version. * test/rubygems/*.pem: Updated to run in FIPS mode. * test/rubygems/test_gem_security.rb: ditto. * test/rubygems/test_gem_security_signer.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/rubygems/commands/cleanup_command.rb | 29 | ||||
-rw-r--r-- | lib/rubygems/commands/query_command.rb | 4 |
2 files changed, 21 insertions, 12 deletions
@@ -47,16 +47,17 @@ are not removed. end end - gems_to_cleanup = unless options[:args].empty? then - options[:args].map do |gem_name| - Gem::Specification.find_all_by_name gem_name - end.flatten - else - Gem::Specification.to_a - end - - gems_to_cleanup = gems_to_cleanup.select { |spec| - primary_gems[spec.name].version != spec.version } full = Gem::DependencyList.from_specs @@ -102,6 +103,14 @@ are not removed. end say "Clean Up Complete" end end @@ -132,8 +132,8 @@ class Gem::Commands::QueryCommand < Gem::Command if options[:name].source.empty? spec_tuples = fetcher.detect(type) { true } else - spec_tuples = fetcher.detect(type) do |gem_name, ver, plat| - options[:name] === gem_name end end |