rexle-xpath-parser 0.1.7 → 0.1.8
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-xpath-parser.rb +8 -4
 - metadata +2 -2
 - metadata.gz.sig +1 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 05ae6b430f9c3dd250dbbec2445472220c081aa0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 37d93ec52237381c1aba8996d62eec3e1189b095
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: a58b04b0b2cd45cb1ea5e123166bfe31647ecd897e63ad38785681e85ab01c26020cb8fe9b1c2eadaae72126c10fa97220b4a1c69428e47b276882ec06996421
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b4ff647647322df252d913cfd4d71dcc17e66ae5c0a686b4146e70fa7f1bbb29aba368342489e30945f2ebb879722cdffb69bb1c61dfc801799949c5c2b7725d
         
     | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        data.tar.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/rexle-xpath-parser.rb
    CHANGED
    
    | 
         @@ -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 
     | 
    
         
            -
             
     | 
| 
       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. 
     | 
| 
      
 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- 
     | 
| 
      
 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 
     | 
    
         
            -
             
     | 
| 
       2 
     | 
    
         
            -
            %y�A��w���s�����G\�s�W=χ�H�A��^����B�7���)�j��@2���
         
     | 
| 
      
 1 
     | 
    
         
            +
            C�^�(�K��/��1e[1۫��X�y8E�K�lj7�]�\k؏�'���]4�a@3{����;�d����k�'�I�e�@rM������c<#�MR�p�'J�κ9�LF�"������������|��¦�g`k��./����eǔQ��!������1�s�{_8��(�1�PW�t^Ҋ���Mf=?�v��5��f�Ԁy�S,�Y�/Ew��
         
     |