Add support for stats breakdown by file per repo

This commit is contained in:
Ted Nyman
2013-12-28 19:22:13 -08:00
parent f7b7a89709
commit e660442e2e
2 changed files with 21 additions and 0 deletions

View File

@@ -15,6 +15,12 @@ if File.directory?(path)
percentage = sprintf '%.2f' % percentage
puts "%-7s %s" % ["#{percentage}%", language]
end
puts
breakdown = repo.breakdown_by_file
breakdown.each do |lang, files|
puts "#{lang}: #{files}"
puts
end
elsif File.file?(path)
blob = Linguist::FileBlob.new(path, Dir.pwd)
type = if blob.text?