edouard-metric_fu 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/HISTORY +119 -0
  2. data/MIT-LICENSE +22 -0
  3. data/Manifest.txt +25 -0
  4. data/README +1 -0
  5. data/Rakefile +47 -0
  6. data/TODO +14 -0
  7. data/lib/base/base_template.rb +134 -0
  8. data/lib/base/configuration.rb +207 -0
  9. data/lib/base/generator.rb +160 -0
  10. data/lib/base/graph.rb +37 -0
  11. data/lib/base/md5_tracker.rb +52 -0
  12. data/lib/base/report.rb +100 -0
  13. data/lib/generators/churn.rb +91 -0
  14. data/lib/generators/flay.rb +34 -0
  15. data/lib/generators/flog.rb +133 -0
  16. data/lib/generators/rcov.rb +87 -0
  17. data/lib/generators/reek.rb +37 -0
  18. data/lib/generators/roodi.rb +31 -0
  19. data/lib/generators/saikuro.rb +209 -0
  20. data/lib/generators/stats.rb +43 -0
  21. data/lib/graphs/flay_grapher.rb +34 -0
  22. data/lib/graphs/flog_grapher.rb +37 -0
  23. data/lib/graphs/rcov_grapher.rb +34 -0
  24. data/lib/graphs/reek_grapher.rb +44 -0
  25. data/lib/graphs/roodi_grapher.rb +34 -0
  26. data/lib/metric_fu.rb +24 -0
  27. data/lib/templates/awesome/awesome_template.rb +30 -0
  28. data/lib/templates/awesome/churn.html.erb +19 -0
  29. data/lib/templates/awesome/default.css +66 -0
  30. data/lib/templates/awesome/flay.html.erb +27 -0
  31. data/lib/templates/awesome/flog.html.erb +46 -0
  32. data/lib/templates/awesome/index.html.erb +28 -0
  33. data/lib/templates/awesome/layout.html.erb +27 -0
  34. data/lib/templates/awesome/rcov.html.erb +36 -0
  35. data/lib/templates/awesome/reek.html.erb +34 -0
  36. data/lib/templates/awesome/roodi.html.erb +21 -0
  37. data/lib/templates/awesome/saikuro.html.erb +71 -0
  38. data/lib/templates/awesome/stats.html.erb +41 -0
  39. data/lib/templates/standard/churn.html.erb +31 -0
  40. data/lib/templates/standard/default.css +64 -0
  41. data/lib/templates/standard/flay.html.erb +34 -0
  42. data/lib/templates/standard/flog.html.erb +53 -0
  43. data/lib/templates/standard/index.html.erb +38 -0
  44. data/lib/templates/standard/rcov.html.erb +43 -0
  45. data/lib/templates/standard/reek.html.erb +42 -0
  46. data/lib/templates/standard/roodi.html.erb +29 -0
  47. data/lib/templates/standard/saikuro.html.erb +84 -0
  48. data/lib/templates/standard/standard_template.rb +26 -0
  49. data/lib/templates/standard/stats.html.erb +55 -0
  50. data/spec/base/base_template_spec.rb +140 -0
  51. data/spec/base/configuration_spec.rb +303 -0
  52. data/spec/base/generator_spec.rb +181 -0
  53. data/spec/base/md5_tracker_spec.rb +57 -0
  54. data/spec/base/report_spec.rb +139 -0
  55. data/spec/generators/churn_spec.rb +152 -0
  56. data/spec/generators/flay_spec.rb +104 -0
  57. data/spec/generators/flog_spec.rb +208 -0
  58. data/spec/generators/reek_spec.rb +60 -0
  59. data/spec/generators/saikuro_spec.rb +63 -0
  60. data/spec/generators/stats_spec.rb +74 -0
  61. data/spec/spec_helper.rb +28 -0
  62. data/tasks/metric_fu.rake +19 -0
  63. data/tasks/railroad.rake +39 -0
  64. data/vendor/_fonts/monaco.ttf +0 -0
  65. data/vendor/saikuro/saikuro.rb +1214 -0
  66. metadata +174 -0
