method
entry_versions
v2_6_3 -
Show latest stable
-
0 notes -
Class: QueryCommand
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
entry_versions(entry, name_tuples, platforms, specs)
private
Hide source
# File lib/rubygems/commands/query_command.rb, line 250 def entry_versions(entry, name_tuples, platforms, specs) return unless options[:versions] list = if platforms.empty? or options[:details] name_tuples.map { |n| n.version }.uniq else platforms.sort.reverse.map do |version, pls| out = version.to_s if options[:domain] == :local default = specs.any? do |s| !s.is_a?(Gem::Source) && s.version == version && s.default_gem? end out = "default: #{out}" if default end if pls != [Gem::Platform::RUBY] platform_list = [pls.delete(Gem::Platform::RUBY), *pls.sort].compact out = platform_list.unshift(out).join(' ') end out end end entry << " (#{list.join ', '})" end