hutch-xamplr-pp 1.1.0 → 1.1.2
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.
- data/.document +5 -0
- data/.gitignore +7 -0
- data/Makefile +12 -0
- data/VERSION.yml +1 -1
- data/lapidary-tests/TC_EventTypes.rb +212 -0
- data/lapidary-tests/TC_Features.rb +56 -0
- data/lapidary-tests/TC_Input.rb +240 -0
- data/lapidary-tests/TC_Input000.data +1 -0
- data/lapidary-tests/TC_Input001.data +1 -0
- data/lapidary-tests/TC_Misc.rb +36 -0
- data/lapidary-tests/TC_Namespace.rb +197 -0
- data/lapidary-tests/TC_Parse.rb +655 -0
- data/lapidary-tests/TC_Parse000.data +6 -0
- data/lapidary-tests/TS_xpp.rb +45 -0
- data/lib/xamplr-pp-18x.rb +991 -0
- data/lib/xamplr-pp.rb +35 -9
- data/xamplr-pp.gemspec +70 -0
- metadata +21 -9
- data/test/test_helper.rb +0 -10
- data/test/xamplr_pp_gem_test.rb +0 -7
data/lib/xamplr-pp.rb
CHANGED
@@ -33,7 +33,11 @@ class Xampl_PP
|
|
33
33
|
UNDECIDED_TYPE = 'UNDECIDED_TYPE'
|
34
34
|
|
35
35
|
def first_byte(str)
|
36
|
-
|
36
|
+
if "9" == RUBY_VERSION[2..2] then
|
37
|
+
str.bytes.first
|
38
|
+
else
|
39
|
+
str[0]
|
40
|
+
end
|
37
41
|
end
|
38
42
|
|
39
43
|
# 'Features', acutally just processing options
|
@@ -302,10 +306,18 @@ class Xampl_PP
|
|
302
306
|
|
303
307
|
c = @inputBuffer[@column]
|
304
308
|
if c.instance_of?(String) then
|
305
|
-
|
309
|
+
if "9" == RUBY_VERSION[2..2] then
|
310
|
+
c = c.bytes.first
|
311
|
+
else
|
312
|
+
c = c[0]
|
313
|
+
end
|
306
314
|
end
|
307
315
|
if e.instance_of?(String) then
|
308
|
-
|
316
|
+
if "9" == RUBY_VERSION[2..2] then
|
317
|
+
e = e.bytes.first
|
318
|
+
else
|
319
|
+
e = e[0]
|
320
|
+
end
|
309
321
|
end
|
310
322
|
@column += 1
|
311
323
|
if c == e then
|
@@ -330,7 +342,11 @@ class Xampl_PP
|
|
330
342
|
|
331
343
|
#puts "#{ __FILE__ }:#{ __LINE__ } READ COLUMN #{ @column } FROM: #{ @inputBuffer }"
|
332
344
|
#puts "#{ __FILE__ }:#{ __LINE__ } READ: #{ @inputBuffer[@column] }"
|
333
|
-
|
345
|
+
if "9" == RUBY_VERSION[2..2] then
|
346
|
+
c = @inputBuffer[@column].bytes.first # 1.9.1 fixup
|
347
|
+
else
|
348
|
+
c = @inputBuffer[@column]
|
349
|
+
end
|
334
350
|
@column += 1
|
335
351
|
return c
|
336
352
|
end
|
@@ -716,12 +732,22 @@ class Xampl_PP
|
|
716
732
|
|
717
733
|
delimiter = read
|
718
734
|
#TODO optimise this
|
719
|
-
if "
|
720
|
-
|
721
|
-
|
722
|
-
|
735
|
+
if "9" == RUBY_VERSION[2..2] then
|
736
|
+
if "'".bytes.first == delimiter then # for vim: '
|
737
|
+
value = parseText(?', true) # for vim: '
|
738
|
+
elsif '"'.bytes.first == delimiter then # for vim: "
|
739
|
+
value = parseText(?", true) # for vim: "
|
740
|
+
else
|
741
|
+
raise "invalidDelimiter"
|
742
|
+
end
|
723
743
|
else
|
724
|
-
|
744
|
+
if ?' == delimiter then # for vim: '
|
745
|
+
value = parseText(?', true) # for vim: '
|
746
|
+
elsif ?" == delimiter then # for vim: "
|
747
|
+
value = parseText(?", true) # for vim: "
|
748
|
+
else
|
749
|
+
raise "invalidDelimiter: '#{ delimiter }'"
|
750
|
+
end
|
725
751
|
end
|
726
752
|
|
727
753
|
# replaced with above for 1.9.1
|
data/xamplr-pp.gemspec
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{xamplr-pp}
|
5
|
+
s.version = "1.1.2"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Bob Hutchison"]
|
9
|
+
s.date = %q{2009-06-18}
|
10
|
+
s.email = %q{hutch@recursive.ca}
|
11
|
+
s.extra_rdoc_files = [
|
12
|
+
"LICENSE",
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".document",
|
17
|
+
".gitignore",
|
18
|
+
"LICENSE",
|
19
|
+
"Makefile",
|
20
|
+
"README.rdoc",
|
21
|
+
"Rakefile",
|
22
|
+
"VERSION.yml",
|
23
|
+
"lapidary-tests/TC_EventTypes.rb",
|
24
|
+
"lapidary-tests/TC_Features.rb",
|
25
|
+
"lapidary-tests/TC_Input.rb",
|
26
|
+
"lapidary-tests/TC_Input000.data",
|
27
|
+
"lapidary-tests/TC_Input001.data",
|
28
|
+
"lapidary-tests/TC_Misc.rb",
|
29
|
+
"lapidary-tests/TC_Namespace.rb",
|
30
|
+
"lapidary-tests/TC_Parse.rb",
|
31
|
+
"lapidary-tests/TC_Parse000.data",
|
32
|
+
"lapidary-tests/TS_xpp.rb",
|
33
|
+
"lib/xampl-pp-dtd.rb",
|
34
|
+
"lib/xampl-pp-wf.rb",
|
35
|
+
"lib/xamplr-pp-18x.rb",
|
36
|
+
"lib/xamplr-pp.rb",
|
37
|
+
"lib/xamplr-pp/ANNOUNCE.TXT",
|
38
|
+
"lib/xamplr-pp/LICENSE",
|
39
|
+
"lib/xamplr-pp/Makefile",
|
40
|
+
"lib/xamplr-pp/examples/parse-wf.rb",
|
41
|
+
"lib/xamplr-pp/examples/parse.rb",
|
42
|
+
"lib/xamplr-pp/license.inc",
|
43
|
+
"lib/xamplr-pp/saxdemo.rb",
|
44
|
+
"lib/xamplr-pp/saxish.rb",
|
45
|
+
"lib/xamplr-pp/saxishHandler.rb",
|
46
|
+
"lib/xamplr-pp/toys/chew.rb",
|
47
|
+
"lib/xamplr-pp/toys/chewMultibyte.rb",
|
48
|
+
"lib/xamplr-pp/toys/dump.rb",
|
49
|
+
"lib/xamplr-pp/xmlName.defn",
|
50
|
+
"lib/xamplr-pp/xpp.rb",
|
51
|
+
"lib/xamplr-pp/xppDeluxe.rb",
|
52
|
+
"lib/xamplr-pp/xppIter.rb",
|
53
|
+
"xamplr-pp.gemspec"
|
54
|
+
]
|
55
|
+
s.homepage = %q{http://github.com/hutch/xamplr-pp}
|
56
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
57
|
+
s.require_paths = ["lib"]
|
58
|
+
s.rubygems_version = %q{1.3.4}
|
59
|
+
s.summary = %q{A pure ruby XML pull parser}
|
60
|
+
|
61
|
+
if s.respond_to? :specification_version then
|
62
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
63
|
+
s.specification_version = 3
|
64
|
+
|
65
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
66
|
+
else
|
67
|
+
end
|
68
|
+
else
|
69
|
+
end
|
70
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hutch-xamplr-pp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Hutchison
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-18 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -23,12 +23,26 @@ extra_rdoc_files:
|
|
23
23
|
- LICENSE
|
24
24
|
- README.rdoc
|
25
25
|
files:
|
26
|
+
- .document
|
27
|
+
- .gitignore
|
26
28
|
- LICENSE
|
29
|
+
- Makefile
|
27
30
|
- README.rdoc
|
28
31
|
- Rakefile
|
29
32
|
- VERSION.yml
|
33
|
+
- lapidary-tests/TC_EventTypes.rb
|
34
|
+
- lapidary-tests/TC_Features.rb
|
35
|
+
- lapidary-tests/TC_Input.rb
|
36
|
+
- lapidary-tests/TC_Input000.data
|
37
|
+
- lapidary-tests/TC_Input001.data
|
38
|
+
- lapidary-tests/TC_Misc.rb
|
39
|
+
- lapidary-tests/TC_Namespace.rb
|
40
|
+
- lapidary-tests/TC_Parse.rb
|
41
|
+
- lapidary-tests/TC_Parse000.data
|
42
|
+
- lapidary-tests/TS_xpp.rb
|
30
43
|
- lib/xampl-pp-dtd.rb
|
31
44
|
- lib/xampl-pp-wf.rb
|
45
|
+
- lib/xamplr-pp-18x.rb
|
32
46
|
- lib/xamplr-pp.rb
|
33
47
|
- lib/xamplr-pp/ANNOUNCE.TXT
|
34
48
|
- lib/xamplr-pp/LICENSE
|
@@ -46,9 +60,8 @@ files:
|
|
46
60
|
- lib/xamplr-pp/xpp.rb
|
47
61
|
- lib/xamplr-pp/xppDeluxe.rb
|
48
62
|
- lib/xamplr-pp/xppIter.rb
|
49
|
-
-
|
50
|
-
|
51
|
-
has_rdoc: true
|
63
|
+
- xamplr-pp.gemspec
|
64
|
+
has_rdoc: false
|
52
65
|
homepage: http://github.com/hutch/xamplr-pp
|
53
66
|
post_install_message:
|
54
67
|
rdoc_options:
|
@@ -72,8 +85,7 @@ requirements: []
|
|
72
85
|
rubyforge_project:
|
73
86
|
rubygems_version: 1.2.0
|
74
87
|
signing_key:
|
75
|
-
specification_version:
|
88
|
+
specification_version: 3
|
76
89
|
summary: A pure ruby XML pull parser
|
77
|
-
test_files:
|
78
|
-
|
79
|
-
- test/xamplr_pp_gem_test.rb
|
90
|
+
test_files: []
|
91
|
+
|
data/test/test_helper.rb
DELETED
data/test/xamplr_pp_gem_test.rb
DELETED