rexle 1.2.12 → 1.2.13
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -1
- data/lib/rexle.rb +10 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a4aceb6bd947cae15225eb68bd34057a7d3beac
|
4
|
+
data.tar.gz: 95b54c1d9c10f42a6c605b4868b0793dc34f39c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49d16ed9730f79d7cc2e5f8e6bf740759d9fe713418a2e998393bc509e744559e760fc9199bd0854c966447880e06f3f2bc50a506fd32a679ab1fce483a29cb4
|
7
|
+
data.tar.gz: ed08f4f6c9e30958d0637da8131c40e07ff1a765b0dc5ff72807f3fc998eef565e703f3608af0f81472325e3d45eadc690af87b1c7c9e106071005a245f943a0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
�
|
1
|
+
�v���J4�\=�BN5��� ��x���Fq�a-x�Y4��u�dp%���*U�a����^����8L_5�
|
2
|
+
&H�G�a�J3#v$��m]yq@^O�j�o��W�)�q�K���Q�B��g�lG�q0����z���>��,��&���4ך�I�&$ )B0&�Wv#_ٟ��s^$zUW�x97�eG����c�l�$����P32��Oq�:�Օ)O�F��wW�pz�t��CQM��X������wbQnF&�����
|
data/lib/rexle.rb
CHANGED
@@ -15,6 +15,7 @@ require 'cgi'
|
|
15
15
|
# from raw_path to workaround a frozen string when slice! is called.
|
16
16
|
# bug fix: A Rexle::Element#value will now only return an
|
17
17
|
# object if the 1st child item is a String
|
18
|
+
# Now stores any comment elements as well as printing them.
|
18
19
|
# 07-Feb-2015: Implemented XPath function last() e.g.
|
19
20
|
# doc.root.xpath('records/item[last()]')
|
20
21
|
# 05-Feb=2015: bug fix:
|
@@ -287,7 +288,6 @@ class Rexle
|
|
287
288
|
|
288
289
|
doc_node = ['doc',{}]
|
289
290
|
|
290
|
-
|
291
291
|
@a = procs[x.class.to_s.to_sym].call(x)
|
292
292
|
@doc = scan_element(*(doc_node << @a))
|
293
293
|
|
@@ -678,7 +678,9 @@ class Rexle
|
|
678
678
|
@child_elements << item
|
679
679
|
|
680
680
|
elsif item.is_a? Rexle::CData then
|
681
|
-
@child_elements << item
|
681
|
+
@child_elements << item
|
682
|
+
elsif item.is_a? Rexle::Comment then
|
683
|
+
@child_elements << item
|
682
684
|
elsif item.is_a? Rexle::Element then
|
683
685
|
|
684
686
|
@child_elements << item
|
@@ -1296,6 +1298,7 @@ class Rexle
|
|
1296
1298
|
def scan_element(name, attributes=nil, *children)
|
1297
1299
|
|
1298
1300
|
return Rexle::CData.new(children.first) if name == '!['
|
1301
|
+
return Rexle::Comment.new(children.first) if name == '!-'
|
1299
1302
|
|
1300
1303
|
element = Rexle::Element.new(name, attributes: attributes, rexle: self)
|
1301
1304
|
|
@@ -1313,6 +1316,11 @@ class Rexle
|
|
1313
1316
|
elsif x.name == '![' then
|
1314
1317
|
|
1315
1318
|
Rexle::CData.new(x)
|
1319
|
+
|
1320
|
+
elsif x.name == '!-' then
|
1321
|
+
|
1322
|
+
Rexle::Comment.new(x)
|
1323
|
+
|
1316
1324
|
end
|
1317
1325
|
|
1318
1326
|
element.add_element e
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|