1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update to RubyGems 1.3.7.pre.1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2010-04-22 08:24:42 +00:00
parent d0e5a34ac7
commit 372dcece3f
64 changed files with 759 additions and 240 deletions

View file

@ -21,7 +21,7 @@ class Gem::Commands::QueryCommand < Gem::Command
options[:installed] = value
end
add_version_option
add_version_option command, "for use with --installed"
add_option('-n', '--name-matches REGEXP',
'Name of gem(s) to query on matches the',
@ -185,8 +185,21 @@ class Gem::Commands::QueryCommand < Gem::Command
entry = gem_name.dup
if options[:versions] then
versions = matching_tuples.map { |(name, version,_),_| version }.uniq
entry << " (#{versions.join ', '})"
list = if platforms.empty? or options[:details] then
matching_tuples.map { |(name, version,_),_| version }.uniq
else
platforms.sort.reverse.map do |version, pls|
if pls == [Gem::Platform::RUBY] then
version
else
ruby = pls.delete Gem::Platform::RUBY
platform_list = [ruby, *pls.sort].compact
"#{version} #{platform_list.join ' '}"
end
end
end.join ', '
entry << " (#{list})"
end
if options[:details] then