rexle-xpath-parser 0.1.7 → 0.1.8

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: 32be01a67aa4ef1deb4017d8620ab0c0276295aa
4
- data.tar.gz: 6f21a5ad7d7b69d8d8368ed5ebe354b7a07e3a5b
3
+ metadata.gz: 05ae6b430f9c3dd250dbbec2445472220c081aa0
4
+ data.tar.gz: 37d93ec52237381c1aba8996d62eec3e1189b095
5
5
  SHA512:
6
- metadata.gz: 402ef799560d10bbbe692de8f22b0b46d74849a684f76852de1cf2785591a2e427dfe0f53cf07bd09cc07cec202e65a53ea61900e16cab2ab4c29efe1c69f177
7
- data.tar.gz: e0bc41c31ba3dfa9d2f7f0a4c85e31b3e4561272ce428378bc8a8edbc682ea9afe4078a7b2748c77c2ce4d351bc16a52a1c3e7058978b3c7f1e6188dc3cbbfc0
6
+ metadata.gz: a58b04b0b2cd45cb1ea5e123166bfe31647ecd897e63ad38785681e85ab01c26020cb8fe9b1c2eadaae72126c10fa97220b4a1c69428e47b276882ec06996421
7
+ data.tar.gz: b4ff647647322df252d913cfd4d71dcc17e66ae5c0a686b4146e70fa7f1bbb29aba368342489e30945f2ebb879722cdffb69bb1c61dfc801799949c5c2b7725d
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -26,6 +26,7 @@ class RexleXPathParser
26
26
 
27
27
  a.inject([]) do |r,x|
28
28
 
29
+ #puts 'x: ' + x.inspect
29
30
  if x =~ /^@[\w\/]+/ then
30
31
  r << [[:attribute, x[/@(\w+)/,1]]]
31
32
  elsif x =~ /[\w\/]+\[/
@@ -52,10 +53,13 @@ class RexleXPathParser
52
53
  r << [:index, x[1..-2]]
53
54
  elsif x =~ /^\/\//
54
55
  r << [:recursive, *RexleXPathParser.new(x[2..-1]).to_a]
56
+ elsif x.is_a? Array
57
+ r << functionalise(x)
58
+ elsif /^attribute::(?<attribute>\w+)/ =~ x
59
+ r << [:attribute, attribute]
55
60
  elsif x =~ /[\w\/]+/
56
61
  r << x.split('/').map {|e| [:select, e]}
57
- elsif x.is_a? Array
58
- r << functionalise(x)
62
+
59
63
  end
60
64
 
61
65
  end
@@ -139,7 +143,7 @@ class RexleXPathParser
139
143
  a2
140
144
 
141
145
  else
142
- token = s.slice!(/^[@?\w\/]+/)
146
+ token = s.slice!(/^[@?\w\/:]+/)
143
147
  a << token
144
148
  remainder = s
145
149
  end
@@ -176,4 +180,4 @@ class RexleXPathParser
176
180
  alias tokenise match
177
181
 
178
182
 
179
- 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.7
4
+ version: 0.1.8
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-14 00:00:00.000000000 Z
34
+ date: 2016-05-21 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@r0bertson.co.uk
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- ���WpGjU��uƯXs��j�?E.yD�1�j'�<��Қj��J썎5X6/A}>v3qyw�<��gP]��ZW���/è4Ow�.��)�*��������0[�š�g$H�%���AC䕊�\����~.����Ntt���(��K�۷oq��9m,�a��X�&ڕt ��M��n��٩��
2
- %y�A��w���s�����G\�s�W=χ�H�A��^� ���B�7���)�j��@2���
1
+ C�^�(�K��/��1e[1۫��Xy8E�K�lj7�]�\k؏�'���]4a@3{����;�d����k'Ie�@rM ������c<#�MRp�'J�κ9�L F �"������������|��¦�g`k��./����eǔQ��!������1s�{_8��(�1�P­W�t^Ҋ���Mf=?�v��5��f�Ԁy�S,�Y�/Ew��