From c92967b1123c38e77d262a7d31ffaab6c5cacbbe Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 15 Jan 2017 14:38:26 -0500 Subject: [PATCH] start to style the file coverage report --- assets/file_report.html.erb | 50 +++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/assets/file_report.html.erb b/assets/file_report.html.erb index 819cca0..47620ef 100644 --- a/assets/file_report.html.erb +++ b/assets/file_report.html.erb @@ -2,14 +2,46 @@ Coverage for <%= @source_file_name %> -

Coverage for <%= @source_file_name %> - +

Coverage for <%= @source_file_name %>

+
<% if @total_lines > 0 %> @@ -27,18 +59,19 @@ <% end %>
Line Coverage:
- +
+
- - + + <% source_file_lines.each_with_index do |line, i| %> <% line_number = i + 1 %> + <% line_execution_count = file_coverage.get_line_count(line_number) %> - - - + + <% end %>
Execution CountBranch CountBCLC Line Source
<%= file_coverage.get_line_count(line_number) %> + <% if branches = file_coverage.get_branches(line_number) %> <% branches.each_with_index do |(branch_id, branch_coverage), i| %> <% if i > 0 %> @@ -51,7 +84,8 @@ <% end %> <% end %> <%= line_number %><%= line_execution_count %><%= line_number %> <%= CGI.escape_html(line.chomp).gsub("\t", " " * 4).gsub(" ", " ") %>