metric_fu 4.2.1 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.metrics +19 -1
- data/.travis.yml +2 -2
- data/Gemfile +2 -1
- data/HISTORY.md +24 -0
- data/README.md +60 -1
- data/TODO.md +1 -0
- data/bin/mf-saikuro +8 -0
- data/checksum/metric_fu-4.3.0.gem.sha512 +1 -0
- data/gemfiles/Gemfile.travis +9 -0
- data/lib/metric_fu.rb +1 -1
- data/lib/metric_fu/cli/client.rb +2 -2
- data/lib/metric_fu/cli/helper.rb +3 -3
- data/lib/metric_fu/cli/parser.rb +37 -16
- data/lib/metric_fu/configuration.rb +9 -1
- data/lib/metric_fu/constantize.rb +57 -0
- data/lib/metric_fu/data_structures/line_numbers.rb +19 -3
- data/lib/metric_fu/data_structures/location.rb +8 -3
- data/lib/metric_fu/formatter.rb +24 -0
- data/lib/metric_fu/formatter/html.rb +91 -0
- data/lib/metric_fu/formatter/yaml.rb +18 -0
- data/lib/metric_fu/initial_requires.rb +0 -1
- data/lib/metric_fu/io.rb +69 -0
- data/lib/metric_fu/load_files.rb +5 -2
- data/lib/metric_fu/logging/mf_debugger.rb +23 -0
- data/lib/metric_fu/metrics/base_template.rb +10 -4
- data/lib/metric_fu/metrics/cane/cane.rb +2 -1
- data/lib/metric_fu/metrics/cane/cane_bluff_grapher.rb +10 -9
- data/lib/metric_fu/metrics/cane/cane_gchart_grapher.rb +25 -0
- data/lib/metric_fu/metrics/flay/flay_bluff_grapher.rb +10 -9
- data/lib/metric_fu/metrics/flay/flay_gchart_grapher.rb +14 -11
- data/lib/metric_fu/metrics/flog/flog_bluff_grapher.rb +11 -10
- data/lib/metric_fu/metrics/flog/flog_gchart_grapher.rb +22 -15
- data/lib/metric_fu/metrics/generator.rb +10 -10
- data/lib/metric_fu/metrics/graph.rb +2 -2
- data/lib/metric_fu/metrics/hotspots/analysis/scoring_strategies.rb +3 -3
- data/lib/metric_fu/metrics/hotspots/hotspot.rb +4 -3
- data/lib/metric_fu/metrics/hotspots/hotspot_analyzer.rb +19 -10
- data/lib/metric_fu/metrics/hotspots/hotspots.rb +1 -1
- data/lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb +45 -45
- data/lib/metric_fu/metrics/rails_best_practices/rails_best_practices_bluff_grapher.rb +10 -9
- data/lib/metric_fu/metrics/rails_best_practices/rails_best_practices_gchart_grapher.rb +21 -15
- data/lib/metric_fu/metrics/rcov/rcov.rb +1 -1
- data/lib/metric_fu/metrics/rcov/rcov_bluff_grapher.rb +10 -9
- data/lib/metric_fu/metrics/rcov/rcov_gchart_grapher.rb +13 -8
- data/lib/metric_fu/metrics/reek/reek_bluff_grapher.rb +9 -13
- data/lib/metric_fu/metrics/reek/reek_gchart_grapher.rb +22 -17
- data/lib/metric_fu/metrics/roodi/roodi_bluff_grapher.rb +10 -9
- data/lib/metric_fu/metrics/roodi/roodi_gchart_grapher.rb +14 -11
- data/lib/metric_fu/metrics/saikuro/saikuro.rb +5 -34
- data/lib/metric_fu/metrics/stats/stats.rb +2 -1
- data/lib/metric_fu/metrics/stats/stats_bluff_grapher.rb +11 -10
- data/lib/metric_fu/metrics/stats/stats_gchart_grapher.rb +21 -14
- data/lib/metric_fu/reporter.rb +37 -0
- data/lib/metric_fu/reporting/graphs/engines/bluff.rb +20 -0
- data/lib/metric_fu/reporting/graphs/engines/gchart.rb +41 -3
- data/lib/metric_fu/reporting/graphs/grapher.rb +9 -2
- data/lib/metric_fu/reporting/result.rb +51 -0
- data/lib/metric_fu/reporting/templates/awesome/awesome_template.rb +8 -8
- data/lib/metric_fu/run.rb +34 -39
- data/lib/metric_fu/version.rb +1 -1
- data/lib/metric_fu_requires.rb +50 -33
- data/metric_fu.gemspec +30 -39
- data/spec/cli/helper_spec.rb +15 -0
- data/spec/metric_fu/configuration_spec.rb +40 -2
- data/spec/metric_fu/formatter/html_spec.rb +134 -0
- data/spec/metric_fu/formatter/yaml_spec.rb +59 -0
- data/spec/metric_fu/formatter_spec.rb +49 -0
- data/spec/metric_fu/metrics/base_template_spec.rb +23 -23
- data/spec/metric_fu/metrics/cane/cane_spec.rb +2 -2
- data/spec/metric_fu/metrics/churn/churn_spec.rb +1 -1
- data/spec/metric_fu/metrics/flay/flay_spec.rb +4 -4
- data/spec/metric_fu/metrics/flog/flog_spec.rb +7 -7
- data/spec/metric_fu/metrics/generator_spec.rb +21 -21
- data/spec/metric_fu/metrics/graph_spec.rb +9 -9
- data/spec/metric_fu/metrics/hotspots/hotspots_spec.rb +1 -1
- data/spec/metric_fu/metrics/rcov/rcov_spec.rb +8 -8
- data/spec/metric_fu/metrics/reek/reek_spec.rb +1 -1
- data/spec/metric_fu/metrics/saikuro/saikuro_spec.rb +5 -5
- data/spec/metric_fu/metrics/stats/stats_spec.rb +4 -4
- data/spec/metric_fu/reporter_spec.rb +41 -0
- data/spec/metric_fu/reporting/graphs/engines/gchart_spec.rb +7 -7
- data/spec/metric_fu/reporting/result_spec.rb +51 -0
- data/spec/run_spec.rb +167 -27
- data/spec/spec_helper.rb +1 -0
- data/spec/support/matcher_create_file.rb +7 -2
- data/spec/support/matcher_create_files.rb +41 -0
- data/spec/support/suite.rb +32 -0
- metadata +27 -6
- data/lib/metric_fu/reporting/report.rb +0 -111
- data/spec/metric_fu/reporting/report_spec.rb +0 -148
@@ -1,16 +1,17 @@
|
|
1
1
|
MetricFu.metrics_require { 'flog/flog_grapher' }
|
2
2
|
module MetricFu
|
3
3
|
class FlogBluffGrapher < FlogGrapher
|
4
|
-
def
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
def title
|
5
|
+
'Flog: code complexity'
|
6
|
+
end
|
7
|
+
def data
|
8
|
+
[
|
9
|
+
['average', @flog_average.join(',')],
|
10
|
+
['top 5% average', @top_five_percent_average.join(',')]
|
11
|
+
]
|
12
|
+
end
|
13
|
+
def output_filename
|
14
|
+
'flog.js'
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
@@ -1,21 +1,28 @@
|
|
1
1
|
MetricFu.metrics_require { 'flog/flog_grapher' }
|
2
2
|
module MetricFu
|
3
3
|
class FlogGchartGrapher < FlogGrapher
|
4
|
-
def
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
4
|
+
def title
|
5
|
+
"Flog: code complexity"
|
6
|
+
end
|
7
|
+
def legend
|
8
|
+
['average', 'top 5% average']
|
9
|
+
end
|
10
|
+
def data
|
11
|
+
[@flog_average, @top_five_percent_average]
|
12
|
+
end
|
13
|
+
def output_filename
|
14
|
+
'flog.png'
|
15
|
+
end
|
16
|
+
def gchart_line_options
|
17
|
+
super.merge({
|
18
|
+
:bar_colors => COLORS[0..1],
|
19
|
+
:legend => legend,
|
20
|
+
:custom => 'chdlp=t',
|
21
|
+
:stacked => false,
|
22
|
+
})
|
23
|
+
end
|
24
|
+
def y_axis_scale_argument
|
25
|
+
@top_five_percent_average + @flog_average
|
19
26
|
end
|
20
27
|
end
|
21
28
|
end
|
@@ -6,7 +6,7 @@ module MetricFu
|
|
6
6
|
# skeleton for producing different types of metrics.
|
7
7
|
#
|
8
8
|
# It drives the production of the metrics through a template
|
9
|
-
# method - #
|
9
|
+
# method - #generate_result(options={}). This method calls
|
10
10
|
# #emit, #analyze and #to_h in order to produce the metrics.
|
11
11
|
#
|
12
12
|
# To implement a concrete class to generate a metric, therefore,
|
@@ -30,7 +30,7 @@ module MetricFu
|
|
30
30
|
# in general setup the directory structure that the MetricFu system
|
31
31
|
# expects.
|
32
32
|
class Generator
|
33
|
-
attr_reader :
|
33
|
+
attr_reader :result, :template, :options
|
34
34
|
|
35
35
|
def initialize(options={})
|
36
36
|
@options = options
|
@@ -40,17 +40,17 @@ module MetricFu
|
|
40
40
|
end
|
41
41
|
|
42
42
|
# Creates a new generator and returns the output of the
|
43
|
-
# #
|
44
|
-
# generate a new MetricFu
|
45
|
-
# the #
|
43
|
+
# #generate_result method. This is the typical way to
|
44
|
+
# generate a new MetricFu result. For more information see
|
45
|
+
# the #generate_result instance method.
|
46
46
|
#
|
47
47
|
# @params options Hash
|
48
48
|
# A currently unused hash to configure the Generator
|
49
49
|
#
|
50
|
-
# @see
|
51
|
-
def self.
|
50
|
+
# @see generate_result
|
51
|
+
def self.generate_result(options={})
|
52
52
|
generator = self.new(options)
|
53
|
-
generator.
|
53
|
+
generator.generate_result
|
54
54
|
end
|
55
55
|
|
56
56
|
# Provides the unqualified class name of an implemented concrete
|
@@ -121,7 +121,7 @@ module MetricFu
|
|
121
121
|
# This template method also calls before_emit, after_emit... etc.
|
122
122
|
# methods to allow extra hooks into the processing methods, and help
|
123
123
|
# to keep the logic of your Generators clean.
|
124
|
-
def
|
124
|
+
def generate_result
|
125
125
|
mf_debug "Executing #{self.class.to_s.gsub(/.*::/, '')}"
|
126
126
|
|
127
127
|
%w[emit analyze].each do |meth|
|
@@ -154,7 +154,7 @@ module MetricFu
|
|
154
154
|
EOF
|
155
155
|
end
|
156
156
|
|
157
|
-
def
|
157
|
+
def to_h #:nodoc:
|
158
158
|
raise <<-EOF
|
159
159
|
This method must be implemented by a concrete class descending
|
160
160
|
from Generator. See generator class documentation for more
|
@@ -12,9 +12,9 @@ module MetricFu
|
|
12
12
|
self.clazz = []
|
13
13
|
end
|
14
14
|
|
15
|
-
def add(graph_type, graph_engine)
|
15
|
+
def add(graph_type, graph_engine, output_directory = MetricFu.output_directory)
|
16
16
|
grapher_name = graph_type.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } + graph_engine.to_s.capitalize + "Grapher"
|
17
|
-
self.clazz.push MetricFu.const_get(grapher_name).new
|
17
|
+
self.clazz.push MetricFu.const_get(grapher_name).new.tap{|g| g.output_directory = output_directory }
|
18
18
|
end
|
19
19
|
|
20
20
|
|
@@ -21,9 +21,9 @@ module MetricFu
|
|
21
21
|
# remove dependency on statarray
|
22
22
|
# scores.to_statarray.mean
|
23
23
|
score_length = scores.length
|
24
|
-
|
25
|
-
|
26
|
-
(
|
24
|
+
total = 0
|
25
|
+
total= scores.inject( nil ) { |sum,x| sum ? sum+x : x }
|
26
|
+
(total.to_f / score_length.to_f)
|
27
27
|
end
|
28
28
|
|
29
29
|
extend self
|
@@ -19,11 +19,12 @@ module MetricFu
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# TODO simplify calculation
|
22
|
+
# DUPLICATES CODE IN ScoringStrategies
|
22
23
|
def get_mean(collection)
|
23
24
|
collection_length = collection.length
|
24
|
-
|
25
|
-
|
26
|
-
(
|
25
|
+
total = 0
|
26
|
+
total = collection.inject( nil ) { |sum,x| sum ? sum+x : x }
|
27
|
+
(total.to_f / collection_length.to_f)
|
27
28
|
end
|
28
29
|
end
|
29
30
|
end
|
@@ -11,36 +11,44 @@ module MetricFu
|
|
11
11
|
COMMON_COLUMNS = %w{metric}
|
12
12
|
GRANULARITIES = %w{file_path class_name method_name}
|
13
13
|
|
14
|
-
# UNUSED
|
14
|
+
# TODO , UNUSED
|
15
15
|
# attr_accessor :table
|
16
16
|
|
17
17
|
def tool_analyzers
|
18
18
|
MetricFu::Hotspot.analyzers
|
19
19
|
end
|
20
20
|
|
21
|
-
def initialize(
|
22
|
-
# we can't depend on the
|
21
|
+
def initialize(result_hash)
|
22
|
+
# we can't depend on the result
|
23
23
|
# returning a parsed yaml file as a hash?
|
24
|
-
|
25
|
-
setup(
|
24
|
+
result_hash = YAML::load(result_hash) if result_hash.is_a?(String)
|
25
|
+
setup(result_hash)
|
26
26
|
end
|
27
27
|
|
28
|
-
# def worst_items
|
28
|
+
# def worst_items; previous method name
|
29
29
|
def hotspots
|
30
30
|
analyzed_problems.worst_items
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
def analyzed_problems
|
34
34
|
@analyzed_problems = MetricFu::HotspotAnalyzedProblems.new(@rankings, @analyzer_tables)
|
35
35
|
end
|
36
|
+
# just for testing
|
37
|
+
# TODO remove the delegators
|
38
|
+
# and refactor the tests
|
36
39
|
alias_method :worst_items, :hotspots
|
37
40
|
extend Forwardable
|
38
41
|
def_delegators :@analyzer_tables, :table
|
39
42
|
def_delegators :@analyzed_problems, :problems_with, :location
|
40
43
|
def_delegators :@rankings, :worst_files, :worst_methods, :worst_classes
|
44
|
+
|
41
45
|
private
|
42
46
|
|
43
|
-
|
47
|
+
# TODO clarify each of these steps in setup
|
48
|
+
# extract into its own method
|
49
|
+
# remove unnecessary constants,
|
50
|
+
# turn into methods
|
51
|
+
def setup(result_hash)
|
44
52
|
# TODO There is likely a clash that will happen between
|
45
53
|
# column names eventually. We should probably auto-prefix
|
46
54
|
# them (e.g. "roodi_problem")
|
@@ -51,16 +59,17 @@ module MetricFu
|
|
51
59
|
# to ultimately generate the hotspots
|
52
60
|
@analyzer_tables = MetricFu::AnalyzerTables.new(analyzer_columns)
|
53
61
|
tool_analyzers.each do |analyzer|
|
54
|
-
analyzer.generate_records(
|
62
|
+
analyzer.generate_records(result_hash[analyzer.name], @analyzer_tables.table)
|
55
63
|
end
|
56
64
|
@analyzer_tables.generate_records
|
57
65
|
@rankings = MetricFu::HotspotRankings.new(@analyzer_tables.tool_tables)
|
58
66
|
@rankings.calculate_scores(tool_analyzers, GRANULARITIES)
|
59
67
|
# just for testing
|
68
|
+
# TODO does it not need to return something here?
|
60
69
|
analyzed_problems
|
61
70
|
end
|
62
71
|
|
63
|
-
# UNUSED
|
72
|
+
# TODO remove, UNUSED
|
64
73
|
# def most_common_column(column_name, size)
|
65
74
|
# #grouping = Ruport::Data::Grouping.new(@table,
|
66
75
|
# # :by => column_name,
|
@@ -3,60 +3,60 @@
|
|
3
3
|
<br/>
|
4
4
|
|
5
5
|
<% if !@hotspots || @hotspots.size == 0 %>
|
6
|
-
No Hotspots were found.
|
6
|
+
No Hotspots were found.
|
7
7
|
<% elsif @hotspots && @hotspots.size > 0 %>
|
8
8
|
|
9
|
-
<% granularities = [:files, :classes, :methods] %>
|
10
|
-
<table>
|
11
|
-
<tr valign="top">
|
12
|
-
<% granularities.each do |granularity| %>
|
13
|
-
|
14
|
-
<%= granularity.to_s.capitalize %></th>
|
15
|
-
<% end %>
|
16
|
-
</tr>
|
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
17
|
|
18
|
-
<% items = [] %>
|
19
|
-
<% granularities.each_index do |index| %>
|
20
|
-
|
21
|
-
|
22
|
-
<% end %>
|
18
|
+
<% items = [] %>
|
19
|
+
<% granularities.each_index do |index| %>
|
20
|
+
<% granularity = granularities[index] %>
|
21
|
+
<% items << @hotspots[granularity] %>
|
22
|
+
<% end %>
|
23
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
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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
|
+
<% location = item[:location] %>
|
32
|
+
<% file, line = location.file_name, location.line_number %>
|
33
|
+
<td>
|
34
|
+
<b>
|
35
|
+
<%= display_location(location) %>
|
36
|
+
</b>
|
37
|
+
<% if file != '' %>
|
38
|
+
<% if per_file_data[file] %>
|
39
|
+
<small>«
|
40
|
+
<b><a href="<%= file.gsub(%r{/}, '_') %>.html<%= (line.nil? ? '' : "#line#{line}") %>">annotate</a></b>
|
41
|
+
»</small>
|
42
|
+
<% end %>
|
43
|
+
<% end %>
|
44
|
+
<br/><br/>
|
45
|
+
<!-- TODO HOTSPOTS for metric fu nice metric_link method -->
|
46
|
+
<% item[:details].each do |metric, info| %>
|
47
|
+
<%#= metric_link(@stat, metric, h(metric.to_s.capitalize)) + ": " + h(info)%><br/>
|
48
|
+
<%= "#{metric.to_s.capitalize}: #{info}" %><br/>
|
49
|
+
<% end %>
|
50
|
+
</td>
|
51
|
+
<% else %>
|
52
|
+
<td> </td>
|
41
53
|
<% end %>
|
42
54
|
<% end %>
|
43
|
-
|
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
|
+
<% items_length += 1 %>
|
55
56
|
</tr>
|
56
57
|
<% end %>
|
57
58
|
|
58
|
-
</table>
|
59
|
+
</table>
|
59
60
|
<% end %>
|
60
61
|
|
61
|
-
|
62
62
|
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -1,15 +1,16 @@
|
|
1
1
|
MetricFu.metrics_require { 'rails_best_practices/rails_best_practices_grapher' }
|
2
2
|
module MetricFu
|
3
3
|
class RailsBestPracticesBluffGrapher < RailsBestPracticesGrapher
|
4
|
-
def
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
def title
|
5
|
+
'Rails Best Practices: design problems'
|
6
|
+
end
|
7
|
+
def data
|
8
|
+
[
|
9
|
+
['rails_best_practices', @rails_best_practices_count.join(',')]
|
10
|
+
]
|
11
|
+
end
|
12
|
+
def output_filename
|
13
|
+
'rails_best_practices.js'
|
13
14
|
end
|
14
15
|
end
|
15
16
|
end
|
@@ -1,21 +1,27 @@
|
|
1
1
|
MetricFu.metrics_require { 'rails_best_practices/rails_best_practices_grapher' }
|
2
2
|
module MetricFu
|
3
3
|
class RailsBestPracticesGchartGrapher < RailsBestPracticesGrapher
|
4
|
-
def
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
4
|
+
def title
|
5
|
+
"Rails Best Practices: design problems"
|
6
|
+
end
|
7
|
+
def legend
|
8
|
+
['Problems']
|
9
|
+
end
|
10
|
+
def data
|
11
|
+
self.rails_best_practices_count
|
12
|
+
end
|
13
|
+
def output_filename
|
14
|
+
'rails_best_practices.png'
|
15
|
+
end
|
16
|
+
def gchart_line_options
|
17
|
+
super.merge({
|
18
|
+
:bar_colors => COLORS[0..1],
|
19
|
+
:legend => legend,
|
20
|
+
:custom => 'chdlp=t',
|
21
|
+
})
|
22
|
+
end
|
23
|
+
def y_axis_scale_argument
|
24
|
+
@rails_best_practices_count
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|
@@ -113,7 +113,7 @@ module MetricFu
|
|
113
113
|
files.each_pair {|fname, content| files[fname] = content.split("\n") }
|
114
114
|
files.each_pair do |fname, content|
|
115
115
|
content.map! do |raw_line|
|
116
|
-
|
116
|
+
Line.new(raw_line[3..-1], !raw_line.match(/^!!/)).to_h
|
117
117
|
end
|
118
118
|
content.reject! {|line| line[:content].to_s == '' }
|
119
119
|
files[fname] = {:lines => content}
|
@@ -1,15 +1,16 @@
|
|
1
1
|
MetricFu.metrics_require { 'rcov/rcov_grapher' }
|
2
2
|
module MetricFu
|
3
3
|
class RcovBluffGrapher < RcovGrapher
|
4
|
-
def
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
def title
|
5
|
+
'Rcov: code coverage'
|
6
|
+
end
|
7
|
+
def data
|
8
|
+
[
|
9
|
+
['rcov', @rcov_percent.join(',')]
|
10
|
+
]
|
11
|
+
end
|
12
|
+
def output_filename
|
13
|
+
'rcov.js'
|
13
14
|
end
|
14
15
|
end
|
15
16
|
end
|