rexle-xpath 0.2.11 → 0.2.12
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-xpath.rb +11 -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: 479dc6d4c1f6c7c3270c9966af77acad9efc3654
|
4
|
+
data.tar.gz: b739041bf097a2faf1deb484744ba3a62d6a5615
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4262efd3070eceb1d64dd5ca592f288392862f56ae5c8938418f30b8aedfb064137ec9db8fd2f25df807bc4954c6d1fc63468ced5bdf06f9a7d0fcbb2740544
|
7
|
+
data.tar.gz: f5e6f9a12c7399f4e2e3940ae91e7206b5d4e7172aa5de7f8104f02d56279ee3abdbf050430e79269ad779133276759bbdf883b1d5a2dcb6c5876765c8682b58
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle-xpath.rb
CHANGED
@@ -62,6 +62,8 @@ class RexleXPath
|
|
62
62
|
|
63
63
|
def attribute(node, args, xpath_instructions)
|
64
64
|
|
65
|
+
debug :attribute, node: node, xpath_instructions: xpath_instructions
|
66
|
+
|
65
67
|
key = args.first.to_sym
|
66
68
|
|
67
69
|
attr = node.attributes[key]
|
@@ -108,6 +110,7 @@ class RexleXPath
|
|
108
110
|
xpath_instructions: xpath_instructions
|
109
111
|
|
110
112
|
r = query node, args
|
113
|
+
|
111
114
|
r.is_a?(Array) ? r.any? : r
|
112
115
|
|
113
116
|
end
|
@@ -128,6 +131,9 @@ class RexleXPath
|
|
128
131
|
|
129
132
|
def select(node, args, xpath_instructions)
|
130
133
|
|
134
|
+
debug :select, node: node, args: args,
|
135
|
+
xpath_instructions: xpath_instructions
|
136
|
+
|
131
137
|
a = node.elements.select {|x| x.name == args.first }
|
132
138
|
flat_xpi = xpath_instructions.flatten
|
133
139
|
|
@@ -155,10 +161,12 @@ class RexleXPath
|
|
155
161
|
predicate ? r << child_node : r << true
|
156
162
|
when :FalseClass
|
157
163
|
!predicate ? r << false : r
|
164
|
+
when :'Rexle::Element::Attribute'
|
165
|
+
r << child_node
|
166
|
+
when :NilClass
|
167
|
+
r
|
158
168
|
else
|
159
|
-
|
160
|
-
r2.any? ? r << r2 : r
|
161
|
-
|
169
|
+
r2.any? ? r << r2 : r
|
162
170
|
end # /case
|
163
171
|
|
164
172
|
end # /inject
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexle-xpath
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
05Hvy/ad61XnzWtun98claEIk/rC/TxPrbRaOd7vN99WxTy1xn8ElfLSx7CDDrTc
|
32
32
|
qN5t1BlRcAgKNw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-05-
|
34
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rexle-xpath-parser
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
db��XT�b<��Z�Z��s��,�WO4
|
2
|
+
c;؏�e��2��T�D�Ôl�i��P��aO���h�D&��$���O�W����ʟNW�-)��9)l�+�d0�x�1l��We�Su`K��f:qۆ��u���X��+A��l�)�M��ў�
|
3
|
+
�Ƕ�D��~�n��"��h�J�4��M_��d�����k���
|