rferraz-metric_fu 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,61 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe RailsBestPracticesGrapher do
|
4
|
+
before :each do
|
5
|
+
@stats_grapher = MetricFu::RailsBestPracticesGrapher.new
|
6
|
+
MetricFu.configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should respond to rails_best_practices_count and labels" do
|
10
|
+
@stats_grapher.should respond_to(:rails_best_practices_count)
|
11
|
+
@stats_grapher.should respond_to(:labels)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "responding to #initialize" do
|
15
|
+
it "should initialise rails_best_practices_count and labels" do
|
16
|
+
@stats_grapher.rails_best_practices_count.should == []
|
17
|
+
@stats_grapher.labels.should == {}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "responding to #get_metrics" do
|
22
|
+
context "when metrics were not generated" do
|
23
|
+
before(:each) do
|
24
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "metric_missing.yml")))
|
25
|
+
@date = "01022003"
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should not push to rails_best_practices_count" do
|
29
|
+
@stats_grapher.rails_best_practices_count.should_not_receive(:push)
|
30
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should not update labels with the date" do
|
34
|
+
@stats_grapher.labels.should_not_receive(:update)
|
35
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when metrics have been generated" do
|
40
|
+
before(:each) do
|
41
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "20090630.yml")))
|
42
|
+
@date = "01022003"
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should push to rails_best_practices_count" do
|
46
|
+
@stats_grapher.rails_best_practices_count.should_receive(:push).with(2)
|
47
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should push 0 to rails_best_practices_count when no problems were found" do
|
51
|
+
@stats_grapher.rails_best_practices_count.should_receive(:push).with(0)
|
52
|
+
@stats_grapher.get_metrics({ :rails_best_practices => {} }, @date)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should update labels with the date" do
|
56
|
+
@stats_grapher.labels.should_receive(:update).with({ 0 => "01022003" })
|
57
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe RcovGrapher do
|
4
|
+
before :each do
|
5
|
+
@rcov_grapher = MetricFu::RcovGrapher.new
|
6
|
+
MetricFu.configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should respond to rcov_percent and labels" do
|
10
|
+
@rcov_grapher.should respond_to(:rcov_percent)
|
11
|
+
@rcov_grapher.should respond_to(:labels)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "responding to #initialize" do
|
15
|
+
it "should initialise rcov_percent and labels" do
|
16
|
+
@rcov_grapher.rcov_percent.should == []
|
17
|
+
@rcov_grapher.labels.should == {}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "responding to #get_metrics" do
|
22
|
+
context "when metrics were not generated" do
|
23
|
+
before(:each) do
|
24
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "metric_missing.yml")))
|
25
|
+
@date = "1/2"
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should not push to rcov_percent" do
|
29
|
+
@rcov_grapher.rcov_percent.should_not_receive(:push)
|
30
|
+
@rcov_grapher.get_metrics(@metrics, @date)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should not update labels with the date" do
|
34
|
+
@rcov_grapher.labels.should_not_receive(:update)
|
35
|
+
@rcov_grapher.get_metrics(@metrics, @date)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when metrics have been generated" do
|
40
|
+
before(:each) do
|
41
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "20090630.yml")))
|
42
|
+
@date = "1/2"
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should push to rcov_percent" do
|
46
|
+
@rcov_grapher.rcov_percent.should_receive(:push).with(49.6)
|
47
|
+
@rcov_grapher.get_metrics(@metrics, @date)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should update labels with the date" do
|
51
|
+
@rcov_grapher.labels.should_receive(:update).with({ 0 => "1/2" })
|
52
|
+
@rcov_grapher.get_metrics(@metrics, @date)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe ReekGrapher do
|
4
|
+
before :each do
|
5
|
+
@reek_grapher = MetricFu::ReekGrapher.new
|
6
|
+
MetricFu.configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should respond to reek_count and labels" do
|
10
|
+
@reek_grapher.should respond_to(:reek_count)
|
11
|
+
@reek_grapher.should respond_to(:labels)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "responding to #initialize" do
|
15
|
+
it "should initialise reek_count and labels" do
|
16
|
+
@reek_grapher.reek_count.should == {}
|
17
|
+
@reek_grapher.labels.should == {}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "responding to #get_metrics" do
|
22
|
+
context "when metrics were not generated" do
|
23
|
+
before(:each) do
|
24
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "metric_missing.yml")))
|
25
|
+
@date = "1/2"
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should not set a hash of code smells to reek_count" do
|
29
|
+
@reek_grapher.get_metrics(@metrics, @date)
|
30
|
+
@reek_grapher.reek_count.should == {}
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should not update labels with the date" do
|
34
|
+
@reek_grapher.labels.should_not_receive(:update)
|
35
|
+
@reek_grapher.get_metrics(@metrics, @date)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when metrics have been generated" do
|
40
|
+
before(:each) do
|
41
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "20090630.yml")))
|
42
|
+
@date = "1/2"
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should set a hash of code smells to reek_count" do
|
46
|
+
@reek_grapher.get_metrics(@metrics, @date)
|
47
|
+
@reek_grapher.reek_count.should == {
|
48
|
+
"Uncommunicative Name" => [27],
|
49
|
+
"Feature Envy" => [20],
|
50
|
+
"Utility Function" => [15],
|
51
|
+
"Long Method" => [26],
|
52
|
+
"Nested Iterators" => [12],
|
53
|
+
"Control Couple" => [4],
|
54
|
+
"Duplication" => [48],
|
55
|
+
"Large Class" => [1]
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should update labels with the date" do
|
60
|
+
@reek_grapher.labels.should_receive(:update).with({ 0 => "1/2" })
|
61
|
+
@reek_grapher.get_metrics(@metrics, @date)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe RoodiGrapher do
|
4
|
+
before :each do
|
5
|
+
@roodi_grapher = MetricFu::RoodiGrapher.new
|
6
|
+
MetricFu.configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should respond to roodi_count and labels" do
|
10
|
+
@roodi_grapher.should respond_to(:roodi_count)
|
11
|
+
@roodi_grapher.should respond_to(:labels)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "responding to #initialize" do
|
15
|
+
it "should initialise roodi_count and labels" do
|
16
|
+
@roodi_grapher.roodi_count.should == []
|
17
|
+
@roodi_grapher.labels.should == {}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "responding to #get_metrics" do
|
22
|
+
context "when metrics were not generated" do
|
23
|
+
before(:each) do
|
24
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "metric_missing.yml")))
|
25
|
+
@date = "1/2"
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should not push to roodi_count" do
|
29
|
+
@roodi_grapher.roodi_count.should_not_receive(:push)
|
30
|
+
@roodi_grapher.get_metrics(@metrics, @date)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should not update labels with the date" do
|
34
|
+
@roodi_grapher.labels.should_not_receive(:update)
|
35
|
+
@roodi_grapher.get_metrics(@metrics, @date)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "when metrics have been generated" do
|
40
|
+
before(:each) do
|
41
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "20090630.yml")))
|
42
|
+
@date = "1/2"
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should push to roodi_count" do
|
46
|
+
@roodi_grapher.roodi_count.should_receive(:push).with(13)
|
47
|
+
@roodi_grapher.get_metrics(@metrics, @date)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should update labels with the date" do
|
51
|
+
@roodi_grapher.labels.should_receive(:update).with({ 0 => "1/2" })
|
52
|
+
@roodi_grapher.get_metrics(@metrics, @date)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe StatsGrapher do
|
4
|
+
before :each do
|
5
|
+
@stats_grapher = MetricFu::StatsGrapher.new
|
6
|
+
MetricFu.configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should respond to loc_counts and lot_counts and labels" do
|
10
|
+
@stats_grapher.should respond_to(:loc_counts)
|
11
|
+
@stats_grapher.should respond_to(:lot_counts)
|
12
|
+
@stats_grapher.should respond_to(:labels)
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "responding to #initialize" do
|
16
|
+
it "should initialise loc_counts and lot_counts and labels" do
|
17
|
+
@stats_grapher.loc_counts.should == []
|
18
|
+
@stats_grapher.lot_counts.should == []
|
19
|
+
@stats_grapher.labels.should == {}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "responding to #get_metrics" do
|
24
|
+
context "when metrics were not generated" do
|
25
|
+
before(:each) do
|
26
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "metric_missing.yml")))
|
27
|
+
@date = "01022003"
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should not push to loc_counts" do
|
31
|
+
@stats_grapher.loc_counts.should_not_receive(:push)
|
32
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should not push to lot_counts" do
|
36
|
+
@stats_grapher.lot_counts.should_not_receive(:push)
|
37
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should not update labels with the date" do
|
41
|
+
@stats_grapher.labels.should_not_receive(:update)
|
42
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "when metrics have been generated" do
|
47
|
+
before(:each) do
|
48
|
+
@metrics = YAML::load(File.open(File.join(File.dirname(__FILE__), "..", "resources", "yml", "20090630.yml")))
|
49
|
+
@date = "01022003"
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should push to loc_counts" do
|
53
|
+
@stats_grapher.loc_counts.should_receive(:push).with(15935)
|
54
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should push to lot_counts" do
|
58
|
+
@stats_grapher.lot_counts.should_receive(:push).with(7438)
|
59
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should update labels with the date" do
|
63
|
+
@stats_grapher.labels.should_receive(:update).with({ 0 => "01022003" })
|
64
|
+
@stats_grapher.get_metrics(@metrics, @date)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class Foo
|
2
|
+
|
3
|
+
def self.awesome
|
4
|
+
1 + 1
|
5
|
+
end
|
6
|
+
|
7
|
+
def what
|
8
|
+
12
|
9
|
+
end
|
10
|
+
|
11
|
+
def hello
|
12
|
+
puts "Hi There"
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
def awesome
|
17
|
+
3+4
|
18
|
+
end
|
19
|
+
|
20
|
+
class << self
|
21
|
+
def neat
|
22
|
+
"23 skido"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def whoop
|
29
|
+
"w00t"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
#comment
|
@@ -0,0 +1,10 @@
|
|
1
|
+
-- START --
|
2
|
+
Type:Global Name: Complexity:0 Lines:1
|
3
|
+
-- END --
|
4
|
+
-- START SessionsController --
|
5
|
+
Type:Class Name:SessionsController Complexity:6 Lines:40
|
6
|
+
Type:Def Name:new Complexity:2 Lines:2
|
7
|
+
Type:Def Name:create Complexity:2 Lines:19
|
8
|
+
Type:Def Name:destroy Complexity:1 Lines:4
|
9
|
+
Type:Def Name:note_failed_signin Complexity:1 Lines:3
|
10
|
+
-- END SessionsController --
|
@@ -0,0 +1,16 @@
|
|
1
|
+
-- START UsersController --
|
2
|
+
Type:Class Name:UsersController Complexity:25 Lines:111
|
3
|
+
Type:Def Name:signup Complexity:1 Lines:3
|
4
|
+
Type:Def Name:new Complexity:1 Lines:2
|
5
|
+
Type:Def Name:edit Complexity:1 Lines:3
|
6
|
+
Type:Def Name:update Complexity:2 Lines:8
|
7
|
+
Type:Def Name:index Complexity:1 Lines:2
|
8
|
+
Type:Def Name:create Complexity:4 Lines:15
|
9
|
+
Type:Def Name:thank_you Complexity:2 Lines:10
|
10
|
+
Type:Def Name:destroy Complexity:1 Lines:3
|
11
|
+
Type:Def Name:add_primary_site Complexity:1 Lines:4
|
12
|
+
Type:Def Name:users_have_changed Complexity:3 Lines:8
|
13
|
+
Type:Def Name:after_create_page Complexity:2 Lines:6
|
14
|
+
Type:Def Name:sanitize_params Complexity:3 Lines:3
|
15
|
+
Type:Def Name:authorize_user Complexity:3 Lines:5
|
16
|
+
-- END UsersController --
|
@@ -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,11 @@
|
|
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
|
+
Type:Def Name:update Complexity:1 Lines:1
|
8
|
+
-- END Mod --
|
9
|
+
-- START Thing --
|
10
|
+
Type:Class Name:Thing Complexity:0 Lines:2
|
11
|
+
-- END Thing --
|