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

Fix gem-list to work against new API.

This commit is contained in:
Rob Gleeson 2011-05-06 16:43:23 +01:00
parent a86ddc550a
commit dce86f8b44

View file

@ -45,12 +45,10 @@ class Pry
gems.each do |gemname, specs|
versions = specs.map(&:version).sort.reverse.map(&:to_s)
versions = ["<bright_green>#{versions.first}</bright_green>"] +
versions[1..-1].map{|v| "<green>#{v}</green>" }
versions = ["#{bright_green versions.first}"] + versions[1..-1].map{|v| "#{green v}" }
gemname = highlight(gemname, query) if query
result = "<white>#{gemname} <grey>(#{versions.join ', '})</grey>"
output.puts colorize(result)
output.puts "#{white gemname} (#{grey(versions.join ', ')})"
end
end