diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-06 06:01:14 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-06 06:01:14 +0000 |
commit | 469bac0f9233d8ad2b53bea2f382578634fabf65 (patch) | |
tree | ecb999b03efbe4272614f2ffb4069a3f2b8bbabe /lib/rubygems/commands/query_command.rb | |
parent | ea736d55f9596e79184b9b4ade439c71530e86d8 (diff) |
* 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
Diffstat (limited to 'lib/rubygems/commands/query_command.rb')
-rw-r--r-- | lib/rubygems/commands/query_command.rb | 15 |
1 files changed, 12 insertions, 3 deletions
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 |