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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 335077b548fb02bef368e0609669aa760d2df42d
4
- data.tar.gz: 3a8fbcf981c09182d21d90b455001fab671ca72c
3
+ metadata.gz: 0db466429d95d0cf12789e04b3164973288b90da
4
+ data.tar.gz: 526c10f5d24d275b7567e291455bc19d41ab569c
5
5
  SHA512:
6
- metadata.gz: 5eb47baf986d852a3c30ad07e0fb7f4f71ccf1a01c18f4e375e16b4293eeb33c3a2b9ed842532bca5c50c6d494870e34712365434f8914ffda52d684074fe5af
7
- data.tar.gz: 958a65b8c6880a62b6da61259f82d034b1032638a3caa976296956bf0b11e0585b881aa147c48a2fdddaad8e9104c9d9d3fc814f77a5300716b8c691fcc1a9a8
6
+ metadata.gz: 417e4876e41c02a27d78a818ca6557dd8ed3d806700d96c11d996fc38bdec6812d4572b26f214163bcaef70a1c86d792291e160fee12f796845c5b2c429df8ca
7
+ data.tar.gz: 7ab7635ba885d2ba9fe9096d10fe1790944e7da6d0cb6c9b5bd92d9d026427e6f9fe91646d8c468086cd5b182ee0c38b0e54b3e5007db4b86817ec49aa7251aa
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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.10
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-23 00:00:00.000000000 Z
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