rexle-xpath-parser 0.1.10 → 0.1.11
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-parser.rb +4 -4
- 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: 0db466429d95d0cf12789e04b3164973288b90da
|
4
|
+
data.tar.gz: 526c10f5d24d275b7567e291455bc19d41ab569c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 417e4876e41c02a27d78a818ca6557dd8ed3d806700d96c11d996fc38bdec6812d4572b26f214163bcaef70a1c86d792291e160fee12f796845c5b2c429df8ca
|
7
|
+
data.tar.gz: 7ab7635ba885d2ba9fe9096d10fe1790944e7da6d0cb6c9b5bd92d9d026427e6f9fe91646d8c468086cd5b182ee0c38b0e54b3e5007db4b86817ec49aa7251aa
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle-xpath-parser.rb
CHANGED
@@ -27,8 +27,11 @@ class RexleXPathParser
|
|
27
27
|
a.inject([]) do |r,x|
|
28
28
|
|
29
29
|
#puts 'x: ' + x.inspect
|
30
|
+
|
30
31
|
if x =~ /^@[\w\/]+/ then
|
31
32
|
r << [[:attribute, x[/@(\w+)/,1]]]
|
33
|
+
elsif x =~ /^\/\//
|
34
|
+
r << [:recursive, *RexleXPathParser.new(x[2..-1]).to_a]
|
32
35
|
elsif x =~ /[\w\/]+\[/
|
33
36
|
|
34
37
|
epath, predicate, remainder = x.match(/^([^\[]+)\[([^\]]+)\](.*)/).captures
|
@@ -51,15 +54,12 @@ class RexleXPathParser
|
|
51
54
|
r << [x.chop.to_sym]
|
52
55
|
elsif x =~ /\d+/
|
53
56
|
r << [:index, x]
|
54
|
-
elsif x =~ /^\/\//
|
55
|
-
r << [:recursive, *RexleXPathParser.new(x[2..-1]).to_a]
|
56
57
|
elsif x.is_a? Array
|
57
58
|
r << functionalise(x)
|
58
59
|
elsif /^attribute::(?<attribute>\w+)/ =~ x
|
59
60
|
r << [:attribute, attribute]
|
60
61
|
elsif x =~ /[\w\/]+/
|
61
62
|
r << x.split('/').map {|e| [:select, e]}
|
62
|
-
|
63
63
|
end
|
64
64
|
|
65
65
|
end
|
@@ -180,4 +180,4 @@ class RexleXPathParser
|
|
180
180
|
alias tokenise match
|
181
181
|
|
182
182
|
|
183
|
-
end
|
183
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rexle-xpath-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
adFNS7+S3VVpQqBQ7hIMoNW5ldGHINll6Z0dbjsCO8OFGOkrnzt9ovLffOXuQHpT
|
32
32
|
Gpk2If0KQMuV2Q==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-05-
|
34
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
35
35
|
dependencies: []
|
36
36
|
description:
|
37
37
|
email: james@r0bertson.co.uk
|
metadata.gz.sig
CHANGED
Binary file
|