edouard-metric_fu 1.0.4.5 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +17 -0
- data/README +1 -1
- data/Rakefile +0 -29
- data/TODO +1 -2
- data/lib/base/base_template.rb +18 -6
- data/lib/base/configuration.rb +1 -1
- data/lib/base/generator.rb +6 -0
- data/lib/generators/churn.rb +6 -1
- data/lib/generators/flay.rb +5 -0
- data/lib/generators/flog.rb +14 -1
- data/lib/generators/rcov.rb +11 -0
- data/lib/generators/reek.rb +5 -0
- data/lib/generators/roodi.rb +7 -0
- data/lib/generators/saikuro.rb +164 -172
- data/lib/templates/awesome/churn.html.erb +1 -1
- data/lib/templates/awesome/default.css +9 -0
- data/lib/templates/awesome/flay.html.erb +1 -1
- data/lib/templates/awesome/flog.html.erb +1 -1
- data/lib/templates/awesome/rcov.html.erb +2 -2
- data/lib/templates/awesome/reek.html.erb +1 -1
- data/lib/templates/awesome/roodi.html.erb +1 -1
- data/lib/templates/standard/churn.html.erb +1 -0
- data/lib/templates/standard/flay.html.erb +1 -0
- data/lib/templates/standard/flog.html.erb +3 -2
- data/lib/templates/standard/rcov.html.erb +5 -4
- data/lib/templates/standard/reek.html.erb +1 -0
- data/lib/templates/standard/roodi.html.erb +1 -0
- data/lib/templates/standard/saikuro.html.erb +1 -0
- data/lib/templates/standard/stats.html.erb +1 -0
- data/spec/base/base_template_spec.rb +35 -14
- data/spec/base/configuration_spec.rb +1 -1
- data/spec/base/generator_spec.rb +23 -1
- data/spec/base/md5_tracker_spec.rb +1 -1
- data/spec/base/report_spec.rb +1 -1
- data/spec/generators/churn_spec.rb +8 -8
- data/spec/generators/flay_spec.rb +4 -1
- data/spec/generators/flog_spec.rb +22 -3
- data/spec/generators/reek_spec.rb +2 -1
- data/spec/generators/saikuro_spec.rb +7 -12
- data/spec/generators/stats_spec.rb +1 -1
- data/spec/graphs/flog_grapher_spec.rb +15 -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 +10 -0
- data/spec/spec.opts +8 -0
- data/tasks/metric_fu.rake +3 -0
- metadata +26 -41
- data/tasks/railroad.rake +0 -39
@@ -0,0 +1,155 @@
|
|
1
|
+
<html><head><title>Index for cyclomatic complexity</title></head>
|
2
|
+
<style>
|
3
|
+
body {
|
4
|
+
margin: 20px;
|
5
|
+
padding: 0;
|
6
|
+
font-size: 12px;
|
7
|
+
font-family: bitstream vera sans, verdana, arial, sans serif;
|
8
|
+
background-color: #efefef;
|
9
|
+
}
|
10
|
+
|
11
|
+
table {
|
12
|
+
border-collapse: collapse;
|
13
|
+
/*border-spacing: 0;*/
|
14
|
+
border: 1px solid #666;
|
15
|
+
background-color: #fff;
|
16
|
+
margin-bottom: 20px;
|
17
|
+
}
|
18
|
+
|
19
|
+
table, th, th+th, td, td+td {
|
20
|
+
border: 1px solid #ccc;
|
21
|
+
}
|
22
|
+
|
23
|
+
table th {
|
24
|
+
font-size: 12px;
|
25
|
+
color: #fc0;
|
26
|
+
padding: 4px 0;
|
27
|
+
background-color: #336;
|
28
|
+
}
|
29
|
+
|
30
|
+
th, td {
|
31
|
+
padding: 4px 10px;
|
32
|
+
}
|
33
|
+
|
34
|
+
td {
|
35
|
+
font-size: 13px;
|
36
|
+
}
|
37
|
+
|
38
|
+
.class_name {
|
39
|
+
font-size: 17px;
|
40
|
+
margin: 20px 0 0;
|
41
|
+
}
|
42
|
+
|
43
|
+
.class_complexity {
|
44
|
+
margin: 0 auto;
|
45
|
+
}
|
46
|
+
|
47
|
+
.class_complexity>.class_complexity {
|
48
|
+
margin: 0;
|
49
|
+
}
|
50
|
+
|
51
|
+
.class_total_complexity, .class_total_lines, .start_token_count, .file_count {
|
52
|
+
font-size: 13px;
|
53
|
+
font-weight: bold;
|
54
|
+
}
|
55
|
+
|
56
|
+
.class_total_complexity, .class_total_lines {
|
57
|
+
color: #c00;
|
58
|
+
}
|
59
|
+
|
60
|
+
.start_token_count, .file_count {
|
61
|
+
color: #333;
|
62
|
+
}
|
63
|
+
|
64
|
+
.warning {
|
65
|
+
background-color: yellow;
|
66
|
+
}
|
67
|
+
|
68
|
+
.error {
|
69
|
+
background-color: #f00;
|
70
|
+
}
|
71
|
+
</style>
|
72
|
+
|
73
|
+
<body>
|
74
|
+
<h1>Index for cyclomatic complexity</h1>
|
75
|
+
<h2 class="class_name">Errors and Warnings</h2>
|
76
|
+
<table width="100%" border="1">
|
77
|
+
<tr><th>Class</th><th>Method</th><th>Complexity</th></tr>
|
78
|
+
|
79
|
+
<tr><td><a href="./app/controllers/activity_reports_controller.rb_cyclo.html">ActivityReportsController</a></td><td>authorize_user</td>
|
80
|
+
<td class="warning">6</td></tr>
|
81
|
+
<tr><td><a href="./app/controllers/primary_sites_controller.rb_cyclo.html">PrimarySitesController</a></td><td>create</td>
|
82
|
+
<td class="warning">5</td></tr>
|
83
|
+
<tr><td><a href="./app/controllers/primary_sites_controller.rb_cyclo.html">PrimarySitesController</a></td><td>save_link_targets</td>
|
84
|
+
<td class="warning">5</td></tr>
|
85
|
+
<tr><td><a href="./app/models/link_target.rb_cyclo.html">LinkTarget</a></td><td>update_backlink_status</td>
|
86
|
+
<td class="warning">5</td></tr>
|
87
|
+
</table>
|
88
|
+
<hr/>
|
89
|
+
<h2 class="class_name">Analyzed Files</h2>
|
90
|
+
<ul>
|
91
|
+
<li>
|
92
|
+
<p class="file_name"><a href="./app/models/user.rb_cyclo.html">app/models/user.rb</a>
|
93
|
+
</li>
|
94
|
+
<li>
|
95
|
+
<p class="file_name"><a href="./app/models/subscriber.rb_cyclo.html">app/models/subscriber.rb</a>
|
96
|
+
</li>
|
97
|
+
<li>
|
98
|
+
<p class="file_name"><a href="./app/models/primary_site.rb_cyclo.html">app/models/primary_site.rb</a>
|
99
|
+
</li>
|
100
|
+
<li>
|
101
|
+
<p class="file_name"><a href="./app/models/link_target.rb_cyclo.html">app/models/link_target.rb</a>
|
102
|
+
</li>
|
103
|
+
<li>
|
104
|
+
<p class="file_name"><a href="./app/models/comparison_site.rb_cyclo.html">app/models/comparison_site.rb</a>
|
105
|
+
</li>
|
106
|
+
<li>
|
107
|
+
<p class="file_name"><a href="./app/models/backlink_crawl_status.rb_cyclo.html">app/models/backlink_crawl_status.rb</a>
|
108
|
+
</li>
|
109
|
+
<li>
|
110
|
+
<p class="file_name"><a href="./app/models/backlink_crawl_notifier.rb_cyclo.html">app/models/backlink_crawl_notifier.rb</a>
|
111
|
+
</li>
|
112
|
+
<li>
|
113
|
+
<p class="file_name"><a href="./app/models/activity_report_measure.rb_cyclo.html">app/models/activity_report_measure.rb</a>
|
114
|
+
</li>
|
115
|
+
<li>
|
116
|
+
<p class="file_name"><a href="./app/models/activity_report.rb_cyclo.html">app/models/activity_report.rb</a>
|
117
|
+
</li>
|
118
|
+
<li>
|
119
|
+
<p class="file_name"><a href="./app/helpers/users_helper.rb_cyclo.html">app/helpers/users_helper.rb</a>
|
120
|
+
</li>
|
121
|
+
<li>
|
122
|
+
<p class="file_name"><a href="./app/helpers/sessions_helper.rb_cyclo.html">app/helpers/sessions_helper.rb</a>
|
123
|
+
</li>
|
124
|
+
<li>
|
125
|
+
<p class="file_name"><a href="./app/helpers/primary_sites_helper.rb_cyclo.html">app/helpers/primary_sites_helper.rb</a>
|
126
|
+
</li>
|
127
|
+
<li>
|
128
|
+
<p class="file_name"><a href="./app/helpers/link_targets_helper.rb_cyclo.html">app/helpers/link_targets_helper.rb</a>
|
129
|
+
</li>
|
130
|
+
<li>
|
131
|
+
<p class="file_name"><a href="./app/helpers/application_helper.rb_cyclo.html">app/helpers/application_helper.rb</a>
|
132
|
+
</li>
|
133
|
+
<li>
|
134
|
+
<p class="file_name"><a href="./app/controllers/users_controller.rb_cyclo.html">app/controllers/users_controller.rb</a>
|
135
|
+
</li>
|
136
|
+
<li>
|
137
|
+
<p class="file_name"><a href="./app/controllers/sessions_controller.rb_cyclo.html">app/controllers/sessions_controller.rb</a>
|
138
|
+
</li>
|
139
|
+
<li>
|
140
|
+
<p class="file_name"><a href="./app/controllers/primary_sites_controller.rb_cyclo.html">app/controllers/primary_sites_controller.rb</a>
|
141
|
+
</li>
|
142
|
+
<li>
|
143
|
+
<p class="file_name"><a href="./app/controllers/link_targets_controller.rb_cyclo.html">app/controllers/link_targets_controller.rb</a>
|
144
|
+
</li>
|
145
|
+
<li>
|
146
|
+
<p class="file_name"><a href="./app/controllers/bookmarklet_integration_controller.rb_cyclo.html">app/controllers/bookmarklet_integration_controller.rb</a>
|
147
|
+
</li>
|
148
|
+
<li>
|
149
|
+
<p class="file_name"><a href="./app/controllers/application.rb_cyclo.html">app/controllers/application.rb</a>
|
150
|
+
</li>
|
151
|
+
<li>
|
152
|
+
<p class="file_name"><a href="./app/controllers/activity_reports_controller.rb_cyclo.html">app/controllers/activity_reports_controller.rb</a>
|
153
|
+
</li>
|
154
|
+
</ul>
|
155
|
+
</body></html>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
-- START Mod --
|
2
|
+
Type:Module Name:Mod Complexity:2 Lines:7
|
3
|
+
Type:Def Name:self.included Complexity:2 Lines:5
|
4
|
+
-- START --
|
5
|
+
Type:Class Name: Complexity:0 Lines:1
|
6
|
+
-- END --
|
7
|
+
-- END Mod --
|
8
|
+
-- START Thing --
|
9
|
+
Type:Class Name:Thing Complexity:0 Lines:2
|
10
|
+
-- END Thing --
|
data/spec/spec.opts
ADDED
data/tasks/metric_fu.rake
CHANGED
@@ -4,6 +4,9 @@ namespace :metrics do
|
|
4
4
|
task :all do
|
5
5
|
MetricFu::Configuration.run {}
|
6
6
|
MetricFu.metrics.each {|metric| MetricFu.report.add(metric) }
|
7
|
+
MetricFu.report.save_output(MetricFu.report.to_yaml,
|
8
|
+
MetricFu.base_directory,
|
9
|
+
"report.yml")
|
7
10
|
MetricFu.report.save_output(MetricFu.report.to_yaml,
|
8
11
|
MetricFu.data_directory,
|
9
12
|
"#{Time.now.strftime("%Y%m%d")}.yml")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edouard-metric_fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jake Scruggs
|
@@ -48,26 +48,6 @@ dependencies:
|
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: 0.8.3.3
|
50
50
|
version:
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: reek
|
53
|
-
type: :runtime
|
54
|
-
version_requirement:
|
55
|
-
version_requirements: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - ">="
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: 1.1.3
|
60
|
-
version:
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: roodi
|
63
|
-
type: :runtime
|
64
|
-
version_requirement:
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 1.4.0
|
70
|
-
version:
|
71
51
|
- !ruby/object:Gem::Dependency
|
72
52
|
name: mojombo-chronic
|
73
53
|
type: :runtime
|
@@ -89,7 +69,7 @@ dependencies:
|
|
89
69
|
version: 0.3.5
|
90
70
|
version:
|
91
71
|
description: Code metrics from Flog, Flay, RCov, Saikuro, Churn, Reek, Roodi and Rails' stats task
|
92
|
-
email:
|
72
|
+
email: jake.scruggs@gmail.com
|
93
73
|
executables: []
|
94
74
|
|
95
75
|
extensions: []
|
@@ -107,6 +87,7 @@ files:
|
|
107
87
|
- lib/base/base_template.rb
|
108
88
|
- lib/base/configuration.rb
|
109
89
|
- lib/base/generator.rb
|
90
|
+
- lib/base/graph.rb
|
110
91
|
- lib/base/md5_tracker.rb
|
111
92
|
- lib/base/report.rb
|
112
93
|
- lib/generators/churn.rb
|
@@ -117,7 +98,24 @@ files:
|
|
117
98
|
- lib/generators/roodi.rb
|
118
99
|
- lib/generators/saikuro.rb
|
119
100
|
- lib/generators/stats.rb
|
101
|
+
- lib/graphs/flay_grapher.rb
|
102
|
+
- lib/graphs/flog_grapher.rb
|
103
|
+
- lib/graphs/rcov_grapher.rb
|
104
|
+
- lib/graphs/reek_grapher.rb
|
105
|
+
- lib/graphs/roodi_grapher.rb
|
120
106
|
- lib/metric_fu.rb
|
107
|
+
- lib/templates/awesome/awesome_template.rb
|
108
|
+
- lib/templates/awesome/churn.html.erb
|
109
|
+
- lib/templates/awesome/default.css
|
110
|
+
- lib/templates/awesome/flay.html.erb
|
111
|
+
- lib/templates/awesome/flog.html.erb
|
112
|
+
- lib/templates/awesome/index.html.erb
|
113
|
+
- lib/templates/awesome/layout.html.erb
|
114
|
+
- lib/templates/awesome/rcov.html.erb
|
115
|
+
- lib/templates/awesome/reek.html.erb
|
116
|
+
- lib/templates/awesome/roodi.html.erb
|
117
|
+
- lib/templates/awesome/saikuro.html.erb
|
118
|
+
- lib/templates/awesome/stats.html.erb
|
121
119
|
- lib/templates/standard/churn.html.erb
|
122
120
|
- lib/templates/standard/default.css
|
123
121
|
- lib/templates/standard/flay.html.erb
|
@@ -129,27 +127,8 @@ files:
|
|
129
127
|
- lib/templates/standard/saikuro.html.erb
|
130
128
|
- lib/templates/standard/standard_template.rb
|
131
129
|
- lib/templates/standard/stats.html.erb
|
132
|
-
- lib/templates/awesome/churn.html.erb
|
133
|
-
- lib/templates/awesome/default.css
|
134
|
-
- lib/templates/awesome/flay.html.erb
|
135
|
-
- lib/templates/awesome/flog.html.erb
|
136
|
-
- lib/templates/awesome/index.html.erb
|
137
|
-
- lib/templates/awesome/rcov.html.erb
|
138
|
-
- lib/templates/awesome/reek.html.erb
|
139
|
-
- lib/templates/awesome/roodi.html.erb
|
140
|
-
- lib/templates/awesome/saikuro.html.erb
|
141
|
-
- lib/templates/awesome/awesome_template.rb
|
142
|
-
- lib/templates/awesome/stats.html.erb
|
143
|
-
- lib/templates/awesome/layout.html.erb
|
144
|
-
- lib/base/graph.rb
|
145
|
-
- lib/graphs/flay_grapher.rb
|
146
|
-
- lib/graphs/flog_grapher.rb
|
147
|
-
- lib/graphs/rcov_grapher.rb
|
148
|
-
- lib/graphs/reek_grapher.rb
|
149
|
-
- lib/graphs/roodi_grapher.rb
|
150
130
|
- tasks/metric_fu.rake
|
151
131
|
- vendor/_fonts/monaco.ttf
|
152
|
-
- tasks/railroad.rake
|
153
132
|
- vendor/saikuro/saikuro.rb
|
154
133
|
- Manifest.txt
|
155
134
|
has_rdoc: true
|
@@ -191,4 +170,10 @@ test_files:
|
|
191
170
|
- spec/generators/reek_spec.rb
|
192
171
|
- spec/generators/saikuro_spec.rb
|
193
172
|
- spec/generators/stats_spec.rb
|
173
|
+
- spec/graphs/flog_grapher_spec.rb
|
174
|
+
- spec/resources/saikuro/app/controllers/sessions_controller.rb_cyclo.html
|
175
|
+
- spec/resources/saikuro/app/controllers/users_controller.rb_cyclo.html
|
176
|
+
- spec/resources/saikuro/index_cyclo.html
|
177
|
+
- spec/resources/saikuro_sfiles/thing.rb_cyclo.html
|
178
|
+
- spec/spec.opts
|
194
179
|
- spec/spec_helper.rb
|
data/tasks/railroad.rake
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
namespace :metrics do
|
2
|
-
|
3
|
-
RAILROAD_DIR = File.join(MetricFu::BASE_DIRECTORY, 'railroad')
|
4
|
-
RAILROAD_FILE = File.join(RAILROAD_DIR, 'index.html')
|
5
|
-
|
6
|
-
task :railroad => ['railroad:all'] do
|
7
|
-
end
|
8
|
-
|
9
|
-
namespace :railroad do
|
10
|
-
|
11
|
-
desc "Create all railroad reports"
|
12
|
-
task :all => [:models, :controllers, :aasm] do
|
13
|
-
#system("open #{RAILROAD_INDEX}") if PLATFORM['darwin']
|
14
|
-
end
|
15
|
-
|
16
|
-
desc "Create a railroad models report"
|
17
|
-
task :models do
|
18
|
-
#mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
|
19
|
-
`railroad -M -a -m -l -v | neato -Tpng > #{File.join(MetricFu::BASE_DIRECTORY,'model-diagram.png')}`
|
20
|
-
#`echo "<a href=\"railroad/models.png\">Model diagram</a><br />" >> #{RAILROAD_FILE}`
|
21
|
-
end
|
22
|
-
|
23
|
-
desc "Create a railroad controllers report"
|
24
|
-
task :controllers do
|
25
|
-
#mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
|
26
|
-
`railroad -C -l -v | neato -Tpng > #{File.join(MetricFu::BASE_DIRECTORY,'controller-diagram.png')}`
|
27
|
-
#`echo "<a href=\"railroad/controllers.png\">Controller diagram</a><br />" >> #{RAILROAD_FILE}`
|
28
|
-
end
|
29
|
-
|
30
|
-
desc "Create a railroad acts_as_state_machine report"
|
31
|
-
task :aasm do
|
32
|
-
#mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
|
33
|
-
`railroad -A -l -v | neato -Tpng > #{File.join(MetricFu::BASE_DIRECTORY,'aasm-diagram.png')}`
|
34
|
-
#`echo "<a href=\"railroad/aasm.png\">State machine diagram</a><br />" >> #{RAILROAD_FILE}`
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|