@@ -0,0 +1,46 @@
1
+ <h3>Flog Results</h3>
2
+ <p><a href='http://ruby.sadi.st/Flog.html'>Flog</a> measures code complexity.</p>
3
+
4
+ <img src="flog.png?<%= Time.now %>">
5
+
6
+ <h2>Total Flog score for all methods: <%= @flog[:total]%></h2>
7
+ <h2>Average Flog score for all methods: <%= @flog[:average]%></h2>
8
+
9
+ <table>
10
+ <tr>
11
+ <th>File</th>
12
+ <th>Total score</th>
13
+ <th>Methods</th>
14
+ <th>Average score</th>
15
+ <th>Highest score</th>
16
+ </tr>
17
+ <% @flog[:pages].each do |page| %>
18
+ <tr>
19
+ <td><a href="#<%= page[:path].gsub(/[^a-z]+/, '_') %>"><%= page[:path] %></a></td>
20
+ <td><%= page[:score].round %></td>
21
+ <td><%= page[:scanned_methods].length %></td>
22
+ <td><%= page[:average_score].round %></td>
23
+ <td><%= page[:highest_score].round %></td>
24
+ </tr>
25
+ <% end %>
26
+ </table>
27
+
28
+ <% @flog[:pages].each do |page| %>
29
+ <h2 id="<%= page[:path].gsub(/[^a-z]+/, '_') %>"><%= page[:path] %></h2>
30
+ <% page[:scanned_methods].each do |sm| %>
31
+ <p><%= sm[:name] %></p>
32
+ <table>
33
+ <tr>
34
+ <th>Score</th>
35
+ <th>Operator</th>
36
+ </tr>
37
+ <% sm[:operators].each do |operator| %>
38
+ <tr>
39
+ <td><%= operator[:score] %></td>
40
+ <td><%= operator[:operator] %></td>
41
+ </tr>
42
+ <% end %>
43
+ </table>
44
+ <% end %>
45
+ <% end %>
46
+ <p>Generated on <%= Time.now.localtime %></p>
@@ -0,0 +1,28 @@
1
+ <h3>Metric Fu Results</h3>
2
+ <ul id='projects'>
3
+ <% if @churn %>
4
+ <li class='even failure'><a href="churn.html">Churn</a></li>
5
+ <% end %>
6
+ <% if @flay %>
7
+ <li class='even failure'><a href="flay.html">Flay</a></li>
8
+ <% end %>
9
+ <% if @flog %>
10
+ <li class='even failure'><a href="flog.html">Flog</a></li>
11
+ <% end %>
12
+ <% if @rcov %>
13
+ <li class='even failure'><a href="rcov.html">Rcov</a></li>
14
+ <% end %>
15
+ <% if @reek %>
16
+ <li class='even failure'><a href="reek.html">Reek</a></li>
17
+ <% end %>
18
+ <% if @roodi %>
19
+ <li class='even failure'><a href="roodi.html">Roodi</a></li>
20
+ <% end %>
21
+ <% if @saikuro %>
22
+ <li class='even failure'><a href="saikuro.html">Saikuro</a></li>
23
+ <% end %>
24
+ <% if @stats %>
25
+ <li class='even failure'><a href="stats.html">Stats</a></li>
26
+ <% end %>
27
+ </ul>
28
+ <p>Generated on <%= Time.now.localtime %></p>
@@ -0,0 +1,27 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
5
+ <meta content='en' http-equiv='Content-Language' />
6
+ <title>metrics</title>
7
+ <link href='/reset.css' rel='stylesheet' type='text/css' />
8
+ <link href='/buttons.css' rel='stylesheet' type='text/css' />
9
+ <link href='/integrity.css' rel='stylesheet' type='text/css' />
10
+ <style>
11
+ <%= inline_css("default.css") %>
12
+ </style>
13
+ <link REL="SHORTCUT ICON" HREF="/favicon.ico">
14
+ </head>
15
+ <body>
16
+ <div id='header'>
17
+ <h1><a href="/">metrics</a> | <a href="index.html"><%= @name %></a></h1>
18
+ <address class='watermark'>
19
+ built with
20
+ <a href='http://metric-fu.rubyforge.org/'>metric-fu</a>
21
+ </address>
22
+ </div>
23
+ <div id='content'>
24
+ <%= @html %>
25
+ </div>
26
+ </body>
27
+ </html>
@@ -0,0 +1,36 @@
1
+ <h3>Rcov Code Coverage Results</h3>
2
+
3
+ <p>C0 code coverage information.</p>
4
+
5
+ <img src="rcov.png?<%= Time.now %>">
6
+
7
+ <p>Total Coverage: <%= @rcov.delete(:global_percent_run) %>% </p>
8
+ <table>
9
+ <tr>
10
+ <th>File Path</th>
11
+ <th>Percent run</th>
12
+ </tr>
13
+ <% count = 0 %>
14
+ <% @rcov.sort_by{ |k,v| v[:percent_run] }.each do |fname, file| %>
15
+ <tr>
16
+ <td><a href="#<%= fname.gsub(/[^a-z]+/, '_') %>"><%= fname %></a></td>
17
+ <td><%= file[:percent_run] %></td>
18
+ </tr>
19
+ <% count += 1 %>
20
+ <% end %>
21
+ </table>
22
+
23
+ <% @rcov.sort_by{ |k,v| v[:percent_run] }.each do |fname, file| %>
24
+ <h2 id="<%= fname.gsub(/[^a-z]+/, '_') %>"> <%= fname %></h2>
25
+ <div class="rcov_overflow">
26
+ <table class="rcov_code">
27
+ <% file[:lines].each do |line| %>
28
+ <tr>
29
+ <% css_class = line[:was_run] ? "rcov_run" : "rcov_not_run" %>
30
+ <td class="<%= css_class %>"><pre><%= line[:content] %></pre></td>
31
+ </tr>
32
+ <% end %>
33
+ </table>
34
+ </div>
35
+ <% end %>
36
+ <p>Generated on <%= Time.now.localtime %></p>
@@ -0,0 +1,34 @@
1
+ <h3>Reek Results</h3>
2
+
3
+ <p><a href="http://reek.rubyforge.org/">Reek</a> detects common code smells in ruby code.</p>
4
+
5
+ <img src="reek.png?<%= Time.now %>">
6
+
7
+ <table>
8
+ <tr>
9
+ <th>File Path</th>
10
+ <th>Method</th>
11
+ <th>Description</th>
12
+ <th>Type</th>
13
+ </tr>
14
+ <% count = 0 %>
15
+ <% @reek[:matches].each do |match| %>
16
+ <% match[:code_smells].each do |smell| %>
17
+ <tr class='<%= cycle("light", "dark", count) %>'>
18
+ <td><%= match[:file_path] %></td>
19
+ <td>
20
+ <%= smell[:method] %>
21
+ </td>
22
+ <td>
23
+ <%= smell[:message] %>
24
+ </td>
25
+ <td>
26
+ <%= smell[:type] %>
27
+ </td>
28
+ </tr>
29
+ <% count += 1 %>
30
+ <% end %>
31
+ <% end %>
32
+
33
+ </table>
34
+ <p>Generated on <%= Time.now.localtime %></p>
@@ -0,0 +1,21 @@
1
+ <h3>Roodi Results</h3>
2
+
3
+ <p><a href="http://roodi.rubyforge.org/">Roodi</a> parses your Ruby code and warns you about design issues you have based on the checks that is has configured.</p>
4
+
5
+ <img src="roodi.png?<%= Time.now %>">
6
+
7
+ <table>
8
+ <tr>
9
+ <th>File Path</th>
10
+ <th>Warning</th>
11
+ </tr>
12
+ <% count = 0 %>
13
+ <% @roodi[:problems].each do |problem| %>
14
+ <tr class='<%= cycle("light", "dark", count) %>'>
15
+ <td><%= problem[:file] %>:<%= problem[:line] %></td>
16
+ <td><%= problem[:problem] %></td>
17
+ </tr>
18
+ <% count += 1 %>
19
+ <% end %>
20
+ </table>
21
+ <p>Generated on <%= Time.now.localtime %></p>
@@ -0,0 +1,71 @@
1
+ <h3>Saikuro Results</h3>
2
+ <p><a href='http://saikuro.rubyforge.org/'>Saikuro</a> analyzes ruby code for cyclomatic complexity.</p>
3
+
4
+ <h2>Analyzed Methods</h2>
5
+ <table>
6
+ <tr>
7
+ <th>Method Name</th>
8
+ <th>Complexity</th>
9
+ <th># Lines</th>
10
+ </tr>
11
+ <% @saikuro[:methods].each do |method| %>
12
+ <tr>
13
+ <td><%= method[:name] %></td>
14
+ <td><%= method[:complexity] %></td>
15
+ <td><%= method[:lines] %></td>
16
+ </tr>
17
+ <% end %>
18
+ </table>
19
+
20
+
21
+
22
+ <h2>Analyzed Classes</h2>
23
+ <table>
24
+ <tr>
25
+ <th>Class Name</th>
26
+ <th>Complexity</th>
27
+ <th># Lines</th>
28
+ </tr>
29
+ <% @saikuro[:classes].each do |klass| %>
30
+ <tr>
31
+ <td><%= klass[:name] %></td>
32
+ <td><%= klass[:complexity] %></td>
33
+ <td><%= klass[:lines] %></td>
34
+ </tr>
35
+ <% end %>
36
+ </table>
37
+
38
+
39
+ <h2>Analyzed Files</h2>
40
+ <% @saikuro[:files].each do |file| %>
41
+ <% file[:classes].each do |klass| %>
42
+ <% if !klass[:methods].empty? %>
43
+ <h3><%= file[:filename] %></h3>
44
+ <h4>Class : <%= klass[:class_name] %></h4>
45
+ <h5>Total complexity : <%= klass[:complexity] %></h5>
46
+ <h5>Total lines : <%= klass[:lines] %></h5>
47
+ <table>
48
+ <tr>
49
+ <th>Method</th>
50
+ <th>Complexity</th>
51
+ <th># Lines</th>
52
+ </tr>
53
+ <% klass[:methods].each do |method| %>
54
+ <tr>
55
+ <td>
56
+ <%= method[:name] %>
57
+ </td>
58
+ <td>
59
+ <%= method[:complexity] %>
60
+ </td>
61
+ <td>
62
+ <%= method[:lines] %>
63
+ </td>
64
+ </tr>
65
+ <% end %>
66
+ </table>
67
+ <% end %>
68
+ <% end %>
69
+ <% end %>
70
+
71
+ <p>Generated on <%= Time.now.localtime %></p>
@@ -0,0 +1,41 @@
1
+ <h3>Rake Stats Results</h3>
2
+ <p>Rails rake stats results.</p>
3
+ <table>
4
+ <tr>
5
+ <th>Lines of Code</th>
6
+ <th>Lines of Test</th>
7
+ <th>Code to test ratio</th>
8
+ </tr>
9
+ <tr>
10
+ <td><%= @stats[:codeLOC] %></td>
11
+ <td><%= @stats[:testLOC] %></td>
12
+ <td>1:<%= @stats[:code_to_test_ratio] %></td>
13
+ </tr>
14
+ </table>
15
+
16
+ <table>
17
+ <tr>
18
+ <th>Name</th>
19
+ <th>Lines</th>
20
+ <th>LOC</th>
21
+ <th>Classes</th>
22
+ <th>Methods</th>
23
+ <th>Methods per class</th>
24
+ <th>LOC per method</th>
25
+ </tr>
26
+ <% count = 0 %>
27
+ <% @stats[:lines].each do |line| %>
28
+ <tr>
29
+ <td><%= line[:name] %></td>
30
+ <td><%= line[:lines] %></td>
31
+ <td><%= line[:loc] %></td>
32
+ <td><%= line[:classes] %></td>
33
+ <td><%= line[:methods] %></td>
34
+ <td><%= line[:methods_per_class] %></td>
35
+ <td><%= line[:loc_per_method] %></td>
36
+ </tr>
37
+ <% count += 1 %>
38
+ <% end %>
39
+ </table>
40
+
41
+ <p>Generated on <%= Time.now.localtime %></p>
@@ -0,0 +1,31 @@
1
+ <html>
2
+ <head>
3
+ <title>Source Control Churn Results</title>
4
+ <style>
5
+ <%= inline_css("default.css") %>
6
+ </style>
7
+ </head>
8
+
9
+ <body>
10
+ <h1>Source Control Churn Results</h1>
11
+ <a href="index.html">back to menu</a>
12
+ <p>Files that change a lot in your project may be bad a sign.
13
+ This task uses your source control log to identify those files.
14
+ </p>
15
+ <table>
16
+ <tr>
17
+ <th>File Path</th>
18
+ <th>Times Changed</th>
19
+ </tr>
20
+ <% count = 0 %>
21
+ <% @churn[:changes].each do |change| %>
22
+ <tr>
23
+ <td><%= change[:file_path] %></td>
24
+ <td><%= change[:times_changed] %></td>
25
+ </tr>
26
+ <% count += 1 %>
27
+ <% end %>
28
+ </table>
29
+ <p>Generated on <%= Time.now.localtime %></p>
30
+ </body>
31
+ </html>
@@ -0,0 +1,64 @@
1
+ body {
2
+ background-color: #efefef;
3
+ margin: 20px;
4
+ padding: 0;
5
+ font: 12px verdana, arial, helvetica;
6
+ }
7
+
8
+ table {
9
+ border-collapse: collapse;
10
+ border: 1px solid #666;
11
+ background: #fff;
12
+ margin-bottom: 20px;
13
+ }
14
+
15
+ table tr.light {
16
+ background: #fff;
17
+ }
18
+
19
+ table tr.dark {
20
+ background: #f9f9f9;
21
+ }
22
+
23
+ table td, table th {
24
+ padding: 4px 10px;
25
+ font-size: 13px;
26
+ }
27
+ table th {
28
+ text-align: center;
29
+ color: #fc0;
30
+ background: #336;
31
+ font-weight: bold;
32
+ border: #d0d0d0 1px solid;
33
+ }
34
+
35
+ table td {
36
+ border: #d0d0d0 1px solid;
37
+ }
38
+
39
+ table td.score {
40
+ text-align: right;
41
+ }
42
+
43
+ .warning {
44
+ background: yellow;
45
+ }
46
+ .rcov_code td {
47
+ border-bottom: 1px solid #ddd ;
48
+ padding: 0;
49
+ margin: 0;
50
+ }
51
+ .rcov_code tr {
52
+ border: 0px;
53
+ padding:0px;
54
+ margin: 0px;
55
+ }
56
+ .rcov_code pre {
57
+ border: 0px;
58
+ padding: 0px;
59
+ margin: 0px;
60
+ }
61
+ .rcov_run {}
62
+ .rcov_not_run {
63
+ background-color: #d88;
64
+ }
@@ -0,0 +1,34 @@
1
+ <html>
2
+ <head>
3
+ <title>Flay Results</title>
4
+ <style>
5
+ <%= inline_css("default.css") %>
6
+ </style>
7
+ </head>
8
+
9
+ <body>
10
+ <h1>Flay Results</h1>
11
+ <a href="index.html">back to menu</a>
12
+ <h2>Total Score (lower is better): <%= @flay[:total_score] %></h2>
13
+ <p><a href='http://ruby.sadi.st/Flay.html'>Flay</a> analyzes ruby code for structural similarities.</p>
14
+ <table>
15
+ <tr>
16
+ <th>Files</th>
17
+ <th>Matches</th>
18
+ </tr>
19
+ <% count = 0 %>
20
+ <% @flay[:matches].each do |match| %>
21
+ <tr class='<%= cycle("light", "dark", count) %>'>
22
+ <td>
23
+ <% match[:matches].each do |file| %>
24
+ <%= file[:name] %>:<%= file[:line] %><br />
25
+ <% end %>
26
+ </td>
27
+ <td><%= match[:reason] %></td>
28
+ </tr>
29
+ <% count += 1 %>
30
+ <% end %>
31
+ </table>
32
+ <p>Generated on <%= Time.now.localtime %></p>
33
+ </body>
34
+ </html>
@@ -0,0 +1,53 @@
1
+ <html>
2
+ <head>
3
+ <title>Flog Reporter</title>
4
+ <style>
5
+ <%= inline_css("default.css") %>
6
+ </style>
7
+ </head>
8
+ <body>
9
+ <h1>Flog Results</h1>
10
+ <a href="index.html">back to menu</a>
11
+ <p><a href='http://ruby.sadi.st/Flog.html'>Flog</a> measures code complexity.</p>
12
+ <h2>Total Flog score for all methods: <%= @flog[:total]%></h2>
13
+ <h2>Average Flog score for all methods: <%= @flog[:average]%></h2>
14
+ <table>
15
+ <tr>
16
+ <th>File</th>
17
+ <th>Total score</th>
18
+ <th>Methods</th>
19
+ <th>Average score</th>
20
+ <th>Highest score</th>
21
+ </tr>
22
+ <% @flog[:pages].each do |page| %>
23
+ <tr>
24
+ <td><a href="#<%= page[:path].gsub(/[^a-z]+/, '_') %>"><%= page[:path] %></a></td>
25
+ <td><%= page[:score].round %></td>
26
+ <td><%= page[:scanned_methods].length %></td>
27
+ <td><%= page[:average_score].round %></td>
28
+ <td><%= page[:highest_score].round %></td>
29
+ </tr>
30
+ <% end %>
31
+ </table>
32
+
33
+ <% @flog[:pages].each do |page| %>
34
+ <h2 id="<%= page[:path].gsub(/[^a-z]+/, '_') %>"><%= page[:path] %></h2>
35
+ <% page[:scanned_methods].each do |sm| %>
36
+ <p><%= sm[:name] %></p>
37
+ <table>
38
+ <tr>
39
+ <th>Score</th>
40
+ <th>Operator</th>
41
+ </tr>
42
+ <% sm[:operators].each do |operator| %>
43
+ <tr>
44
+ <td><%= operator[:score] %></td>
45
+ <td><%= operator[:operator] %></td>
46
+ </tr>
47
+ <% end %>
48
+ </table>
49
+ <% end %>
50
+ <% end %>
51
+ <p>Generated on <%= Time.now.localtime %></p>
52
+ </body>
53
+ </html>
@@ -0,0 +1,38 @@
1
+ <html>
2
+ <head>
3
+ <title>Metric Fu Results</title>
4
+ <style>
5
+ <%= inline_css("default.css") %>
6
+ </style>
7
+ </head>
8
+
9
+ <body>
10
+ <h1>Metric Fu Results</h1>
11
+ <% if @churn %>
12
+ <p><a href="churn.html">Churn report</a></p>
13
+ <% end %>
14
+ <% if @flay %>
15
+ <p><a href="flay.html">Flay report</a></p>
16
+ <% end %>
17
+ <% if @flog %>
18
+ <p><a href="flog.html">Flog report</a></p>
19
+ <% end %>
20
+ <% if @rcov %>
21
+ <p><a href="rcov.html">Rcov report</a></p>
22
+ <% end %>
23
+ <% if @reek %>
24
+ <p><a href="reek.html">Reek report</a></p>
25
+ <% end %>
26
+ <% if @roodi %>
27
+ <p><a href="roodi.html">Roodi report</a></p>
28
+ <% end %>
29
+ <% if @saikuro %>
30
+ <p><a href="saikuro.html">Saikuro report</a></p>
31
+ <% end %>
32
+ <% if @stats %>
33
+ <p><a href="stats.html">Stats report</a></p>
34
+ <% end %>
35
+ <p>Generated on <%= Time.now.localtime %></p>
36
+ </body>
37
+ </html>
38
+
@@ -0,0 +1,43 @@
1
+ <html>
2
+ <head>
3
+ <title>Rcov Code Coverage Results</title>
4
+ <style>
5
+ <%= inline_css("default.css") %>
6
+ </style>
7
+ </head>
8
+
9
+ <body>
10
+ <h1>Rcov Code Coverage Results</h1>
11
+ <a href="index.html">back to menu</a>
12
+ <p>C0 code coverage information.</p>
13
+ <p>Total Coverage: <%= @rcov.delete(:global_percent_run) %>% </p>
14
+ <table>
15
+ <tr>
16
+ <th>File Path</th>
17
+ <th>Percent run</th>
18
+ </tr>
19
+ <% count = 0 %>
20
+ <% @rcov.sort_by{|k,v| v[:percent_run]}.each do |e| %>
21
+ <tr>
22
+ <td><a href="#<%= e[0].gsub(/[^a-z]+/, '_') %>"><%= e[0] %></a></td>
23
+ <td><%= e[1][:percent_run] %></td>
24
+ </tr>
25
+ <% count += 1 %>
26
+ <% end %>
27
+ </table>
28
+
29
+ <% @rcov.each_pair do |fname, file| %>
30
+ <h2 id="<%= fname.gsub(/[^a-z]+/, '_') %>"> <%= fname %></h2>
31
+ <table class="rcov_code">
32
+ <% file[:lines].each do |line| %>
33
+ <tr>
34
+ <% css_class = line[:was_run] ? "rcov_run" : "rcov_not_run" %>
35
+ <td class="<%= css_class %>"><pre><%= line[:content] %></pre></td>
36
+ </tr>
37
+ <% end %>
38
+ </table>
39
+ <% end %>
40
+ <p>Generated on <%= Time.now.localtime %></p>
41
+ </body>
42
+ </html>
43
+
@@ -0,0 +1,42 @@
1
+ <html>
2
+ <head>
3
+ <title>Reek Results</title>
4
+ <style>
5
+ <%= inline_css("default.css") %>
6
+ </style>
7
+ </head>
8
+
9
+ <body>
10
+ <h1>Reek Results</h1>
11
+ <a href="index.html">back to menu</a>
12
+ <p><a href="http://reek.rubyforge.org/">Reek</a> detects common code smells in ruby code.</p>
13
+ <table>
14
+ <tr>
15
+ <th>File Path</th>
16
+ <th>Method</th>
17
+ <th>Description</th>
18
+ <th>Type</th>
19
+ </tr>
20
+ <% count = 0 %>
21
+ <% @reek[:matches].each do |match| %>
22
+ <% match[:code_smells].each do |smell| %>
23
+ <tr class='<%= cycle("light", "dark", count) %>'>
24
+ <td><%= match[:file_path] %></td>
25
+ <td>
26
+ <%= smell[:method] %>
27
+ </td>
28
+ <td>
29
+ <%= smell[:message] %>
30
+ </td>
31
+ <td>
32
+ <%= smell[:type] %>
33
+ </td>
34
+ </tr>
35
+ <% count += 1 %>
36
+ <% end %>
37
+ <% end %>
38
+
39
+ </table>
40
+ <p>Generated on <%= Time.now.localtime %></p>
41
+ </body>
42
+ </html>
@@ -0,0 +1,29 @@
1
+ <html>
2
+ <head>
3
+ <title>Roodi Results</title>
4
+ <style>
5
+ <%= inline_css("default.css") %>
6
+ </style>
7
+ </head>
8
+
9
+ <body>
10
+ <h1>Roodi Results</h1>
11
+ <a href="index.html">back to menu</a>
12
+ <p><a href="http://roodi.rubyforge.org/">Roodi</a> parses your Ruby code and warns you about design issues you have based on the checks that is has configured.</p>
13
+ <table>
14
+ <tr>
15
+ <th>File Path</th>
16
+ <th>Warning</th>
17
+ </tr>
18
+ <% count = 0 %>
19
+ <% @roodi[:problems].each do |problem| %>
20
+ <tr class='<%= cycle("light", "dark", count) %>'>
21
+ <td><%= problem[:file] %>:<%= problem[:line] %></td>
22
+ <td><%= problem[:problem] %></td>
23
+ </tr>
24
+ <% count += 1 %>
25
+ <% end %>
26
+ </table>
27
+ <p>Generated on <%= Time.now.localtime %></p>
28
+ </body>
29
+ </html>