rexle 1.0.32 → 1.0.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rexle.rb +12 -6
- metadata +2 -2
- metadata.gz.sig +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b34d90b45309e692b90eb0a19185435a12975608
|
4
|
+
data.tar.gz: f815c26ac2c68b40cfe29819dd18d1e870618918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64a7659850b524e95275eef9a13d810e9c116593d6f6597b16d764026fd55c72a20ac73c23de46745645d3ebce439a10bdca97619433b68c2d00ccbbba40f382
|
7
|
+
data.tar.gz: 06a93ae6ac55e88a51c86e4f37612bac1e8576651ea4b2e411521e93c5de5d8068ee3bfddee0fbdd04468a2c02ab270e269c1a28637d21859377e85b06ac811c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -12,6 +12,9 @@ include REXML
|
|
12
12
|
|
13
13
|
# modifications:
|
14
14
|
|
15
|
+
# 27-Oct-2014: bug fix: Now Checks for an array instead of a string when
|
16
|
+
# outputting xml attribute values to get
|
17
|
+
# around nil values
|
15
18
|
# 26-Oct-2014: bug fix: XML output containing a class attribute,
|
16
19
|
# now appears as a string. Empty nodes are
|
17
20
|
# now displayed as self-closing tags.
|
@@ -100,12 +103,14 @@ module XMLhelper
|
|
100
103
|
def doc_print(children, declaration=true)
|
101
104
|
|
102
105
|
body = (children.nil? or children.empty? or children.is_an_empty_string? ) ? '' : scan_print(children).join
|
103
|
-
|
104
|
-
|
106
|
+
|
107
|
+
a = self.root.attributes.to_a.map do |k,v|
|
108
|
+
"%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v)]
|
105
109
|
end
|
110
|
+
|
106
111
|
xml = "<%s%s>%s</%s>" % [self.root.name, a.empty? ? '' : \
|
107
112
|
' ' + a.join(' '), body, self.root.name]
|
108
|
-
|
113
|
+
|
109
114
|
if self.instructions and declaration then
|
110
115
|
processing_instructions() + xml
|
111
116
|
else
|
@@ -118,7 +123,7 @@ module XMLhelper
|
|
118
123
|
body = pretty_print(children,2).join
|
119
124
|
|
120
125
|
a = self.root.attributes.to_a.map do |k,v|
|
121
|
-
"%s='%s'" % [k,(v.is_a?(
|
126
|
+
"%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v)]
|
122
127
|
end
|
123
128
|
|
124
129
|
ind = "\n "
|
@@ -151,8 +156,9 @@ module XMLhelper
|
|
151
156
|
else
|
152
157
|
|
153
158
|
a = x.attributes.to_a.map do |k,v|
|
154
|
-
"%s='%s'" % [k,(v.is_a?(
|
159
|
+
"%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v)]
|
155
160
|
end
|
161
|
+
|
156
162
|
tag = x.name + (a.empty? ? '' : ' ' + a.join(' '))
|
157
163
|
|
158
164
|
if (x.value and x.value.length > 0) \
|
@@ -211,7 +217,7 @@ module XMLhelper
|
|
211
217
|
else
|
212
218
|
#return ["<%s/>" % x.name] if x.value = ''
|
213
219
|
a = x.attributes.to_a.map do |k,v|
|
214
|
-
"%s='%s'" % [k,(v.is_a?(
|
220
|
+
"%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v)]
|
215
221
|
end
|
216
222
|
a ||= []
|
217
223
|
tag = x.name + (a.empty? ? '' : ' ' + a.join(' '))
|
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.0.
|
4
|
+
version: 1.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
UOGKUMV5RApHDnC0ywMYNe0HK7qMSTP5YLKs8JUjNxpc5jl8+o3D3sHkNN4DzbQm
|
32
32
|
jVfzDZ+niKvAUA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-10-
|
34
|
+
date: 2014-10-27 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,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
����m�Z���z�Ɗ O�P�t%GpxU��la_�'���1�����#���`B'�0�իuw���D�5w
|
2
|
+
ʶ��O�0S.jռ����}�ܠ�.ZW@nA�p=;�u��p�R�CY���N��x����j��.p�wrG��P,q512�ᘱ�>��c��S�!�7y��w��?P�;���{�^@�I��N��` ��D�H��O���z�"��uaih��s�րڈ�����[�֥�75��ä���ױ�
|