lib/html_report.rb in caelum-git-reports-0.1.0 vs lib/html_report.rb in caelum-git-reports-0.1.1

- old
+ new

@@ -16,13 +16,13 @@ from = (Time.now - @days*60*60*24).strftime("%Y.%m.%d") to = Time.now.strftime("%Y.%m.%d") report << Template::HEAD.gsub('%TITLE%', @title).gsub("%FROM%", from).gsub('%TO%', to) - for major in @stats.keys + for major in @stats.keys.sort report << Template::MAJOR_HEAD.gsub('%MAJOR%', major) sum = 0 - for minor, lines in @stats[major] + for minor, lines in @stats[major].sort report << Template::MINOR.gsub('%MINOR%', minor).gsub('%LINES%', lines.to_s) sum += lines end report << Template::MINOR.gsub('%MINOR%', '.').gsub('%LINES%', sum.to_s) report << Template::MAJOR_TAIL \ No newline at end of file