rcov 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -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,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ hash: 41
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 9
9
+ - 9
10
+ version: 0.9.9
5
11
  platform: ruby
6
12
  authors:
7
13
  - Relevance
8
14
  - Chad Humphries (spicycode)
9
15
  - Aaron Bedra (abedra)
10
- - Jay McGaffigan
16
+ - Jay McGaffigan(hooligan495)
11
17
  - Mauricio Fernandez
12
18
  autorequire:
13
19
  bindir: bin
@@ -101,21 +107,29 @@ rdoc_options:
101
107
  require_paths:
102
108
  - lib
103
109
  required_ruby_version: !ruby/object:Gem::Requirement
110
+ none: false
104
111
  requirements:
105
112
  - - ">"
106
113
  - !ruby/object:Gem::Version
114
+ hash: 31
115
+ segments:
116
+ - 0
117
+ - 0
118
+ - 0
107
119
  version: 0.0.0
108
- version:
109
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
+ none: false
110
122
  requirements:
111
123
  - - ">="
112
124
  - !ruby/object:Gem::Version
125
+ hash: 3
126
+ segments:
127
+ - 0
113
128
  version: "0"
114
- version:
115
129
  requirements: []
116
130
 
117
131
  rubyforge_project:
118
- rubygems_version: 1.3.5
132
+ rubygems_version: 1.3.7
119
133
  signing_key:
120
134
  specification_version: 1
121
135
  summary: Code coverage analysis tool for Ruby