rcov 0.9.9-java → 0.9.10-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -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:
@@ -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 theshold of #{@failure_threshold}%"
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 has significantly increased over your threshold of #{@failure_threshold}. Please increase it."
11
+ puts "Your coverage is close to your threshold of #{@failure_threshold}. Please increase it."
12
12
  end
13
13
  end
14
14
  end
@@ -3,7 +3,7 @@
3
3
  # See LICENSE for licensing information.
4
4
 
5
5
  module Rcov
6
- VERSION = "0.9.8"
6
+ VERSION = "0.9.10"
7
7
  RELEASE_DATE = "2010-02-28"
8
8
  RCOVRT_ABI = [2,0,0]
9
9
  UPSTREAM_URL = "http://github.com/relevance/rcov"
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcov
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 9
8
- - 9
9
- version: 0.9.9
4
+ prerelease:
5
+ version: 0.9.10
10
6
  platform: java
11
7
  authors:
12
8
  - Relevance
@@ -111,23 +107,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
107
  requirements:
112
108
  - - ">"
113
109
  - !ruby/object:Gem::Version
114
- segments:
115
- - 0
116
- - 0
117
- - 0
118
110
  version: 0.0.0
119
111
  required_rubygems_version: !ruby/object:Gem::Requirement
120
112
  none: false
121
113
  requirements:
122
114
  - - ">="
123
115
  - !ruby/object:Gem::Version
124
- segments:
125
- - 0
126
116
  version: "0"
127
117
  requirements: []
128
118
 
129
119
  rubyforge_project:
130
- rubygems_version: 1.3.7
120
+ rubygems_version: 1.5.1
131
121
  signing_key:
132
122
  specification_version: 1
133
123
  summary: Code coverage analysis tool for Ruby