ox 2.0.1 → 2.0.2

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: 1a2fc7c5c778f642b52fcf67698d66ef22980334
4
- data.tar.gz: 36104a1aef0a7fdcf025ce033ebc614cde934ed7
3
+ metadata.gz: ae0dbc4e3a17970ece45a543a56181be5218e13f
4
+ data.tar.gz: a667157d26ff14f45d54cdc64b1f7f74a9dac965
5
5
  SHA512:
6
- metadata.gz: 4190d2fd9661a40b1fa388f3e736a114d1561d823aa4ba2f17ddea9cca8405a1f0f95fb498d2fdd053ebc1a743f076995003e8e45f7dcf85c072f23848aaa024
7
- data.tar.gz: bda2a5979727f68eb5d629f7aa69dc1c0912bb232b7068005b18d27c89dcaf5f74b40fcae07ef08eebd27cd6143ad05dfa8eb4bc71c60bef583c71625ebbb772
6
+ metadata.gz: 59334b95d88b70fe553ad03fd12adcb7c53d80aa04f743516515c841cb350aabad840a836b97a775c5da417e07a89047780ddfa2d5452ac06a311131ebf04fc4
7
+ data.tar.gz: 88c8e2abf0cdd10f738b43561b0b2ee4bd471540e6120f75aaa0499fa7a04634b16a2f71215786667229cb04e47716a87d1e2d9f76098c25d74a32448e010885
data/README.md CHANGED
@@ -34,17 +34,9 @@ A fast XML parser and Object marshaller as a Ruby gem.
34
34
 
35
35
  ## <a name="release">Release Notes</a>
36
36
 
37
- ### Release 2.0.1
37
+ ### Release 2.0.2
38
38
 
39
- - Added an attrs_done callback to the sax parser that will be called when all
40
- attributes for an element have been read.
41
-
42
- - Fixed bug in SAX parser where raising an exception in the handler routines
43
- would not cleanup. The test put together by griffinmyers was a huge help.
44
-
45
- - Reduced stack use in a several places to improve fiber support.
46
-
47
- - Changed exception handling to assure proper cleanup with new stack minimizing.
39
+ - Fixed buffer sliding window off by 1 error in the SAX parser.
48
40
 
49
41
  ## <a name="description">Description</a>
50
42
 
@@ -86,7 +78,7 @@ callbacks. Unlike Nokogiri and LibXML, Ox can be tuned to use only the SAX
86
78
  callbacks that are of interest to the caller. (See the perf_sax.rb file for an
87
79
  example.)
88
80
 
89
- Ox is compatible with Ruby 1.8.7, 1.9.2, JRuby, and RBX.
81
+ Ox is compatible with Ruby 1.8.7, 1.9.2, 2.0.0, JRuby, and RBX.
90
82
 
91
83
  ### Object Dump Sample:
92
84
 
data/ext/ox/ox.c CHANGED
@@ -238,6 +238,9 @@ defuse_bom(char *xml, Options options) {
238
238
  * - effort: [:strict|:tolerant|:auto_define] set the tolerance level for loading
239
239
  * - symbolize_keys: [true|false|nil] symbolize element attribute keys or leave as Strings
240
240
  * @return [Hash] all current option settings.
241
+ *
242
+ * Note that an indent of less than zero will result in a tight one line output
243
+ * unless the text in the XML fields contain new line characters.
241
244
  */
242
245
  static VALUE
243
246
  get_def_opts(VALUE self) {
@@ -755,6 +758,9 @@ parse_dump_options(VALUE ropts, Options copts) {
755
758
  * @param [:strict|:tolerant] :effort effort to use when an undumpable object (e.g., IO) is encountered, default: :strict
756
759
  * - *:strict* - raise an NotImplementedError if an undumpable object is encountered
757
760
  * - *:tolerant* - replaces undumplable objects with nil
761
+ *
762
+ * Note that an indent of less than zero will result in a tight one line output
763
+ * unless the text in the XML fields contain new line characters.
758
764
  */
759
765
  static VALUE
760
766
  dump(int argc, VALUE *argv, VALUE self) {
@@ -795,6 +801,9 @@ dump(int argc, VALUE *argv, VALUE self) {
795
801
  * @param [:strict|:tolerant] :effort effort to use when an undumpable object (e.g., IO) is encountered, default: :strict
796
802
  * - *:strict* - raise an NotImplementedError if an undumpable object is encountered
797
803
  * - *:tolerant* - replaces undumplable objects with nil
804
+ *
805
+ * Note that an indent of less than zero will result in a tight one line output
806
+ * unless the text in the XML fields contain new line characters.
798
807
  */
799
808
  static VALUE
800
809
  to_file(int argc, VALUE *argv, VALUE self) {
data/ext/ox/sax_buf.c CHANGED
@@ -118,9 +118,9 @@ ox_sax_buf_read(Buf buf) {
118
118
  if (0 == buf->pro) {
119
119
  shift = buf->tail - buf->head;
120
120
  } else {
121
- shift = buf->pro - buf->head;
121
+ shift = buf->pro - buf->head - 1; // leave one character so we cab backup one
122
122
  }
123
- if (0 == shift) { /* no space left so allocate more */
123
+ if (0 >= shift) { /* no space left so allocate more */
124
124
  char *old = buf->head;
125
125
  size_t size = buf->end - buf->head + BUF_PAD;
126
126
 
data/ext/ox/sax_buf.h CHANGED
@@ -194,5 +194,4 @@ buf_checkback(Buf buf, CheckPt cp) {
194
194
  return cp->c;
195
195
  }
196
196
 
197
-
198
197
  #endif /* __OX_SAX_BUF_H__ */
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.1'
4
+ VERSION = '2.0.2'
5
5
  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.1
4
+ version: 2.0.2
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-05-21 00:00:00.000000000 Z
11
+ date: 2013-06-07 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