rexle 1.0.34 → 1.0.35
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 +26 -17
- metadata +2 -2
- 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: dda89926370f5a1b5312d4bf4572a73b51756087
|
|
4
|
+
data.tar.gz: b1353620bab763e726578a2c6e7138bf47d8a370
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7e0af2828ca5917c322f699c66093f214eaa09d55db35a107467829b6729735a75b0c07376ce45457413402897b234f6ed9a474db02227d5f021180a16356001
|
|
7
|
+
data.tar.gz: bfadb7996db8c7accf95ca59e65ec05c00d04cd35554baf26ef2c67cb8bd351df3fbff181406ed033842fab5bfeb1e6ef963c6473772b568a913243dcaa33ae9
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
ljۢϷ�8H�g�_��|~d��^�F�� jN�ձ>��
|
|
2
|
+
�9��,$h�am_���S>��1ik+�7��.�0/к��YQ�Ċ>bc�y�2�xpz.��D��Ǎ�g-��0n*�B8�=]Ww�e����U�f��2�l�i�I9�v�P��R�ꂠO�b*��
|
data/lib/rexle.rb
CHANGED
|
@@ -12,6 +12,7 @@ include REXML
|
|
|
12
12
|
|
|
13
13
|
# modifications:
|
|
14
14
|
|
|
15
|
+
# 30-Nov-2014: feature: XPath now supports parent (..) traversal e.g. b/../b2
|
|
15
16
|
# 21-Nov-2014: feature: Added at_css() to select a single element
|
|
16
17
|
# 27-Oct-2014: bug fix: Now Checks for an array instead of a string when
|
|
17
18
|
# outputting xml attribute values to get
|
|
@@ -541,26 +542,34 @@ class Rexle
|
|
|
541
542
|
else
|
|
542
543
|
ename = element_name
|
|
543
544
|
end
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
if selector then
|
|
552
|
-
ne = return_elements.inject([]) do |r,x|
|
|
553
|
-
i = x.last + selector
|
|
554
|
-
if i >= 0 then
|
|
555
|
-
r << i
|
|
556
|
-
else
|
|
557
|
-
r
|
|
558
|
-
end
|
|
545
|
+
|
|
546
|
+
if ename != '..' then
|
|
547
|
+
|
|
548
|
+
return_elements = @child_lookup.map.with_index.select do |x|
|
|
549
|
+
|
|
550
|
+
(x[0][0] == ename || ename == '.') or \
|
|
551
|
+
(ename == '*' && x[0].is_a?(Array))
|
|
559
552
|
end
|
|
553
|
+
|
|
554
|
+
if selector then
|
|
555
|
+
ne = return_elements.inject([]) do |r,x|
|
|
556
|
+
i = x.last + selector
|
|
557
|
+
if i >= 0 then
|
|
558
|
+
r << i
|
|
559
|
+
else
|
|
560
|
+
r
|
|
561
|
+
end
|
|
562
|
+
end
|
|
560
563
|
|
|
561
|
-
|
|
564
|
+
return_elements = ne.map {|x| [@child_lookup[x], x] if x}
|
|
565
|
+
end
|
|
566
|
+
else
|
|
567
|
+
|
|
568
|
+
remaining_xpath = raw_path[/\.\.\/(.*)/,1]
|
|
569
|
+
# select the parent element
|
|
570
|
+
return self.parent.xpath(remaining_xpath)
|
|
571
|
+
|
|
562
572
|
end
|
|
563
|
-
|
|
564
573
|
end
|
|
565
574
|
|
|
566
575
|
|
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.35
|
|
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-11-
|
|
34
|
+
date: 2014-11-30 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: rexleparser
|
metadata.gz.sig
CHANGED
|
Binary file
|