ox 2.0.12 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ox might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bc14be25d8676f147ec3bf997dfc6464c5a1ac9
4
- data.tar.gz: e5662578d75a1a1af039467666d75c427815b89b
3
+ metadata.gz: 0d0581c593d77e8a06eb2146aa307ef209302d5b
4
+ data.tar.gz: 967bf1816fd0f45e4a032384ad7613d35cdd190f
5
5
  SHA512:
6
- metadata.gz: 44e1578e1ac977a53591611069645e39dbadc906067a892ff52a197f2e7d2e8c798cb4320d7352203790519f8851e45f413f41eda5eb1a5da30e25d03c09be33
7
- data.tar.gz: 4454ffacc01df4a78fff994fa31b8fc152bff30efebdde48da72c472f82d4a13a23411cd85100146187474ac6eaedb9e71f34a195e64df635b19d9e40c047a69
6
+ metadata.gz: 29816d2393f1acf19916074cdcb3f0c1b514e69f5c30ad36866bf9f004369de2e44c145518a17b361f2c776e11b741e68d0e2bce7d0579c5510de8e5fc1f2bdf
7
+ data.tar.gz: 73750690602824302e57260d9fbe3edec818ed7c9479f5bb1a268660725421750d6a5ba3cd600e2cca45dbe948259cd105b50f8a198c506479cda0c4e1ac8f1f
data/README.md CHANGED
@@ -1,28 +1,28 @@
1
1
  # Ox gem
2
2
  A fast XML parser and Object marshaller as a Ruby gem.
3
3
 
4
- ## <a name="installation">Installation</a>
4
+ ## Installation
5
5
  gem install ox
6
6
 
7
- ## <a name="documentation">Documentation</a>
7
+ ## Documentation
8
8
 
9
9
  *Documentation*: http://www.ohler.com/ox
10
10
 
11
- ## <a name="source">Source</a>
11
+ ## Source
12
12
 
13
13
  *GitHub* *repo*: https://github.com/ohler55/ox
14
14
 
15
15
  *RubyGems* *repo*: https://rubygems.org/gems/ox
16
16
 
17
- ## <a name="follow">Follow @oxgem on Twitter</a>
17
+ ## Follow @oxgem on Twitter
18
18
 
