rexle 1.0.36 → 1.0.37
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 +10 -3
- 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: d16279a81b765893864448fdd7eea0d9e1e3294f
|
4
|
+
data.tar.gz: a81d96de8211008d44be417a37d4b8b6a416e688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b389e4a0c3886fb6a2fa49fdaf0c5be30a109a6d100672185404625a192b1a92cb12bff5a2fc4c71da694522530df7fd181dbfc85a7882bcb1bdc621c7bd55eb
|
7
|
+
data.tar.gz: c1ce9a1a1d17e0b00616c40ca861fabb69e5d1556d8c09b6f8e18e6a0c959f015e42f1520d35e903023a86dac1966a78e004a6c558a1054611478a327b4ee3fc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -12,7 +12,9 @@ include REXML
|
|
12
12
|
|
13
13
|
# modifications:
|
14
14
|
|
15
|
-
#
|
15
|
+
# 20-Dec-2014: bug fix: Fixes an uncommon XPath selection.
|
16
|
+
# see http://www.jamesrobertson.eu/bugtracker/2014/dec/18/xpath-returns-an-empty-list.html
|
17
|
+
# 07-Dec-2014: feature: The Rexle::Element#Css() parameter can now contain
|
16
18
|
# multiple css paths within the string e.g. '.abc, div'
|
17
19
|
# 30-Nov-2014: feature: XPath now supports parent (..) traversal e.g. b/../b2
|
18
20
|
# 21-Nov-2014: feature: Added at_css() to select a single element
|
@@ -899,8 +901,12 @@ class Rexle
|
|
899
901
|
if x[0] != '.' then
|
900
902
|
if x[0][/\//] then
|
901
903
|
path, value = x.values_at(0,-1)
|
902
|
-
|
903
|
-
|
904
|
+
|
905
|
+
if x[0][/@\w+$/] then
|
906
|
+
"r = e.xpath('#{path}').first; r and r == #{value}"
|
907
|
+
else
|
908
|
+
"r = e.xpath('#{path}').first; r and r.value == #{value}"
|
909
|
+
end
|
904
910
|
else
|
905
911
|
"(name == '%s' and value %s '%s')" % [x[0], x[1], x[2].sub(/^['"](.*)['"]$/,'\1')]
|
906
912
|
end
|
@@ -986,6 +992,7 @@ class Rexle
|
|
986
992
|
elsif attr_search[/^\(name ==/] and eval(attr_search)
|
987
993
|
block_given? ? blk.call(e) : e
|
988
994
|
elsif attr_search[/^e\.value/]
|
995
|
+
|
989
996
|
v = attr_search[/[^\s]+$/]
|
990
997
|
duck_type = %w(to_f to_i to_s).detect {|x| v == v.send(x).to_s}
|
991
998
|
attr_search.sub!(/^e.value/,'e.value.' + duck_type)
|
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.37
|
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-12-
|
34
|
+
date: 2014-12-20 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~�I���qȨ#���>���"|���WR�������M���cz2���?�U�U?#��bP��d�tN�Åw_�N��T�W�>�u��-<'���5�8>�E�SZ:�
|
2
|
+
�;�n�5uy͜d��R��W���~m�J
|
3
|
+
�4�����B��ƍ�C*��j8�g����-��c�m���L���碵R�w�+�O�B����[��
|