rexle 1.5.12 → 1.5.13

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: 06e39f8b08e944071762283dd143fb2673f39933a584a5db87a8fa43d7a5dbd0
4
- data.tar.gz: 8ce20d246e987cd88e00d93493c20f77e48def3ab02c213ce94ca9531db7e9a2
3
+ metadata.gz: 0b829c424d1e5626891a39c267d7b9450f052383fb01de5e796ea71f34c3eaaa
4
+ data.tar.gz: b4939b5e6db8f3dcbcb2c8238be7f24b639152d942bbb2800d19eb86d3afa664
5
5
  SHA512:
6
- metadata.gz: 3da81cea7e2b70cc4c1e024789ba97f768a07710ee27ad4039fbc4e1513c28facc6f9b1b115447e528220978eb091804c716c385d1bbbd7213436b90f55b385f
7
- data.tar.gz: d7928ad7059d4cbe5e86234e5a3a59c57fe1173ddf4fdc5c5ae39f8a27bcdf49aaf0376e180d32ef753de3ffc928bbd417a6b27d8618e92116b42cadae811d8e
6
+ metadata.gz: 552587ca95483bafdd4ff334b6e6aa4f323ed7ec72862992b8c33e3fb72d0dc12d688d15dc4b3c656abecaa5b454ec7381680c77c9c405d1abe7e29c3a7f3df9
7
+ data.tar.gz: af9f8aab4d34c60fc4999cf3c698ba1d003b1a8ebb35956fa6715a86a1a118e5a561b3bbf8263a155c1dd29b0c4a52da46b871e79d4acda3faffceb4fee7f03e
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rexle.rb CHANGED
@@ -13,6 +13,8 @@ require 'backtrack-xpath'
13
13
 
14
14
  # modifications:
15
15
 
16
+ # 14-Jan-2022: bug fix: Related to previous bug fix; Unescape is
17
+ # now only applied to objects of type Attributes::Value
16
18
  # 01-Jan-2022: bug fix: Attribute values are no longer unescaped when
17
19
  # called from Rexle#xml
18
20
  # 03-Apr-2021: bug fix: Using *to_a* a CDATA element if present is now output
@@ -55,7 +57,14 @@ module XMLhelper
55
57
  scan_print(children).join.force_encoding("utf-8")
56
58
 
57
59
  a = self.root.attributes.to_a.map do |k,v|
58
- "%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v.to_s(unescape: false))]
60
+
61
+ val = if v.is_a?(Array) then
62
+ v.join(' ')
63
+ else
64
+ v.is_a?(String) ? v : v.to_s(unescape: false)
65
+ end
66
+
67
+ "%s='%s'" % [k, val]
59
68
  end
60
69
 
61
70
  xml = "<%s%s>%s</%s>" % [self.root.name, a.empty? ? '' : \
@@ -73,7 +82,7 @@ module XMLhelper
73
82
  body = pretty_print(children,2).join
74
83
 
75
84
  a = self.root.attributes.to_a.map do |k,v|
76
- "%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v.to_s(unescape: false))]
85
+ "%s='%s'" % [k,(v.is_a?(Array) ? v.join(' ') : v.to_s)]
77
86
  end
78
87
 
79
88
  ind = "\n "
data.tar.gz.sig CHANGED
Binary file
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.5.12
4
+ version: 1.5.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  7GC2GlG9BZ9Re4sfu0pwhOe4qFiGyJciH9BWM8DpSRJPbEmLeoNUdU23JgQPhhkO
36
36
  Kiffp9M4EsB/3/3SNM/RVklK
37
37
  -----END CERTIFICATE-----
38
- date: 2022-01-01 00:00:00.000000000 Z
38
+ date: 2022-01-14 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: c32
metadata.gz.sig CHANGED
Binary file