rexle 1.5.6 → 1.5.11
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 +18 -3
- metadata +34 -33
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc1ce190fc92b2ffac2b01b9e8ad9be1e8b135ba96336b6b694fb68f819bb03b
|
4
|
+
data.tar.gz: 1b045de95ba0ed3d8087d5e87a175e57fc9ae9438e155ebe39c269c78d4f5e84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0b2f46ec5952957cf74618f844f4b63453429078dbe58fe2f051785b2aea25f5e480604368014f8f364db6e00c731b72eda69afd10896b11f8d32ff6930d83c
|
7
|
+
data.tar.gz: 23413dda0d64adc251a64373b90f4040c147a8ff5eaf9936bdcbfeecbe1e26e9bbacb00ebdb1152a72639783e6e3a873ffc12db5ab974b1d9db553c2badea83b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -13,6 +13,10 @@ require 'backtrack-xpath'
|
|
13
13
|
|
14
14
|
# modifications:
|
15
15
|
|
16
|
+
# 03-Apr-2021: bug fix: Using *to_a* a CDATA element if present is now output
|
17
|
+
# 20-Feb-2021: bug fix: The @instructions accessor is now ignored if nil.
|
18
|
+
# 11-Sep-2020: feature: Rexle::Element#text now has unescaped HTML using CGI
|
19
|
+
# 30-Jul-2020: minor improvement: #plaintext now unescapes & to &
|
16
20
|
# 11-May-2020: bug fix: Rexle#css now responds correctly to valid selectors
|
17
21
|
# 23-Apr-2020: feature: Added public method *plaintext*.
|
18
22
|
# 04-Feb-2020: minor bug fix: Element A is now defined as a non self-closing tag
|
@@ -136,7 +140,11 @@ module XMLhelper
|
|
136
140
|
|
137
141
|
if x.is_a? Rexle::Element then
|
138
142
|
|
139
|
-
a = [String.new(x.name), Hash.new(x.attributes), x.value.to_s]
|
143
|
+
a = [String.new(x.name), Hash.new(x.attributes), x.value.to_s]
|
144
|
+
|
145
|
+
if x.cdatas.any? then
|
146
|
+
a.concat x.cdatas.map {|cdata| ['![', {}, cdata] }
|
147
|
+
end
|
140
148
|
|
141
149
|
(a.concat(scan_to_a(x.children))) if x.children.length > 1
|
142
150
|
r << a
|
@@ -1002,7 +1010,8 @@ class Rexle
|
|
1002
1010
|
def map(&blk) self.children.map(&blk) end
|
1003
1011
|
|
1004
1012
|
def plaintext()
|
1005
|
-
xml().gsub(/<\/?[^>]+>/,'').gsub(' ',' ')
|
1013
|
+
CGI.unescapeHTML xml().gsub(/<\/?[^>]+>/,'').gsub(' ',' ')\
|
1014
|
+
.gsub(/\n\s+/,' ')
|
1006
1015
|
end
|
1007
1016
|
|
1008
1017
|
def root() self end
|
@@ -1063,7 +1072,13 @@ class Rexle
|
|
1063
1072
|
alias text= value=
|
1064
1073
|
|
1065
1074
|
def to_a()
|
1075
|
+
|
1066
1076
|
e = [String.new(self.name), Hash.new(self.attributes)]
|
1077
|
+
|
1078
|
+
if self.cdatas.any? then
|
1079
|
+
e.concat self.cdatas.map {|cdata| ['![', {}, cdata] }
|
1080
|
+
end
|
1081
|
+
|
1067
1082
|
[*e, *scan_to_a(self.children)]
|
1068
1083
|
end
|
1069
1084
|
|
@@ -1485,7 +1500,7 @@ class Rexle
|
|
1485
1500
|
|
1486
1501
|
if o[:declaration] == true then
|
1487
1502
|
|
1488
|
-
unless @instructions.assoc 'xml' then
|
1503
|
+
unless @instructions and @instructions.assoc 'xml' then
|
1489
1504
|
@instructions.unshift ["xml","version='1.0' encoding='UTF-8'"]
|
1490
1505
|
end
|
1491
1506
|
end
|
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.
|
4
|
+
version: 1.5.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -11,31 +11,31 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjEwMjIwMjIzMjI1WhcN
|
15
|
+
MjIwMjIwMjIzMjI1WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDhagZR
|
17
|
+
4bMEv+DQCdwGY0bUNMOfHnsWtzSFTvD8RS6784DOta+qaUVRanPlw0KnPKhwNiKp
|
18
|
+
nDvwK8pNIc7/Mv1F/RcJWpzbC+ZwBUXAQOdHnfc4gVq5bGkyjecdEWhrExcLnnMm
|
19
|
+
nPovWxxRlfRzMYyrhCyWYphTSYPKYppTmF35jvpZk3HUXcTSgBi8m+ofJGePonHU
|
20
|
+
4iMLfY751Jem7eOWTWoM0hfxcZ30zU5ouM2t/AQi7oRTDVlYw6IPH6IqSOOurAeg
|
21
|
+
lRJDCFIVZbBtUnhCsof6V6kScqxgHo9pdZl5M03xBksvktVszVHhNxdO8CNgTYgY
|
22
|
+
r9dLSmQsdKh1Q8lIjqPzsjxo0m1WnzX5j5TAvhzToiMQOzTntxHFAt8ZTeEtAqhp
|
23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
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2021-04-03 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: c32
|
@@ -81,22 +81,22 @@ dependencies:
|
|
81
81
|
name: rexle-builder
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 0.6.0
|
87
84
|
- - "~>"
|
88
85
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0
|
86
|
+
version: '1.0'
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.0.2
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 0.6.0
|
97
94
|
- - "~>"
|
98
95
|
- !ruby/object:Gem::Version
|
99
|
-
version: '0
|
96
|
+
version: '1.0'
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 1.0.2
|
100
100
|
- !ruby/object:Gem::Dependency
|
101
101
|
name: rexle-css
|
102
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +163,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
|
-
|
166
|
+
rubyforge_project:
|
167
|
+
rubygems_version: 2.7.10
|
167
168
|
signing_key:
|
168
169
|
specification_version: 4
|
169
170
|
summary: Rexle is an XML parser written purely in Ruby
|
metadata.gz.sig
CHANGED
Binary file
|