jrexml 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Rakefile +1 -1
- data/lib/jrexml/java_pull_parser.rb +3 -1
- data/spec/java_pull_parser_spec.rb +4 -0
- metadata +2 -2
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ MANIFEST = FileList["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt",
|
|
5
5
|
|
6
6
|
begin
|
7
7
|
require 'hoe'
|
8
|
-
hoe = Hoe.new("jrexml", "0.5") do |p|
|
8
|
+
hoe = Hoe.new("jrexml", "0.5.1") do |p|
|
9
9
|
p.rubyforge_name = "caldersphere"
|
10
10
|
p.url = "http://caldersphere.rubyforge.org/jrexml"
|
11
11
|
p.author = "Nick Sieger"
|
@@ -41,8 +41,9 @@ module JREXML
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def stream=(source)
|
44
|
+
enc = source.encoding if source.respond_to?(:encoding)
|
44
45
|
@source = JavaPullParser.factory.newPullParser
|
45
|
-
@source.setInput java.io.ByteArrayInputStream.new(get_bytes(source)),
|
46
|
+
@source.setInput java.io.ByteArrayInputStream.new(get_bytes(source)), enc
|
46
47
|
end
|
47
48
|
|
48
49
|
# Returns true if there are no more events
|
@@ -156,6 +157,7 @@ module JREXML
|
|
156
157
|
end
|
157
158
|
|
158
159
|
def get_bytes(src)
|
160
|
+
src = src.buffer if src.respond_to?(:buffer) # REXML::Source crap
|
159
161
|
string = if src.respond_to?(:read)
|
160
162
|
src.read
|
161
163
|
else
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: jrexml
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version:
|
7
|
-
date: 2007-08-
|
6
|
+
version: 0.5.1
|
7
|
+
date: 2007-08-08 00:00:00 -07:00
|
8
8
|
summary: JREXML speeds up REXML under JRuby by using a Java pull parser.
|
9
9
|
require_paths:
|
10
10
|
- lib
|