rferraz-metric_fu 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY +237 -0
- data/MIT-LICENSE +22 -0
- data/README +29 -0
- data/Rakefile +18 -0
- data/TODO +6 -0
- data/lib/base/base_template.rb +172 -0
- data/lib/base/churn_analyzer.rb +38 -0
- data/lib/base/code_issue.rb +97 -0
- data/lib/base/configuration.rb +199 -0
- data/lib/base/flay_analyzer.rb +50 -0
- data/lib/base/flog_analyzer.rb +43 -0
- data/lib/base/generator.rb +166 -0
- data/lib/base/graph.rb +44 -0
- data/lib/base/line_numbers.rb +74 -0
- data/lib/base/location.rb +85 -0
- data/lib/base/md5_tracker.rb +52 -0
- data/lib/base/metric_analyzer.rb +404 -0
- data/lib/base/ranking.rb +34 -0
- data/lib/base/rcov_analyzer.rb +43 -0
- data/lib/base/reek_analyzer.rb +163 -0
- data/lib/base/report.rb +108 -0
- data/lib/base/roodi_analyzer.rb +37 -0
- data/lib/base/saikuro_analyzer.rb +48 -0
- data/lib/base/scoring_strategies.rb +29 -0
- data/lib/base/stats_analyzer.rb +37 -0
- data/lib/base/table.rb +102 -0
- data/lib/generators/churn.rb +28 -0
- data/lib/generators/flay.rb +31 -0
- data/lib/generators/flog.rb +111 -0
- data/lib/generators/hotspots.rb +52 -0
- data/lib/generators/rails_best_practices.rb +53 -0
- data/lib/generators/rcov.rb +122 -0
- data/lib/generators/reek.rb +81 -0
- data/lib/generators/roodi.rb +35 -0
- data/lib/generators/saikuro.rb +256 -0
- data/lib/generators/stats.rb +58 -0
- data/lib/graphs/engines/bluff.rb +113 -0
- data/lib/graphs/engines/gchart.rb +157 -0
- data/lib/graphs/flay_grapher.rb +18 -0
- data/lib/graphs/flog_grapher.rb +57 -0
- data/lib/graphs/grapher.rb +11 -0
- data/lib/graphs/rails_best_practices_grapher.rb +19 -0
- data/lib/graphs/rcov_grapher.rb +18 -0
- data/lib/graphs/reek_grapher.rb +30 -0
- data/lib/graphs/roodi_grapher.rb +18 -0
- data/lib/graphs/stats_grapher.rb +20 -0
- data/lib/metric_fu.rb +40 -0
- data/lib/templates/awesome/awesome_template.rb +73 -0
- data/lib/templates/awesome/churn.html.erb +58 -0
- data/lib/templates/awesome/css/buttons.css +82 -0
- data/lib/templates/awesome/css/default.css +91 -0
- data/lib/templates/awesome/css/integrity.css +334 -0
- data/lib/templates/awesome/css/reset.css +7 -0
- data/lib/templates/awesome/css/syntax.css +19 -0
- data/lib/templates/awesome/flay.html.erb +34 -0
- data/lib/templates/awesome/flog.html.erb +55 -0
- data/lib/templates/awesome/hotspots.html.erb +62 -0
- data/lib/templates/awesome/index.html.erb +34 -0
- data/lib/templates/awesome/layout.html.erb +30 -0
- data/lib/templates/awesome/rails_best_practices.html.erb +27 -0
- data/lib/templates/awesome/rcov.html.erb +42 -0
- data/lib/templates/awesome/reek.html.erb +40 -0
- data/lib/templates/awesome/roodi.html.erb +27 -0
- data/lib/templates/awesome/saikuro.html.erb +71 -0
- data/lib/templates/awesome/stats.html.erb +51 -0
- data/lib/templates/javascripts/bluff-min.js +1 -0
- data/lib/templates/javascripts/excanvas.js +35 -0
- data/lib/templates/javascripts/js-class.js +1 -0
- data/lib/templates/standard/churn.html.erb +31 -0
- data/lib/templates/standard/default.css +64 -0
- data/lib/templates/standard/flay.html.erb +34 -0
- data/lib/templates/standard/flog.html.erb +57 -0
- data/lib/templates/standard/hotspots.html.erb +54 -0
- data/lib/templates/standard/index.html.erb +41 -0
- data/lib/templates/standard/rails_best_practices.html.erb +29 -0
- data/lib/templates/standard/rcov.html.erb +43 -0
- data/lib/templates/standard/reek.html.erb +42 -0
- data/lib/templates/standard/roodi.html.erb +29 -0
- data/lib/templates/standard/saikuro.html.erb +84 -0
- data/lib/templates/standard/standard_template.rb +26 -0
- data/lib/templates/standard/stats.html.erb +55 -0
- data/spec/base/base_template_spec.rb +177 -0
- data/spec/base/configuration_spec.rb +276 -0
- data/spec/base/generator_spec.rb +223 -0
- data/spec/base/graph_spec.rb +61 -0
- data/spec/base/line_numbers_spec.rb +62 -0
- data/spec/base/md5_tracker_spec.rb +57 -0
- data/spec/base/report_spec.rb +146 -0
- data/spec/generators/churn_spec.rb +41 -0
- data/spec/generators/flay_spec.rb +105 -0
- data/spec/generators/flog_spec.rb +70 -0
- data/spec/generators/rails_best_practices_spec.rb +52 -0
- data/spec/generators/rcov_spec.rb +180 -0
- data/spec/generators/reek_spec.rb +134 -0
- data/spec/generators/roodi_spec.rb +24 -0
- data/spec/generators/saikuro_spec.rb +74 -0
- data/spec/generators/stats_spec.rb +74 -0
- data/spec/graphs/engines/bluff_spec.rb +19 -0
- data/spec/graphs/engines/gchart_spec.rb +156 -0
- data/spec/graphs/flay_grapher_spec.rb +56 -0
- data/spec/graphs/flog_grapher_spec.rb +108 -0
- data/spec/graphs/rails_best_practices_grapher_spec.rb +61 -0
- data/spec/graphs/rcov_grapher_spec.rb +56 -0
- data/spec/graphs/reek_grapher_spec.rb +65 -0
- data/spec/graphs/roodi_grapher_spec.rb +56 -0
- data/spec/graphs/stats_grapher_spec.rb +68 -0
- data/spec/resources/line_numbers/foo.rb +33 -0
- data/spec/resources/line_numbers/module.rb +11 -0
- data/spec/resources/line_numbers/module_surrounds_class.rb +15 -0
- data/spec/resources/line_numbers/two_classes.rb +11 -0
- data/spec/resources/saikuro/app/controllers/sessions_controller.rb_cyclo.html +10 -0
- data/spec/resources/saikuro/app/controllers/users_controller.rb_cyclo.html +16 -0
- data/spec/resources/saikuro/index_cyclo.html +155 -0
- data/spec/resources/saikuro_sfiles/thing.rb_cyclo.html +11 -0
- data/spec/resources/yml/20090630.yml +7922 -0
- data/spec/resources/yml/metric_missing.yml +1 -0
- data/spec/spec.opts +6 -0
- data/spec/spec_helper.rb +7 -0
- data/tasks/metric_fu.rake +22 -0
- metadata +448 -0
@@ -0,0 +1,91 @@
|
|
1
|
+
table {
|
2
|
+
margin-top: 20px;
|
3
|
+
border-collapse: collapse;
|
4
|
+
border: 1px solid #666;
|
5
|
+
background: #fff;
|
6
|
+
margin-bottom: 20px;
|
7
|
+
}
|
8
|
+
|
9
|
+
table tr.light {
|
10
|
+
background: #fff;
|
11
|
+
}
|
12
|
+
|
13
|
+
table tr.dark {
|
14
|
+
background: #f9f9f9;
|
15
|
+
}
|
16
|
+
|
17
|
+
table tr:hover {
|
18
|
+
background: #FFFFC0;
|
19
|
+
}
|
20
|
+
|
21
|
+
table td, table th {
|
22
|
+
padding: 4px;
|
23
|
+
font-size: 11px;
|
24
|
+
}
|
25
|
+
table th {
|
26
|
+
text-align: center;
|
27
|
+
color: #337022;
|
28
|
+
background: #DDFFCC;
|
29
|
+
font-weight: bold;
|
30
|
+
border: #99D688 1px solid;
|
31
|
+
}
|
32
|
+
|
33
|
+
table td {
|
34
|
+
border: #d0d0d0 1px solid;
|
35
|
+
}
|
36
|
+
|
37
|
+
table td.score {
|
38
|
+
text-align: right;
|
39
|
+
}
|
40
|
+
|
41
|
+
.warning {
|
42
|
+
background: yellow;
|
43
|
+
}
|
44
|
+
.rcov_code td {
|
45
|
+
border-bottom: 1px solid #ddd ;
|
46
|
+
padding: 0;
|
47
|
+
margin: 0;
|
48
|
+
}
|
49
|
+
.rcov_code tr {
|
50
|
+
border: 0px;
|
51
|
+
padding:0px;
|
52
|
+
margin: 0px;
|
53
|
+
}
|
54
|
+
.rcov_code pre {
|
55
|
+
border: 0px;
|
56
|
+
padding: 0px;
|
57
|
+
margin: 0px;
|
58
|
+
}
|
59
|
+
.rcov_run {}
|
60
|
+
.rcov_not_run {
|
61
|
+
background-color: #d88;
|
62
|
+
}
|
63
|
+
.rcov_run a, .rcov_not_run a {
|
64
|
+
text-decoration: none;
|
65
|
+
}
|
66
|
+
.rcov_run a {
|
67
|
+
color: #333;
|
68
|
+
}
|
69
|
+
.rcov_not_run a {
|
70
|
+
color: #000;
|
71
|
+
}
|
72
|
+
.rcov_overflow {
|
73
|
+
overflow: auto;
|
74
|
+
font-size: 50%;
|
75
|
+
}
|
76
|
+
|
77
|
+
.bluff-tooltip {
|
78
|
+
background: #fff;
|
79
|
+
border: 1px solid #d1edf5;
|
80
|
+
padding: 8px 8px 6px;
|
81
|
+
}
|
82
|
+
.bluff-tooltip .color {
|
83
|
+
display: block;
|
84
|
+
height: 4px;
|
85
|
+
width: 30px;
|
86
|
+
margin: 0 0 4px;
|
87
|
+
overflow: hidden;
|
88
|
+
}
|
89
|
+
.bluff-tooltip .data {
|
90
|
+
font-weight: bold;
|
91
|
+
}
|
@@ -0,0 +1,334 @@
|
|
1
|
+
html {
|
2
|
+
background-color: #e0e0e0; }
|
3
|
+
|
4
|
+
body {
|
5
|
+
font-size: 100%;
|
6
|
+
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
|
7
|
+
color: #333333; }
|
8
|
+
|
9
|
+
a {
|
10
|
+
color: #ed1556;
|
11
|
+
text-decoration: none; }
|
12
|
+
a:hover {
|
13
|
+
color: #ffffff;
|
14
|
+
background-color: #ed1556; }
|
15
|
+
|
16
|
+
#header, #content, #footer {
|
17
|
+
margin: 0 auto;
|
18
|
+
background: #eeeeee;
|
19
|
+
padding: 0 2em;
|
20
|
+
z-index: 0;
|
21
|
+
position: relative;
|
22
|
+
font-size: 1em; }
|
23
|
+
|
24
|
+
#header {
|
25
|
+
background: #ffffff; }
|
26
|
+
#header h1 {
|
27
|
+
font-weight: bold;
|
28
|
+
font-size: 1.5em; }
|
29
|
+
#header address.watermark {
|
30
|
+
position: absolute;
|
31
|
+
font-weight: bold;
|
32
|
+
right: 3em;
|
33
|
+
top: 0;
|
34
|
+
font-size: .75em;
|
35
|
+
color: #cccccc; }
|
36
|
+
#header address.watermark a {
|
37
|
+
color: #cccccc;
|
38
|
+
font-weight: bold;
|
39
|
+
font-size: 2em; }
|
40
|
+
#header address.watermark a:hover {
|
41
|
+
background: transparent;
|
42
|
+
color: #aaaaaa; }
|
43
|
+
|
44
|
+
#content {
|
45
|
+
padding-top: 1em;
|
46
|
+
padding-bottom: 2em; }
|
47
|
+
#content strong {
|
48
|
+
font-weight: bold; }
|
49
|
+
#content em {
|
50
|
+
font-style: italic; }
|
51
|
+
#content h1, #content h2, #content h3, #content h4, #content h5, #content h6 {
|
52
|
+
color: #4e4e4e; }
|
53
|
+
#content h1 {
|
54
|
+
font-size: 2em;
|
55
|
+
font-weight: bold;
|
56
|
+
margin-bottom: .75em;
|
57
|
+
padding: .25em 0;
|
58
|
+
line-height: 1.2;
|
59
|
+
border-bottom: 1px solid #c0c0c0; }
|
60
|
+
#content h2 {
|
61
|
+
font-weight: bold;
|
62
|
+
font-size: 1.5em;
|
63
|
+
margin: 1em 0 .2em; }
|
64
|
+
#content h3 {
|
65
|
+
font-weight: bold;
|
66
|
+
font-size: 1.25em;
|
67
|
+
margin: .25em 0; }
|
68
|
+
#content h4, #content h5, #content h6 {
|
69
|
+
font-weight: bold;
|
70
|
+
margin-top: .5em; }
|
71
|
+
#content code, #content pre, #content textarea, #content input {
|
72
|
+
font-family: Monaco, Deja Vu Sans Mono, Inconsolata, Consolas, monospace; }
|
73
|
+
#content form p {
|
74
|
+
margin-top: 1em;
|
75
|
+
position: relative; }
|
76
|
+
#content form p.checkbox label {
|
77
|
+
margin-top: 0 !important; }
|
78
|
+
#content form input.text, #content form textarea {
|
79
|
+
width: 30em;
|
80
|
+
padding: .2em .4em;
|
81
|
+
color: #4e4e4e; }
|
82
|
+
#content form input.text {
|
83
|
+
height: 1.4em; }
|
84
|
+
#content form label {
|
85
|
+
float: left;
|
86
|
+
display: block;
|
87
|
+
margin-top: .5em;
|
88
|
+
width: 8em;
|
89
|
+
margin-right: .75em; }
|
90
|
+
#content form .with_errors label {
|
91
|
+
background: red;
|
92
|
+
color: white;
|
93
|
+
position: relative;
|
94
|
+
top: -.7em; }
|
95
|
+
#content form .with_errors.required label {
|
96
|
+
position: static;
|
97
|
+
margin-right: .25em;
|
98
|
+
padding: 0 .2em; }
|
99
|
+
#content form .with_errors input, #content form .with_errors textarea {
|
100
|
+
border: 2px solid #f22;
|
101
|
+
background: #fee;
|
102
|
+
color: #222222; }
|
103
|
+
#content form .required label {
|
104
|
+
float: none;
|
105
|
+
display: block;
|
106
|
+
width: auto;
|
107
|
+
position: relative;
|
108
|
+
font-weight: bold;
|
109
|
+
margin-top: 1em;
|
110
|
+
text-indent: -.65em; }
|
111
|
+
#content form .required label:before {
|
112
|
+
content: "* ";
|
113
|
+
color: #ed1556; }
|
114
|
+
#content form .required input.text {
|
115
|
+
width: 25.6em;
|
116
|
+
font-size: 24px;
|
117
|
+
font-weight: bold; }
|
118
|
+
#content form .normal {
|
119
|
+
margin-top: 2em; }
|
120
|
+
#content form h2.notifier label {
|
121
|
+
float: none;
|
122
|
+
width: auto;
|
123
|
+
margin-right: 0; }
|
124
|
+
#content form h2.notifier label .warning {
|
125
|
+
font-size: .5em;
|
126
|
+
font-weight: normal;
|
127
|
+
color: #999999; }
|
128
|
+
#content form fieldset {
|
129
|
+
padding-bottom: 1em;
|
130
|
+
margin-left: 1.35em;
|
131
|
+
border-bottom: 1px solid #c0c0c0;
|
132
|
+
margin-bottom: 1em; }
|
133
|
+
#content form fieldset h3 {
|
134
|
+
margin-top: 1em;
|
135
|
+
margin-bottom: 0; }
|
136
|
+
#content form fieldset p.normal {
|
137
|
+
margin-top: 1em; }
|
138
|
+
#content form fieldset p label {
|
139
|
+
width: 6.7em; }
|
140
|
+
#content form p.submit {
|
141
|
+
margin-top: 2em; }
|
142
|
+
#content form p.submit:after {
|
143
|
+
display: block;
|
144
|
+
clear: both;
|
145
|
+
float: none;
|
146
|
+
content: ".";
|
147
|
+
text-indent: -9999em;
|
148
|
+
text-align: left; }
|
149
|
+
#content form p.submit.destroy button, #content form p.submit.manual-build button {
|
150
|
+
float: none;
|
151
|
+
display: inline; }
|
152
|
+
#content form p.submit.manual-build button {
|
153
|
+
margin-right: 0; }
|
154
|
+
#content #build form, #content #last_build form {
|
155
|
+
font-size: .75em; }
|
156
|
+
#content #build form p.submit, #content #last_build form p.submit {
|
157
|
+
margin: 0;
|
158
|
+
padding: 0;
|
159
|
+
position: absolute;
|
160
|
+
right: .5em;
|
161
|
+
top: 1.25em; }
|
162
|
+
#content .blank_slate p, #content .error p {
|
163
|
+
position: relative;
|
164
|
+
top: .3em; }
|
165
|
+
#content .blank_slate h1, #content .error h1 {
|
166
|
+
border-width: 0;
|
167
|
+
margin: 0;
|
168
|
+
padding: 0; }
|
169
|
+
#content .blank_slate h1 button, #content .error h1 button {
|
170
|
+
float: none;
|
171
|
+
border: 0 none;
|
172
|
+
background: transparent;
|
173
|
+
display: inline;
|
174
|
+
color: #ed1556;
|
175
|
+
padding: 0.25em 0;
|
176
|
+
margin: 0; }
|
177
|
+
#content .blank_slate h1 button:hover, #content .error h1 button:hover {
|
178
|
+
background: #ed1556;
|
179
|
+
color: #ffffff; }
|
180
|
+
#content .error dt {
|
181
|
+
margin-top: 1.4em;
|
182
|
+
margin-bottom: .3em;
|
183
|
+
font-size: 1.75em;
|
184
|
+
font-family: Georgia, Times New Roman, serif; }
|
185
|
+
#content .error dd {
|
186
|
+
line-height: 1.4; }
|
187
|
+
#content .error .backtrace {
|
188
|
+
margin: 1em 0;
|
189
|
+
overflow: scroll;
|
190
|
+
height: 30em;
|
191
|
+
border: 1px solid #c0c0c0;
|
192
|
+
line-height: 1.6; }
|
193
|
+
#content #projects {
|
194
|
+
margin: 1em 0 2em;
|
195
|
+
border-top: 1px solid #c0c0c0; }
|
196
|
+
#content #projects li {
|
197
|
+
position: relative;
|
198
|
+
border-bottom: 1px solid #c0c0c0; }
|
199
|
+
#content #projects li.odd {
|
200
|
+
background: #e6e6e6; }
|
201
|
+
#content #projects li.building {
|
202
|
+
background: transparent url(/spinner.gif) no-repeat scroll right; }
|
203
|
+
#content #projects li a {
|
204
|
+
font-size: 2em;
|
205
|
+
padding: .25em;
|
206
|
+
line-height: 1.2;
|
207
|
+
font-weight: bold;
|
208
|
+
display: block; }
|
209
|
+
#content #projects li a.success {
|
210
|
+
color: #337022; }
|
211
|
+
#content #projects li a.failed {
|
212
|
+
color: #ff1100; }
|
213
|
+
#content #projects li .meta {
|
214
|
+
position: absolute;
|
215
|
+
right: .6em;
|
216
|
+
top: 1.5em;
|
217
|
+
font-size: 0.8em;
|
218
|
+
color: #999999;
|
219
|
+
text-align: right; }
|
220
|
+
#content #projects li.building .meta {
|
221
|
+
right: 1.6em; }
|
222
|
+
#content #projects li.success .meta {
|
223
|
+
color: #337022; }
|
224
|
+
#content #projects li.failed .meta {
|
225
|
+
color: #ff1100; }
|
226
|
+
#content #previous_builds li a {
|
227
|
+
display: block;
|
228
|
+
padding: .25em;
|
229
|
+
margin-bottom: .25em;
|
230
|
+
border-width: 1px;
|
231
|
+
border-style: solid; }
|
232
|
+
#content #previous_builds li a strong {
|
233
|
+
font-size: 1.3em; }
|
234
|
+
#content #previous_builds li a .attribution {
|
235
|
+
font-size: .9em; }
|
236
|
+
#content #projects li.success a, #content #previous_builds li.success a {
|
237
|
+
background-color: #bbf8aa;
|
238
|
+
border-color: #99d688;
|
239
|
+
color: #337022; }
|
240
|
+
#content #projects li.success a .attribution, #content #previous_builds li.success a .attribution {
|
241
|
+
color: #77b466; }
|
242
|
+
#content #projects li.success a:hover, #content #previous_builds li.success a:hover {
|
243
|
+
background-color: #ddffcc; }
|
244
|
+
#content #projects li.failed a, #content #previous_builds li.failed a {
|
245
|
+
background-color: #ffbbaa;
|
246
|
+
border-color: #dd9988;
|
247
|
+
color: #ff1100; }
|
248
|
+
#content #projects li.failed a .attribution, #content #previous_builds li.failed a .attribution {
|
249
|
+
color: #bb7766; }
|
250
|
+
#content #projects li.failed a:hover, #content #previous_builds li.failed a:hover {
|
251
|
+
background-color: #ffddcc; }
|
252
|
+
#content #build, #content #last_build {
|
253
|
+
position: relative; }
|
254
|
+
#content #build h1, #content #build blockquote, #content #last_build h1, #content #last_build blockquote {
|
255
|
+
border-width: 0 1px;
|
256
|
+
border-style: solid; }
|
257
|
+
#content #build h1, #content #last_build h1 {
|
258
|
+
border-top-width: 1px; }
|
259
|
+
#content #build blockquote, #content #last_build blockquote {
|
260
|
+
bottom-bottom-width: 1px;
|
261
|
+
line-height: 1.4; }
|
262
|
+
#content #build.success h1, #content #build.success blockquote, #content #last_build.success h1, #content #last_build.success blockquote {
|
263
|
+
background-color: #bbf8aa;
|
264
|
+
border-color: #99d688 #ccffbb #ccffbb #99d688; }
|
265
|
+
#content #build.success h1, #content #last_build.success h1 {
|
266
|
+
color: #337022; }
|
267
|
+
#content #build.success .meta, #content #last_build.success .meta {
|
268
|
+
color: #77b466; }
|
269
|
+
#content #build.failed h1, #content #build.failed blockquote, #content #last_build.failed h1, #content #last_build.failed blockquote {
|
270
|
+
background-color: #ffbbaa;
|
271
|
+
border-color: #dd9988 #ffccbb #ffccbb #dd9988; }
|
272
|
+
#content #build.failed h1, #content #last_build.failed h1 {
|
273
|
+
color: #ff1100; }
|
274
|
+
#content #build.failed .meta, #content #last_build.failed .meta {
|
275
|
+
color: #bb7766; }
|
276
|
+
#content #build h1, #content #last_build h1 {
|
277
|
+
margin-top: .5em;
|
278
|
+
margin-bottom: 0;
|
279
|
+
padding: .25em;
|
280
|
+
color: #337022; }
|
281
|
+
#content #build blockquote, #content #last_build blockquote {
|
282
|
+
padding: .75em;
|
283
|
+
margin-bottom: 2em; }
|
284
|
+
#content #build blockquote .meta, #content #last_build blockquote .meta {
|
285
|
+
margin-top: 1em;
|
286
|
+
display: block;
|
287
|
+
font-size: .9em; }
|
288
|
+
#content #build pre.output, #content #last_build pre.output {
|
289
|
+
background: #111;
|
290
|
+
color: #fff;
|
291
|
+
padding: .5em;
|
292
|
+
overflow: auto;
|
293
|
+
max-height: 50em;
|
294
|
+
font-size: .825em; }
|
295
|
+
#content #build pre.output .color30, #content #last_build pre.output .color30 {
|
296
|
+
color: #333; }
|
297
|
+
#content #build pre.output .color31, #content #last_build pre.output .color31 {
|
298
|
+
color: #e33; }
|
299
|
+
#content #build pre.output .color32, #content #last_build pre.output .color32 {
|
300
|
+
color: #3e3; }
|
301
|
+
#content #build pre.output .color33, #content #last_build pre.output .color33 {
|
302
|
+
color: #ee3; }
|
303
|
+
#content #build pre.output .color34, #content #last_build pre.output .color34 {
|
304
|
+
color: #33e; }
|
305
|
+
#content #build pre.output .color35, #content #last_build pre.output .color35 {
|
306
|
+
color: #e3e; }
|
307
|
+
#content #build pre.output .color36, #content #last_build pre.output .color36 {
|
308
|
+
color: #3ee; }
|
309
|
+
#content #build pre.output .color37, #content #last_build pre.output .color37 {
|
310
|
+
color: #fff; }
|
311
|
+
#content #push_path {
|
312
|
+
display: block;
|
313
|
+
margin-top: 1em;
|
314
|
+
margin-left: 2em; }
|
315
|
+
|
316
|
+
a.success {
|
317
|
+
color: #bbf8aa; }
|
318
|
+
a.success:hover {
|
319
|
+
background-color: #bbf8aa;
|
320
|
+
color: white; }
|
321
|
+
a.failed {
|
322
|
+
color: #ffbbaa; }
|
323
|
+
a.failed:hover {
|
324
|
+
background-color: #ffbbaa;
|
325
|
+
color: white; }
|
326
|
+
|
327
|
+
#footer {
|
328
|
+
padding: 1.5em 2.5em;
|
329
|
+
border-top: 1px solid #ccc;
|
330
|
+
font-size: .8em;
|
331
|
+
color: #666;
|
332
|
+
text-align: right; }
|
333
|
+
#footer strong {
|
334
|
+
font-weight: bold; }
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
|
3
|
+
Code licensed under the BSD License:
|
4
|
+
http://developer.yahoo.net/yui/license.txt
|
5
|
+
version: 2.5.2
|
6
|
+
*/
|
7
|
+
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
table { background: #fff; color: #000; }
|
2
|
+
.ruby .normal { color: #000; }
|
3
|
+
.ruby .comment { color: #005; font-style: italic; }
|
4
|
+
.ruby .keyword { color: #A44; font-weight: bold; }
|
5
|
+
.ruby .method { color: #44f; }
|
6
|
+
.ruby .class { color: #b1713d; }
|
7
|
+
.ruby .module { color: #050; }
|
8
|
+
.ruby .punct { color: #668; font-weight: bold; }
|
9
|
+
.ruby .symbol { color: #00f; }
|
10
|
+
.ruby .string { color: #4a4; }
|
11
|
+
.ruby .char { color: #F07; }
|
12
|
+
.ruby .ident { color: #000; }
|
13
|
+
.ruby .constant { color: #b1713d; }
|
14
|
+
.ruby .regex { color: #B66; background: #FEF; }
|
15
|
+
.ruby .number { color: #F99; }
|
16
|
+
.ruby .attribute { color: #f84; }
|
17
|
+
.ruby .global { color: #7FB; }
|
18
|
+
.ruby .expr { color: #227; }
|
19
|
+
.ruby .escape { color: #277; }
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<h3>Flay Results</h3>
|
2
|
+
|
3
|
+
<p><a href='http://ruby.sadi.st/Flay.html'>Flay</a> analyzes ruby code for structural similarities.</p>
|
4
|
+
|
5
|
+
<% graph_name = 'flay' %>
|
6
|
+
<% if MetricFu.configuration.graph_engine == :gchart %>
|
7
|
+
<img src="<%= graph_name %>.png?<%= Time.now.to_i %>" />
|
8
|
+
<% else %>
|
9
|
+
<canvas id="graph"></canvas>
|
10
|
+
<script language="javascript" src="<%= graph_name %>.js?<%= Time.now.to_i %>" type="text/javascript"></script>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<h4>Total Score (lower is better): <%= @flay[:total_score] %></h4>
|
14
|
+
<h5>Scores less than <%= MetricFu.flay[:minimum_score] %> are not shown or part of the total</h5>
|
15
|
+
|
16
|
+
<table>
|
17
|
+
<tr>
|
18
|
+
<th>Files</th>
|
19
|
+
<th>Matches</th>
|
20
|
+
</tr>
|
21
|
+
<% count = 0 %>
|
22
|
+
<% @flay[:matches].each do |match| %>
|
23
|
+
<tr class='<%= cycle("light", "dark", count) %>'>
|
24
|
+
<td>
|
25
|
+
<% match[:matches].each do |file| %>
|
26
|
+
<%= link_to_filename(file[:name], file[:line]) %><br/>
|
27
|
+
<% end %>
|
28
|
+
</td>
|
29
|
+
<td><%= match[:reason] %></td>
|
30
|
+
</tr>
|
31
|
+
<% count += 1 %>
|
32
|
+
<% end %>
|
33
|
+
</table>
|
34
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<h3>Flog Results</h3>
|
2
|
+
<p><a href='http://ruby.sadi.st/Flog.html'>Flog</a> measures code complexity.</p>
|
3
|
+
|
4
|
+
<% graph_name = 'flog' %>
|
5
|
+
<% if MetricFu.configuration.graph_engine == :gchart %>
|
6
|
+
<img src="<%= graph_name %>.png?<%= Time.now.to_i %>" />
|
7
|
+
<% else %>
|
8
|
+
<canvas id="graph"></canvas>
|
9
|
+
<script language="javascript" src="<%= graph_name %>.js?<%= Time.now.to_i %>" type="text/javascript"></script>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<h2>Total Flog score for all methods: <%= round_to_tenths @flog[:total]%></h2>
|
13
|
+
<h2>Average Flog score for all methods: <%= round_to_tenths @flog[:average]%></h2>
|
14
|
+
|
15
|
+
<table>
|
16
|
+
<tr>
|
17
|
+
<th>File</th>
|
18
|
+
<th>Total score</th>
|
19
|
+
<th>Methods</th>
|
20
|
+
<th>Average score</th>
|
21
|
+
<th>Highest score</th>
|
22
|
+
</tr>
|
23
|
+
<% @flog[:method_containers].each do |method_container| %>
|
24
|
+
<tr>
|
25
|
+
<td><a href="#<%= method_container[:path].gsub(/[^a-z]+/, '_') %>"><%= method_container[:path] %></a></td>
|
26
|
+
<td><%= round_to_tenths method_container[:total_score] %></td>
|
27
|
+
<td><%= method_container[:methods].size %></td>
|
28
|
+
<td><%= round_to_tenths method_container[:average_score] %></td>
|
29
|
+
<td><%= round_to_tenths method_container[:highest_score] %></td>
|
30
|
+
</tr>
|
31
|
+
<% end %>
|
32
|
+
</table>
|
33
|
+
|
34
|
+
<% @flog[:method_containers].each do |method_container| %>
|
35
|
+
<h2 id="<%= method_container[:path].gsub(/[^a-z]+/, '_') %>"><%= link_to_filename(method_container[:path]) %></h2>
|
36
|
+
|
37
|
+
<% method_container[:methods].each do |full_method_name, method_info| %>
|
38
|
+
<% path, line = method_info[:path].split(":") if method_info[:path] %>
|
39
|
+
<p><%= link_to_filename(path, line, full_method_name) %></p>
|
40
|
+
<p>Total Score: <%= round_to_tenths method_info[:score]%></p>
|
41
|
+
<table>
|
42
|
+
<tr>
|
43
|
+
<th>Score</th>
|
44
|
+
<th>Operator</th>
|
45
|
+
</tr>
|
46
|
+
<% method_info[:operators].each do |operator, score| %>
|
47
|
+
<tr>
|
48
|
+
<td><%= round_to_tenths score %></td>
|
49
|
+
<td><%= operator %></td>
|
50
|
+
</tr>
|
51
|
+
<% end %>
|
52
|
+
</table>
|
53
|
+
<% end %>
|
54
|
+
<% end %>
|
55
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<h3>Hotspot Results</h3>
|
2
|
+
<p>Meta analysis of your metrics to find hotspots in your code.</p>
|
3
|
+
<br/>
|
4
|
+
|
5
|
+
<% if !@hotspots || @hotspots.size == 0 %>
|
6
|
+
No Hotspots were found.
|
7
|
+
<% elsif @hotspots && @hotspots.size > 0 %>
|
8
|
+
|
9
|
+
<% granularities = [:files, :classes, :methods] %>
|
10
|
+
<table>
|
11
|
+
<tr valign="top">
|
12
|
+
<% granularities.each do |granularity| %>
|
13
|
+
<th width='33%'>
|
14
|
+
<%= granularity.to_s.capitalize %></th>
|
15
|
+
<% end %>
|
16
|
+
</tr>
|
17
|
+
|
18
|
+
<% items = [] %>
|
19
|
+
<% granularities.each_index do |index| %>
|
20
|
+
<% granularity = granularities[index] %>
|
21
|
+
<% items << @hotspots[granularity] %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% items_length = 0 %>
|
25
|
+
<% columns = [0, 1, 2] %>
|
26
|
+
<% while (items_length < items[0].length || items_length < items[1].length || items_length < items[2].length) do %>
|
27
|
+
<tr valign="top">
|
28
|
+
<% columns.each do |column| %>
|
29
|
+
<% item = items[column].length >= items_length ? items[column][items_length] : nil %>
|
30
|
+
<% if item %>
|
31
|
+
<td>
|
32
|
+
<b>
|
33
|
+
<%= display_location(item[:location], nil) %>
|
34
|
+
</b>
|
35
|
+
<% if item[:location].file_path %>
|
36
|
+
<% file, line = item[:location].file_path.split(/:/) %>
|
37
|
+
<% if per_file_data[file] %>
|
38
|
+
<small>«
|
39
|
+
<b><a href="<%= file.gsub(%r{/}, '_') %>.html<%= (line.nil? ? '' : "#line#{line}") %>">annotate</a></b>
|
40
|
+
»</small>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
43
|
+
<br/><br/>
|
44
|
+
<!-- TODO HOTSPOTS for metric fu nice metric_link method -->
|
45
|
+
<% item[:details].each do |metric, info| %>
|
46
|
+
<%#= metric_link(@stat, metric, h(metric.to_s.capitalize)) + ": " + h(info)%><br/>
|
47
|
+
<%= "#{metric.to_s.capitalize}: #{info}" %><br/>
|
48
|
+
<% end %>
|
49
|
+
</td>
|
50
|
+
<% else %>
|
51
|
+
<td> </td>
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
54
|
+
<% items_length += 1 %>
|
55
|
+
</tr>
|
56
|
+
<% end %>
|
57
|
+
|
58
|
+
</table>
|
59
|
+
<% end %>
|
60
|
+
|
61
|
+
|
62
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,34 @@
|
|
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
|
+
<% if @rails_best_practices %>
|
28
|
+
<li class='even failure'><a href="rails_best_practices.html">Rails Best Practices report</a></li>
|
29
|
+
<% end %>
|
30
|
+
<% if @hotspots %>
|
31
|
+
<li class='even failure'><a href="hotspots.html">Hotspots</a></li>
|
32
|
+
<% end %>
|
33
|
+
</ul>
|
34
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,30 @@
|
|
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
|
+
<style>
|
8
|
+
<%= inline_css("css/reset.css") %>
|
9
|
+
<%= inline_css("css/buttons.css") %>
|
10
|
+
<%= inline_css("css/integrity.css") %>
|
11
|
+
<%= inline_css("css/default.css") %>
|
12
|
+
</style>
|
13
|
+
<link REL="SHORTCUT ICON" HREF="/favicon.ico">
|
14
|
+
<script language="javascript" src="js-class.js" type="text/javascript"></script>
|
15
|
+
<script language="javascript" src="bluff-min.js" type="text/javascript"></script>
|
16
|
+
<script language="javascript" src="excanvas.js" type="text/javascript"></script>
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<div id='header'>
|
20
|
+
<h1><a href="/">metrics</a> | <a href="index.html"><%= @name %></a></h1>
|
21
|
+
<address class='watermark'>
|
22
|
+
built with
|
23
|
+
<a href='http://metric-fu.rubyforge.org/'>metric-fu</a>
|
24
|
+
</address>
|
25
|
+
</div>
|
26
|
+
<div id='content'>
|
27
|
+
<%= @html %>
|
28
|
+
</div>
|
29
|
+
</body>
|
30
|
+
</html>
|