rexle 1.3.8 → 1.3.9
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 +0 -0
- data/lib/rexle.rb +13 -4
- metadata +2 -2
- metadata.gz.sig +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e887ca995f85512cd44dfb3803f2cd94a354470
|
4
|
+
data.tar.gz: e6156c54b67174055fccd6a519dbfb82bd0eec5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df2c07a7f7b698dc7f1f33f2dffbae3dcf635f5ccb7ab3910f4e7daf656dbe67af1c7f3fb59914d71a82a9181d4de109aee5f722840977928614ac1c10182fd5
|
7
|
+
data.tar.gz: cfc04148dafb882bf53ee785a542360f32850475819fb77ff947b7306cb39c95e4695cdf963035a06feea3406cdc21f1d04f97735b032dc6211ecf61ece7c457
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -12,6 +12,8 @@ require 'backtrack-xpath'
|
|
12
12
|
|
13
13
|
# modifications:
|
14
14
|
|
15
|
+
# 05-Nov-2015: bug fix: UTF-8 encoding is now enforced when
|
16
|
+
# preparing the XML for output
|
15
17
|
# 15-Sep-2015: improvement: When handling the HTML element textarea, it
|
16
18
|
# is no longer printed as a self-closing tag
|
17
19
|
# 25-May-2015: bug fix: If a Polyrex XML string is being parsed then the
|
@@ -164,7 +166,8 @@ module XMLhelper
|
|
164
166
|
def doc_print(children, declaration=true)
|
165
167
|
|
166
168
|
body = (children.nil? or children.empty? \
|
167
|
-
or children.is_an_empty_string? ) ? '' :
|
169
|
+
or children.is_an_empty_string? ) ? '' : \
|
170
|
+
scan_print(children).join.force_encoding("utf-8")
|
168
171
|
|
169
172
|
a = self.root.attributes.to_a.map do |k,v|
|
170
173
|
"%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v.to_s)]
|
@@ -211,9 +214,9 @@ module XMLhelper
|
|
211
214
|
|
212
215
|
def scan_print(nodes)
|
213
216
|
|
214
|
-
nodes.map do |x|
|
215
|
-
|
216
|
-
if x.is_a? Rexle::Element then
|
217
|
+
r2 = nodes.map do |x|
|
218
|
+
|
219
|
+
r = if x.is_a? Rexle::Element then
|
217
220
|
|
218
221
|
a = x.attributes.to_a.map do |k,v|
|
219
222
|
"%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v)]
|
@@ -227,6 +230,7 @@ module XMLhelper
|
|
227
230
|
|
228
231
|
out = ["<%s>" % tag]
|
229
232
|
out << scan_print(x.children)
|
233
|
+
|
230
234
|
out << "</%s>" % x.name
|
231
235
|
else
|
232
236
|
out = ["<%s/>" % tag]
|
@@ -237,7 +241,11 @@ module XMLhelper
|
|
237
241
|
elsif x.is_a? Rexle::Comment then x.print
|
238
242
|
|
239
243
|
end
|
244
|
+
|
245
|
+
r
|
240
246
|
end
|
247
|
+
|
248
|
+
r2
|
241
249
|
|
242
250
|
end
|
243
251
|
|
@@ -1018,6 +1026,7 @@ class Rexle
|
|
1018
1026
|
end
|
1019
1027
|
|
1020
1028
|
def xml(options={})
|
1029
|
+
|
1021
1030
|
h = {
|
1022
1031
|
Hash: lambda {|x|
|
1023
1032
|
o = {pretty: false}.merge(x)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
Tkua07gB3/nVO3aPg7C3vEbDZCxT3WAMli2uZisYT6ozmdAlDsixLjipgFN4If3z
|
32
32
|
Ej0QR3kvGcAvFQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-
|
34
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexleparser
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�{�O�a�T���)�A@,���;��+
|
2
|
+
���֨nx+ZIW�������D�%U͈!�/w��Fc�ƽ�<[`�����"4Q�Kc��o,����ۻ5��t�$1ʛnv��*�d���tj�V���$��:^��~�H��J0�qYH��7$���hߵ�[�fh���P��1�=�n����D�˅�����dR�Ȫ�
|
3
|
+
��3/��S������+�2>�X
|