19
19
  [Follow @peterohler on Twitter](http://twitter.com/#!/peterohler) for announcements and news about the Ox gem.
20
20
 
21
- ## <a name="build_status">Build Status</a>
21
+ ## Build Status
22
22
 
23
23
  [![Build Status](https://secure.travis-ci.org/ohler55/ox.png?branch=master)](http://travis-ci.org/ohler55/ox)
24
24
 
25
- ## <a name="links">Links of Interest</a>
25
+ ## Links of Interest
26
26
 
27
27
  [Ruby XML Gem Comparison](http://www.ohler.com/dev/xml_with_ruby/xml_with_ruby.html) for a perfomance comparison between Ox, Nokogiri, and LibXML.
28
28
 
@@ -32,13 +32,13 @@ A fast XML parser and Object marshaller as a Ruby gem.
32
32
 
33
33
  *Fast JSON parser and marshaller on GitHub*: https://rubygems.org/gems/oj
34
34
 
35
- ## <a name="release">Release Notes</a>
35
+ ## Release Notes
36
36
 
37
- ### Release 2.0.12
37
+ ### Release 2.1.0
38
38
 
39
- - Fixed problem compiling with latest version of Rubinius.
39
+ - Thanks to jfontan Ox now includes support for XMLRPC.
40
40
 
41
- ## <a name="description">Description</a>
41
+ ## Description
42
42
 
43
43
  Optimized XML (Ox), as the name implies was written to provide speed optimized
44
44
  XML and now HTML handling. It was designed to be an alternative to Nokogiri and other Ruby
data/lib/ox/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Ox
3
3
  # Current version of the module.
4
- VERSION = '2.0.12'
4
+ VERSION = '2.1.0'
5
5
  end
@@ -0,0 +1,32 @@
1
+
2
+ require 'ox'
3
+
4
+ module Ox
5
+
6
+ # This is an alternative parser for the stdlib xmlrpc library. It makes
7
+ # use of Ox and is based on REXMLStreamParser. To use it set is as the
8
+ # parser for an XMLRPC client:
9
+ #
10
+ # require 'xmlrpc/client'
11
+ # require 'ox/xmlrpc_adapter'
12
+ # client = XMLRPC::Client.new2('http://some_server/rpc')
13
+ # client.set_parser(Ox::StreamParser.new)
14
+ #
15
+ class StreamParser < XMLRPC::XMLParser::AbstractStreamParser
16
+ def initialize
17
+ @parser_class = OxParser
18
+ end
19
+
20
+ class OxParser < Ox::Sax
21
+ include XMLRPC::XMLParser::StreamParserMixin
22
+
23
+ alias :text :character
24
+ alias :end_element :endElement
25
+ alias :start_element :startElement
26
+
27
+ def parse(str)
28
+ Ox.sax_parse(self, StringIO.new(str), :symbolize => false, :convert_special => true)
29
+ end
30
+ end
31
+ end
32
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ox
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.12
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-01 00:00:00.000000000 Z
11
+ date: 2014-02-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: "A fast XML parser and object serializer that uses only standard C lib.\n
14
14
  \ \nOptimized XML (Ox), as the name implies was written to provide speed
@@ -21,53 +21,54 @@ extensions:
21
21
  extra_rdoc_files:
22
22
  - README.md
23
23
  files:
24
- - lib/ox/bag.rb
25
- - lib/ox/cdata.rb
26
- - lib/ox/comment.rb
27
- - lib/ox/doctype.rb
28
- - lib/ox/document.rb
29
- - lib/ox/element.rb
30
- - lib/ox/error.rb
31
- - lib/ox/hasattrs.rb
32
- - lib/ox/instruct.rb
33
- - lib/ox/node.rb
34
- - lib/ox/sax.rb
35
- - lib/ox/version.rb
36
- - lib/ox.rb
37
- - ext/ox/extconf.rb
24
+ - LICENSE
25
+ - README.md
38
26
  - ext/ox/attr.h
39
- - ext/ox/base64.h
40
- - ext/ox/cache.h
41
- - ext/ox/cache8.h
42
- - ext/ox/encode.h
43
- - ext/ox/err.h
44
- - ext/ox/helper.h
45
- - ext/ox/ox.h
46
- - ext/ox/sax.h
47
- - ext/ox/sax_buf.h
48
- - ext/ox/sax_has.h
49
- - ext/ox/sax_hint.h
50
- - ext/ox/sax_stack.h
51
- - ext/ox/special.h
52
- - ext/ox/type.h
53
27
  - ext/ox/base64.c
28
+ - ext/ox/base64.h
54
29
  - ext/ox/cache.c
30
+ - ext/ox/cache.h
55
31
  - ext/ox/cache8.c
32
+ - ext/ox/cache8.h
56
33
  - ext/ox/cache8_test.c
57
34
  - ext/ox/cache_test.c
58
35
  - ext/ox/dump.c
36
+ - ext/ox/encode.h
59
37
  - ext/ox/err.c
38
+ - ext/ox/err.h
39
+ - ext/ox/extconf.rb
60
40
  - ext/ox/gen_load.c
41
+ - ext/ox/helper.h
61
42
  - ext/ox/obj_load.c
62
43
  - ext/ox/ox.c
44
+ - ext/ox/ox.h
63
45
  - ext/ox/parse.c
64
46
  - ext/ox/sax.c
47
+ - ext/ox/sax.h
65
48
  - ext/ox/sax_as.c
66
49
  - ext/ox/sax_buf.c
50
+ - ext/ox/sax_buf.h
51
+ - ext/ox/sax_has.h
67
52
  - ext/ox/sax_hint.c
53
+ - ext/ox/sax_hint.h
54
+ - ext/ox/sax_stack.h
68
55
  - ext/ox/special.c
69
- - LICENSE
70
- - README.md
56
+ - ext/ox/special.h
57
+ - ext/ox/type.h
58
+ - lib/ox.rb
59
+ - lib/ox/bag.rb
60
+ - lib/ox/cdata.rb
61
+ - lib/ox/comment.rb
62
+ - lib/ox/doctype.rb
63
+ - lib/ox/document.rb
64
+ - lib/ox/element.rb
65
+ - lib/ox/error.rb
66
+ - lib/ox/hasattrs.rb
67
+ - lib/ox/instruct.rb
68
+ - lib/ox/node.rb
69
+ - lib/ox/sax.rb
70
+ - lib/ox/version.rb
71
+ - lib/ox/xmlrpc_adapter.rb
71
72
  homepage: http://www.ohler.com/ox
72
73
  licenses:
73
74
  - MIT
@@ -75,24 +76,24 @@ licenses:
75
76
  metadata: {}
76
77
  post_install_message:
77
78
  rdoc_options:
78
- - --main
79
+ - "--main"
79
80
  - README.md
80
81
  require_paths:
81
82
  - lib
82
83
  - ext
83
84
  required_ruby_version: !ruby/object:Gem::Requirement
84
85
  requirements:
85
- - - '>='
86
+ - - ">="
86
87
  - !ruby/object:Gem::Version
87
88
  version: '0'
88
89
  required_rubygems_version: !ruby/object:Gem::Requirement
89
90
  requirements:
90
- - - '>='
91
+ - - ">="
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
94
  requirements: []
94
95
  rubyforge_project: ox
95
- rubygems_version: 2.0.3
96
+ rubygems_version: 2.2.0
96
97
  signing_key:
97
98
  specification_version: 4
98
99
  summary: A fast XML parser and object serializer.