rcov 0.8.1.1.0 → 0.8.1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,6 +1,15 @@
1
1
 
2
2
  User-visible changes.
3
3
 
4
+ Since 0.8.1.1 (2007-11-20)
5
+ ==========================
6
+ Bugfixes
7
+ --------
8
+ * REXML from 1.8.6-p11[01] is more broken than anticipated; more invasive
9
+ workarounds. Tested on 1.8.6-p110 and 1.8.5. Note that code using REXML to
10
+ generate XML will behave differently under rcov in 1.8.6-p11[01] (to begin
11
+ with, it won't crash in REXML::Document#write).
12
+
4
13
  Since 0.8.1 (2007-11-19)
5
14
  ========================
6
15
  Bugfixes
data/THANKS CHANGED
@@ -91,3 +91,6 @@ Kosmas Schütz, Daniel Berger, François Beausoleil, Bil Kleb:
91
91
 
92
92
  Chad Humphries:
93
93
  * indicated that Spec::DSL::Example has changed in RSpec trunk
94
+
95
+ Jeremy Hinegardner:
96
+ * more info about REXML's bugs in 1.8.6-p11[01]
data/lib/rcov/report.rb CHANGED
@@ -4,27 +4,63 @@
4
4
  require 'pathname'
5
5
  module Rcov
6
6
 
7
- # Try to fix bug in the REXML shipped with Ruby 1.8.6
8
- # This affects Mac OSX 10.5.1 users and motivates endless bug reports.
9
- if RUBY_VERSION == "1.8.6" && defined? REXML::Formatters::Transitive &&
10
- RUBY_RELEASE_DATE < "2007-11-04"
7
+ # Try to fix bugs in the REXML shipped with Ruby 1.8.6
8
+ # They affect Mac OSX 10.5.1 users and motivates endless bug reports.
9
+ begin
10
+ require 'rexml/formatters/transitive'
11
+ require 'rexml/formatter/pretty'
12
+ rescue LoadError
13
+ end
14
+
15
+ if RUBY_VERSION == "1.8.6" && defined? REXML::Formatters::Transitive
11
16
  class REXML::Document
17
+ remove_method :write rescue nil
12
18
  def write( output=$stdout, indent=-1, trans=false, ie_hack=false )
13
19
  if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output)
14
20
  output = Output.new( output, xml_decl.encoding )
15
21
  end
16
22
  formatter = if indent > -1
17
- if trans
18
- REXML::Formatters::Transitive.new( indent, ie_hack )
19
- else
20
- REXML::Formatters::Pretty.new( indent, ie_hack )
21
- end
23
+ #if trans
24
+ REXML::Formatters::Transitive.new( indent )
25
+ #else
26
+ # REXML::Formatters::Pretty.new( indent, ie_hack )
27
+ #end
22
28
  else
23
29
  REXML::Formatters::Default.new( ie_hack )
24
30
  end
25
31
  formatter.write( self, output )
26
32
  end
27
33
  end
34
+
35
+ class REXML::Formatters::Transitive
36
+ remove_method :write_element rescue nil
37
+ def write_element( node, output )
38
+ output << "<#{node.expanded_name}"
39
+
40
+ node.attributes.each_attribute do |attr|
41
+ output << " "
42
+ attr.write( output )
43
+ end unless node.attributes.empty?
44
+
45
+ if node.children.empty?
46
+ output << "/>"
47
+ else
48
+ output << ">"
49
+ # If compact and all children are text, and if the formatted output
50
+ # is less than the specified width, then try to print everything on
51
+ # one line
52
+ skip = false
53
+ @level += @indentation
54
+ node.children.each { |child|
55
+ write( child, output )
56
+ }
57
+ @level -= @indentation
58
+ output << "</#{node.expanded_name}>"
59
+ end
60
+ output << "\n"
61
+ output << ' '*@level
62
+ end
63
+ end
28
64
  end
29
65
 
30
66
  class Formatter # :nodoc:
data/lib/rcov/version.rb CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  module Rcov
6
6
 
7
- VERSION = "0.8.1.1"
8
- RELEASE_DATE = "2007-11-20"
7
+ VERSION = "0.8.1.2"
8
+ RELEASE_DATE = "2007-11-22"
9
9
  RCOVRT_ABI = [2,0,0]
10
10
  UPSTREAM_URL = "http://eigenclass.org/hiki/rcov"
11
11
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.1
3
3
  specification_version: 1
4
4
  name: rcov
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.8.1.1.0
7
- date: 2007-11-20 00:00:00 +01:00
6
+ version: 0.8.1.2.0
7
+ date: 2007-11-22 00:00:00 +01:00
8
8
  summary: Code coverage analysis tool for Ruby
9
9
  require_paths:
10
10
  - lib