rcov 0.9.9 → 0.9.10
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.
@@ -131,6 +131,7 @@ module Rcov
|
|
131
131
|
def reset; super end
|
132
132
|
|
133
133
|
def dump_coverage_info(formatters) # :nodoc:
|
134
|
+
correct_script_lines__
|
134
135
|
update_script_lines__
|
135
136
|
raw_data_relative.each do |file, lines|
|
136
137
|
next if @script_lines__.has_key?(file) == false
|
@@ -253,6 +254,18 @@ module Rcov
|
|
253
254
|
@script_lines__ = @script_lines__.merge(SCRIPT_LINES__)
|
254
255
|
end
|
255
256
|
|
257
|
+
def correct_script_lines__
|
258
|
+
return unless Object.const_defined?("JRUBY_VERSION") && JRUBY_VERSION < "1.5.3"
|
259
|
+
SCRIPT_LINES__.each_key do |file|
|
260
|
+
next unless File.exists? file
|
261
|
+
lines = []
|
262
|
+
File.open(file).each do |line|
|
263
|
+
lines << line
|
264
|
+
end
|
265
|
+
SCRIPT_LINES__[file] = lines
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
256
269
|
public
|
257
270
|
|
258
271
|
def marshal_dump # :nodoc:
|
data/lib/rcov/file_statistics.rb
CHANGED
@@ -110,6 +110,7 @@ module Rcov
|
|
110
110
|
pending = []
|
111
111
|
state = :code
|
112
112
|
@lines.each_with_index do |line, index|
|
113
|
+
line.force_encoding("utf-8") if line.respond_to?(:force_encoding)
|
113
114
|
case state
|
114
115
|
when :code
|
115
116
|
if /^=begin\b/ =~ line
|
@@ -352,4 +353,4 @@ module Rcov
|
|
352
353
|
r
|
353
354
|
end
|
354
355
|
end
|
355
|
-
end
|
356
|
+
end
|
@@ -4,11 +4,11 @@ module Rcov
|
|
4
4
|
puts summary
|
5
5
|
coverage = code_coverage * 100
|
6
6
|
if coverage < @failure_threshold
|
7
|
-
puts "You failed to satisfy the coverage
|
7
|
+
puts "You failed to satisfy the coverage threshold of #{@failure_threshold}%."
|
8
8
|
exit(1)
|
9
9
|
end
|
10
10
|
if (coverage - @failure_threshold) > 3
|
11
|
-
puts "Your coverage
|
11
|
+
puts "Your coverage is close to your threshold of #{@failure_threshold}. Please increase it."
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/lib/rcov/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 47
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 10
|
10
|
+
version: 0.9.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Relevance
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain:
|
21
21
|
date: 2009-12-29 00:00:00 -05:00
|
22
|
-
default_executable:
|
22
|
+
default_executable:
|
23
23
|
dependencies: []
|
24
24
|
|
25
25
|
description: rcov is a code coverage tool for Ruby. It is commonly used for viewing overall test unit coverage of target code. It features fast execution (20-300 times faster than previous tools), multiple analysis modes, XHTML and several kinds of text reports, easy automation with Rake via a RcovTask, fairly accurate coverage information through code linkage inference using simple heuristics, colorblind-friendliness...
|