Merge pull request #4891 from zgracem/add-commas-to-analytics

use 'number_readable' when displaying analytics
This commit is contained in:
Mike McQuaid 2018-09-13 14:30:15 +01:00 committed by GitHub
commit 1b45666518
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,7 +207,7 @@ module Homebrew
value.each do |range, results|
oh1 "#{category} (#{range})"
results.each do |name_with_options, count|
puts "#{name_with_options}: #{count}"
puts "#{name_with_options}: #{number_readable(count)}"
end
end
end
@ -216,7 +216,7 @@ module Homebrew
json["analytics"].each do |category, value|
analytics = value.map do |range, results|
"#{results.values.inject("+")} (#{range})"
"#{number_readable(results.values.inject("+"))} (#{range})"
end
puts "#{category}: #{analytics.join(", ")}"
end