ox 2.14.2 → 2.14.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97fcb1a62067bc5b89b5d87f21fadeef568fc3ff077562f5b283a8ff01ed0e0e
4
- data.tar.gz: 3da26b22a552c6f1009593e163b77b26eee204758fb13af7a978a936247dc192
3
+ metadata.gz: 8cef7183a7bea9cd7baba3313afd0e008861d159ae8d99ef229dca9cb34ba1fd
4
+ data.tar.gz: 4929590f1b84ac3e5350c2657a3374eb49a2a258668bbf13d2ee5624110402c5
5
5
  SHA512:
6
- metadata.gz: 0dcaafdffe911c917c12e44e45f02ab100489a98d3f19df67a1131743141e0efb8dacb3d695e9f0b965d7813b91cadd15faa4375aab886fceff37cd9a9d6e404
7
- data.tar.gz: e7701c3e41d8f6701bcc44f74fffd540cac3c525192531e652d6c2508b1a0c72dbd21d344e1e2f431683714ea5cf23eefa1da80c97dfa32d509df496ae0bf5c2
6
+ metadata.gz: fb7fb21b9be8f9e046b22e3dde36bb2469256daab163e17e082c9c15865926e21d2793052f544ebadaa958fb6589d30e9a5b7c6fed018f1fa6e32782271a2e8c
7
+ data.tar.gz: f259be386f39855faf5f871119cd60c16ee6c23872baf2239754f17512355fd19c2dbfa8c254746e1f44b0819f32b3e63700a5bfe3f6f0ff831c5f9c107f9df1
data/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All changes to the Ox gem are documented here. Releases follow semantic versioning.
4
4
 
5
+ ## [2.14.6] - 2021-11-03
6
+
7
+ ### Fixed
8
+
9
+ - Closing tags in builder are now escapped correctly thanks to ezekg.
10
+
11
+ ## [2.14.5] - 2021-06-04
12
+
13
+ ### Fixed
14
+
15
+ - Fixed RDoc for for Ox::Builder.
16
+
17
+ ## [2.14.4] - 2021-03-19
18
+
19
+ ### Fixed
20
+
21
+ - Really fixed code issue around HAVE_RB_ENC_ASSOCIATE.
22
+
23
+ ## [2.14.3] - 2021-03-12
24
+
25
+ ### Fixed
26
+
27
+ - Code issue around HAVE_RB_ENC_ASSOCIATE fixed.
28
+
5
29
  ## [2.14.2] - 2021-03-07
6
30
 
7
31
  ### Fixed
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Ox gem
2
2
  A fast XML parser and Object marshaller as a Ruby gem.
3
3
 
