multisax 0.0.5.1 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile +1 -1
- data/README.md +1 -0
- data/lib/multisax.rb +4 -5
- data/multisax.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b40c84bc5076ee64f16e5dba05765e01fd1b17a
|
4
|
+
data.tar.gz: 97f52137ee9171e3c3efd74303fbf784be40ca33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09554bc0d7d6c198b05a2b2a212d506fda00ed7cb81d78d79d3309c4bbe782b00c910be430badc0d64f04c50eba5a72fb800bf8eefcc5d403149c90eee0f8913
|
7
|
+
data.tar.gz: 588370966d1cca05f96ec119d44410e0b3d880fc2e122c0418329ef05c246ab9b387d1e41318c88833b93405e88faf7e6c10fb6688bf3724607c84633d6e2c94
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -33,6 +33,7 @@ A module which allows multiple SAX library transparently.
|
|
33
33
|
* to treat cdata, I recommend expat 2.x.
|
34
34
|
* For example, OSX MacPorts users should:
|
35
35
|
* gem install xmlparser -- --with-expat-include=/opt/local/include --with-expat-lib=/opt/local/lib
|
36
|
+
* gem install oga
|
36
37
|
|
37
38
|
## Usage
|
38
39
|
* Please check spec/multisax.spec as an example.
|
data/lib/multisax.rb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
module MultiSAX
|
10
10
|
# VERSION string
|
11
|
-
VERSION='0.0.
|
11
|
+
VERSION='0.0.6'
|
12
12
|
|
13
13
|
# The class to handle XML libraries.
|
14
14
|
class SAX
|
@@ -124,17 +124,16 @@ module MultiSAX
|
|
124
124
|
@saxhelper=Class.new{
|
125
125
|
def __init__(obj)
|
126
126
|
@obj=obj
|
127
|
-
@stack=[]
|
128
127
|
self
|
129
128
|
end
|
130
129
|
def on_element(ns,tag,attrs)
|
131
130
|
tag_name=(ns ? (ns+':') : '')+tag
|
132
|
-
@stack.push(tag_name)
|
133
131
|
@obj.sax_tag_start(tag_name,Hash[*attrs.map{|e|[e.name,e.value]}.flatten(1)])
|
134
132
|
return tag_name
|
135
133
|
end
|
136
|
-
def after_element(
|
137
|
-
|
134
|
+
def after_element(ns,tag)
|
135
|
+
tag_name=(ns ? (ns+':') : '')+tag
|
136
|
+
@obj.sax_tag_end(tag_name)
|
138
137
|
end
|
139
138
|
def on_text(txt) @obj.sax_text(txt) end
|
140
139
|
def on_cdata(txt) @obj.sax_cdata(txt) end
|
data/multisax.gemspec
CHANGED
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "bundler", ">= 1.0"
|
25
25
|
spec.add_development_dependency "rake"
|
26
26
|
spec.add_development_dependency "rspec"
|
27
|
-
spec.requirements << "Optional dependencies: ox, libxml-ruby, nokogiri,
|
27
|
+
spec.requirements << "Optional dependencies: ox, libxml-ruby, nokogiri, xmlparser, oga"
|
28
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multisax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cielavenir
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
requirements:
|
93
|
-
- 'Optional dependencies: ox, libxml-ruby, nokogiri,
|
93
|
+
- 'Optional dependencies: ox, libxml-ruby, nokogiri, xmlparser, oga'
|
94
94
|
rubyforge_project:
|
95
95
|
rubygems_version: 2.0.14
|
96
96
|
signing_key:
|