rcov 0.9.8-java → 0.9.9-java
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/bin/rcov +5 -0
- data/lib/rcov/rcovtask.rb +1 -0
- data/lib/rcov/templates/index.html.erb +1 -1
- data/test/code_coverage_analyzer_test.rb +3 -0
- metadata +16 -5
data/bin/rcov
CHANGED
@@ -404,6 +404,11 @@ if textual_formatters[options.textmode]
|
|
404
404
|
formatters << make_formatter[textual_formatters[options.textmode]]
|
405
405
|
end
|
406
406
|
|
407
|
+
|
408
|
+
if options.failure_threshold.nil? == false && options.textmode != :failure_report
|
409
|
+
formatters << make_formatter[textual_formatters[:failure_report]]
|
410
|
+
end
|
411
|
+
|
407
412
|
formatters << make_formatter[Rcov::TextCoverageDiff] if options.coverage_diff_save
|
408
413
|
|
409
414
|
if options.aggregate_file
|
data/lib/rcov/rcovtask.rb
CHANGED
@@ -88,6 +88,7 @@ module Rcov
|
|
88
88
|
@warning = false
|
89
89
|
@rcov_opts = ["--text-report"]
|
90
90
|
@ruby_opts = []
|
91
|
+
@ruby_opts << "--debug" if RUBY_PLATFORM == 'java'
|
91
92
|
@output_dir = "coverage"
|
92
93
|
yield self if block_given?
|
93
94
|
@pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil?
|
@@ -60,7 +60,7 @@
|
|
60
60
|
<tbody>
|
61
61
|
<% files.each_with_index do |f,i| %>
|
62
62
|
<tr class="all_files all_coverage <%= coverage_threshold_classes(f.code_coverage_for_report) %> <%= file_filter_classes(f.name) %> <%= i % 2 == 0 ? 'even' : 'odd' %>">
|
63
|
-
<td class="left_align"><a href="<%= relative_filename(f.name) %>"><%= f.name %></a></td>
|
63
|
+
<td class="left_align"><a href="<%= CGI::escapeHTML(relative_filename(f.name)) %>"><%= CGI::escapeHTML(f.name) %></a></td>
|
64
64
|
<td class='right_align'><tt><%= f.num_lines %></tt></td>
|
65
65
|
<td class='right_align'><tt><%= f.num_code_lines %></tt></td>
|
66
66
|
<td class="left_align"><%= code_coverage_html(f.total_coverage_for_report) %></td>
|
@@ -48,6 +48,8 @@ EOF
|
|
48
48
|
assert_equal(lines, line_info)
|
49
49
|
assert_equal([true, true, false, false, true, false, true], cov_info)
|
50
50
|
assert_equal([1, 2, 0, 0, 1, 0, 11], count_info) unless RUBY_PLATFORM =~ /java/
|
51
|
+
# JRUBY reports an if x==blah as hitting this type of line once, JRUBY also optimizes this stuff so you'd have to run with --debug to get "extra" information. MRI hits it twice.
|
52
|
+
assert_equal([1, 3, 0, 0, 1, 0, 13], count_info) if RUBY_PLATFORM =~ /java/
|
51
53
|
analyzer.reset
|
52
54
|
assert_equal(nil, analyzer.data(sample_file))
|
53
55
|
assert_equal([], analyzer.analyzed_files)
|
@@ -189,6 +191,7 @@ EOF
|
|
189
191
|
assert_equal([0, 121, 121, 121, 0], counts2)
|
190
192
|
end
|
191
193
|
end
|
194
|
+
|
192
195
|
|
193
196
|
def test_reset
|
194
197
|
a1 = Rcov::CodeCoverageAnalyzer.new
|
metadata
CHANGED
@@ -1,13 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 9
|
8
|
+
- 9
|
9
|
+
version: 0.9.9
|
5
10
|
platform: java
|
6
11
|
authors:
|
7
12
|
- Relevance
|
8
13
|
- Chad Humphries (spicycode)
|
9
14
|
- Aaron Bedra (abedra)
|
10
|
-
- Jay McGaffigan
|
15
|
+
- Jay McGaffigan(hooligan495)
|
11
16
|
- Mauricio Fernandez
|
12
17
|
autorequire:
|
13
18
|
bindir: bin
|
@@ -102,21 +107,27 @@ rdoc_options:
|
|
102
107
|
require_paths:
|
103
108
|
- lib
|
104
109
|
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
none: false
|
105
111
|
requirements:
|
106
112
|
- - ">"
|
107
113
|
- !ruby/object:Gem::Version
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
- 0
|
117
|
+
- 0
|
108
118
|
version: 0.0.0
|
109
|
-
version:
|
110
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
111
121
|
requirements:
|
112
122
|
- - ">="
|
113
123
|
- !ruby/object:Gem::Version
|
124
|
+
segments:
|
125
|
+
- 0
|
114
126
|
version: "0"
|
115
|
-
version:
|
116
127
|
requirements: []
|
117
128
|
|
118
129
|
rubyforge_project:
|
119
|
-
rubygems_version: 1.3.
|
130
|
+
rubygems_version: 1.3.7
|
120
131
|
signing_key:
|
121
132
|
specification_version: 1
|
122
133
|
summary: Code coverage analysis tool for Ruby
|