4
- [![Build status](https://ci.appveyor.com/api/projects/status/pg2w4wspbrflbi8c?svg=true)](https://ci.appveyor.com/project/ohler55/ox)
4
+ [![Build Status](https://img.shields.io/github/workflow/status/ohler55/ox/CI?logo=github)](https://github.com/ohler55/ox/actions/workflows/CI.yml)
5
5
 
6
6
  ## Installation
7
7
  gem install ox
data/ext/ox/builder.c CHANGED
@@ -286,7 +286,7 @@ pop(Builder b) {
286
286
  append_indent(b);
287
287
  }
288
288
  buf_append_string(&b->buf, "</", 2);
289
- buf_append_string(&b->buf, e->name, e->len);
289
+ append_string(b, e->name, e->len, xml_element_chars, false);
290
290
  buf_append(&b->buf, '>');
291
291
  b->col += e->len + 3;
292
292
  b->pos += e->len + 3;
@@ -898,8 +898,7 @@ builder_pos(VALUE self) {
898
898
  *
899
899
  * Closes the current element.
900
900
  */
901
- static VALUE
902
- builder_pop(VALUE self) {
901
+ static VALUE builder_pop(VALUE self) {
903
902
  pop((Builder)DATA_PTR(self));
904
903
 
905
904
  return Qnil;
@@ -921,7 +920,12 @@ builder_close(VALUE self) {
921
920
  *
922
921
  * An XML builder.
923
922
  */
924
- void ox_init_builder(VALUE ox) {
923
+ void
924
+ ox_init_builder(VALUE ox) {
925
+ #if 0
926
+ // Just for rdoc.
927
+ ox = rb_define_module("Ox");
928
+ #endif
925
929
  builder_class = rb_define_class_under(ox, "Builder", rb_cObject);
926
930
  rb_define_module_function(builder_class, "new", builder_new, -1);
927
931
  rb_define_module_function(builder_class, "file", builder_file, -1);
data/ext/ox/extconf.rb CHANGED
@@ -38,6 +38,7 @@ have_func('rb_enc_find')
38
38
  have_func('rb_struct_alloc_noinit')
39
39
  have_func('rb_obj_encoding')
40
40
  have_func('rb_ivar_foreach')
41
+ have_func('rb_ext_ractor_safe', 'ruby.h')
41
42
 
42
43
  have_header('ruby/st.h')
43
44
  have_header('sys/uio.h')
data/ext/ox/gen_load.c CHANGED
@@ -116,18 +116,18 @@ create_prolog_doc(PInfo pi, const char *target, Attr attrs) {
116
116
  #endif
117
117
  rb_hash_aset(ah, sym, rb_str_new2(attrs->value));
118
118
  } else {
119
+ #if HAVE_RB_ENC_ASSOCIATE
119
120
  volatile VALUE rstr = rb_str_new2(attrs->name);
120
121
 
121
- #if HAVE_RB_ENC_ASSOCIATE
122
122
  if (0 != pi->options->rb_enc) {
123
123
  rb_enc_associate(rstr, pi->options->rb_enc);
124
124
  }
125
125
  rb_hash_aset(ah, rstr, rb_str_new2(attrs->value));
126
+ #endif
126
127
  }
127
128
  if (0 == strcmp("encoding", attrs->name)) {
128
129
  pi->options->rb_enc = rb_enc_find(attrs->value);
129
130
  }
130
- #endif
131
131
  }
132
132
  nodes = rb_ary_new();
133
133
  rb_ivar_set(doc, ox_attributes_id, ah);
data/ext/ox/ox.c CHANGED
@@ -1395,6 +1395,9 @@ cache8_test(VALUE self) {
1395
1395
  #endif
1396
1396
 
1397
1397
  void Init_ox() {
1398
+ #if HAVE_RB_EXT_RACTOR_SAFE
1399
+ rb_ext_ractor_safe(true);
1400
+ #endif
1398
1401
  Ox = rb_define_module("Ox");
1399
1402
 
1400
1403
  rb_define_module_function(Ox, "default_options", get_def_opts, 0);
data/ext/ox/sax.c CHANGED
@@ -123,6 +123,9 @@ str2sym(SaxDrive dr, const char *str, const char **strp) {
123
123
 
124
124
  void
125
125
  ox_sax_parse(VALUE handler, VALUE io, SaxOptions options) {
126
+ #if HAVE_RB_EXT_RACTOR_SAFE
127
+ rb_ext_ractor_safe(true);
128
+ #endif
126
129
  struct _saxDrive dr;
127
130
  int line = 0;
128
131
 
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.14.2'
4
+ VERSION = '2.14.6'
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.14.2
4
+ version: 2.14.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-07 00:00:00.000000000 Z
11
+ date: 2021-11-03 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\nOptimized
14
14
  XML (Ox), as the name implies was written to provide speed optimized\nXML handling.
@@ -81,9 +81,12 @@ rdoc_options:
81
81
  - "--main"
82
82
  - README.md
83
83
  - "--title"
84
- - Ox Documentation
84
+ - Ox
85
85
  - "--exclude"
86
86
  - extconf.rb
87
+ - lib
88
+ - ext/ox
89
+ - README.md
87
90
  require_paths:
88
91
  - lib
89
92
  - ext
@@ -98,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
101
  - !ruby/object:Gem::Version
99
102
  version: '0'
100
103
  requirements: []
101
- rubygems_version: 3.2.3
104
+ rubygems_version: 3.2.22
102
105
  signing_key:
103
106
  specification_version: 4
104
107
  summary: A fast XML parser and object serializer.