From 469bac0f9233d8ad2b53bea2f382578634fabf65 Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 6 Apr 2016 06:01:14 +0000 Subject: * lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update rubygems-2.6.3. Please see entries of 2.6.3 on https://github.com/rubygems/rubygems/blob/master/History.txt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rubygems/commands/query_command.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'lib/rubygems/commands/query_command.rb') diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb index d6196b44ed..fb2d6a53c8 100644 --- a/lib/rubygems/commands/query_command.rb +++ b/lib/rubygems/commands/query_command.rb @@ -247,7 +247,7 @@ is too hard to use. spec_summary entry, spec end - def entry_versions entry, name_tuples, platforms + def entry_versions entry, name_tuples, platforms, specs return unless options[:versions] list = @@ -256,7 +256,16 @@ is too hard to use. else platforms.sort.reverse.map do |version, pls| if pls == [Gem::Platform::RUBY] then - version + if options[:domain] == :remote || specs.all? { |spec| spec.is_a? Gem::Source } + version + else + spec = specs.select { |spec| spec.version == version } + if spec.first.default_gem? + "default: #{version}" + else + version + end + end else ruby = pls.delete Gem::Platform::RUBY platform_list = [ruby, *pls.sort].compact @@ -277,7 +286,7 @@ is too hard to use. entry = [name_tuples.first.name] - entry_versions entry, name_tuples, platforms + entry_versions entry, name_tuples, platforms, specs entry_details entry, detail_tuple, specs, platforms entry.join -- cgit v1.2.3