You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

source.erb 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE html>
  2. <head>
  3. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  4. <title>Redmine code coverage</title>
  5. <style>
  6. html {overflow-y:scroll;}
  7. body {font-family:"Lucida Grande","Lucida Sans",Verdana,Helvetica,Arial,sans-serif; font-size:80%;}
  8. h1 {color:#777; margin-bottom:0.2em;}
  9. h2 {color:#aaa; margin-top:1em; font-size:18px;}
  10. #generation {color:#777; font-size:90%;}
  11. a, a:link, a:visited {color:#169; text-decoration:none;}
  12. a:hover, a:active {color:#c61a1a; text-decoration:underline;}
  13. pre, code {
  14. color: #000000;
  15. font-family: "Bitstream Vera Sans Mono","Monaco","Courier New",monospace;
  16. font-size: 95%;
  17. line-height: 1.3em;
  18. margin-top: 0;
  19. margin-bottom: 0;
  20. padding: 0;
  21. }
  22. div.source {border:1px solid #e2e2e2;}
  23. .covered {background:#bed2be;}
  24. .missed {background:#fba;}
  25. .never {background:#eee;}
  26. </style>
  27. </head>
  28. <body>
  29. <h1>Redmine code coverage</h1>
  30. <p id='generation'>
  31. Generated on <%= now %> (<%= revision_link %>).
  32. More information about this environment at <a href='http://www.redmine.org/projects/redmine/wiki/Continuous_integration'>redmine.org</a>.
  33. </p>
  34. <h2><%= shortened_filename source_file %> (<%= "%.1f" % source_file.covered_percent %> %)</h2>
  35. <div class="source">
  36. <% source_file.lines.each_with_index do |line, i| %>
  37. <pre class="<%= line.status %>" data-hits="<%= line.coverage ? line.coverage : '' %>" data-linenumber="<%= line.number %>"
  38. ><code class="ruby"><%= i.to_s.rjust 4 %> <%= CGI.escapeHTML(line.src.chomp) %></code></pre>
  39. <% end %>
  40. </div>