summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/query_command.rb
diff options
context:
space:
mode:
authorryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-01 03:45:05 +0000
committerryan <ryan@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-01 03:45:05 +0000
commitd22130922e7842226d38d59680e4bbb48a28a5f0 ()
tree39594d3a14641dd5488a99a5e633239296fa5742 /lib/rubygems/commands/query_command.rb
parent4752539e3f3e563d559732c52424206bd6f12dbd (diff)
Import rubygems 1.8.5 (released @ 137c80f)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/rubygems/commands/query_command.rb15
1 files changed, 9 insertions, 6 deletions
@@ -80,10 +80,12 @@ class Gem::Commands::QueryCommand < Gem::Command
exit_code |= 1
end
- raise Gem::SystemExitException, exit_code
end
- dep = Gem::Dependency.new name, Gem::Requirement.default
if local? then
if prerelease and not both? then
@@ -96,7 +98,9 @@ class Gem::Commands::QueryCommand < Gem::Command
say
end
- specs = Gem.source_index.search dep
spec_tuples = specs.map do |spec|
[[spec.name, spec.version, spec.original_platform, spec], :local]
@@ -129,9 +133,8 @@ class Gem::Commands::QueryCommand < Gem::Command
##
# Check if gem +name+ version +version+ is installed.
- def installed?(name, version = Gem::Requirement.default)
- dep = Gem::Dependency.new name, version
- !Gem.source_index.search(dep).empty?
end
def output_query_results(spec_tuples)