lib/templates/flog.html.erb in p8-metric_fu-0.8.4 vs lib/templates/flog.html.erb in p8-metric_fu-0.8.4.1

- old
+ new

@@ -1,26 +1,24 @@ <html> <head> <title>Flog Reporter</title> <style> - <%= open(File.join(MetricFu::TEMPLATE_DIR, "#{template_name}.css")) { |f| f.read } %> + <%= inline_css("#{template_name}.css") %> </style> </head> <body> <h1>Flogged files</h1> <p>Generated on <%= Time.now.localtime %> with <a href='http://ruby.sadi.st/Flog.html'>flog</a></p> <table class='report'> <tr><th>File</th><th>Total score</th><th>Methods</th><th>Average score</th><th>Highest score</th></tr> - <% count = 0 %> - <% flog_hashes.sort {|x,y| y[:page].highest_score <=> x[:page].highest_score }.each do |flog_hash| %> - <tr class='<%= Base.cycle("light", "dark", count) %>'> - <td><a href='<%= flog_hash[:path]%>'><%= flog_hash[:path].sub('.html', '.rb') %></a></td> - <td class='score'><%= sprintf(SCORE_FORMAT, flog_hash[:page].score) %></td> - <td class='score'><%= flog_hash[:page].scanned_methods.length %></td> - <td class='score'><%= sprintf(SCORE_FORMAT, flog_hash[:page].average_score) %></td> - <td class='score'><%= sprintf(SCORE_FORMAT, flog_hash[:page].highest_score) %></td> + <% pages.sort {|x,y| y.highest_score <=> x.highest_score }.each_with_index do |page, count| %> + <tr class='<%= cycle("light", "dark", count) %>'> + <td><a href='<%= page.path %>'><%= page.path.sub('.html', '.rb') %></a></td> + <td class='score'><%= sprintf(SCORE_FORMAT, page.score) %></td> + <td class='score'><%= page.scanned_methods.length %></td> + <td class='score'><%= sprintf(SCORE_FORMAT, page.average_score) %></td> + <td class='score'><%= sprintf(SCORE_FORMAT, page.highest_score) %></td> </tr> - <% count += 1 %> <% end %> </table> </body> </html> \ No newline at end of file