spaceborne 0.1.39 → 0.1.40
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
 - data/lib/spaceborne/version.rb +1 -1
 - data/lib/spaceborne.rb +5 -8
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c11204f7139c5e5507dfae5c022cfbacaa4f09d9311b85c3e32824497b5e0828
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 785da01072d57bb89c32fc9c021c42a0b188c1f2a188843b5c86e011a1bbac69
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: '090ba089dd166f14cd0dc259fc9887982493e4e433beafd12bb0e645e6fa2deaaade5d183868463e5325ab926508dd799e42bed866cc337004a0f196f2a8b87e'
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a537d9b3bc27c998931ed409481f39cea26c2efcda803d5556848dc8f8fcca8559628ef03223b02db214cc17970794c3f6f6c0469187af91933f4ccdffc7f7a1
         
     | 
    
        data/lib/spaceborne/version.rb
    CHANGED
    
    
    
        data/lib/spaceborne.rb
    CHANGED
    
    | 
         @@ -246,7 +246,7 @@ module Airborne 
     | 
|
| 
       246 
246 
     | 
    
         
             
                end
         
     | 
| 
       247 
247 
     | 
    
         | 
| 
       248 
248 
     | 
    
         
             
                def handle_type(type, path, json, &block)
         
     | 
| 
       249 
     | 
    
         
            -
                  case type
         
     | 
| 
      
 249 
     | 
    
         
            +
                  case type.to_s
         
     | 
| 
       250 
250 
     | 
    
         
             
                  when '*'
         
     | 
| 
       251 
251 
     | 
    
         
             
                    handle_container(json, &block)
         
     | 
| 
       252 
252 
     | 
    
         
             
                  when '?'
         
     | 
| 
         @@ -275,19 +275,16 @@ module Airborne 
     | 
|
| 
       275 
275 
     | 
    
         
             
                end
         
     | 
| 
       276 
276 
     | 
    
         | 
| 
       277 
277 
     | 
    
         
             
                def shortcut_validation(path, json)
         
     | 
| 
       278 
     | 
    
         
            -
                   
     | 
| 
       279 
     | 
    
         
            -
             
     | 
| 
       280 
     | 
    
         
            -
                  ensure_array_or_hash(path, json)
         
     | 
| 
       281 
     | 
    
         
            -
                  false
         
     | 
| 
      
 278 
     | 
    
         
            +
                  json.nil? && path.is_a?(Airborne::OptionalPathExpectations)
         
     | 
| 
       282 
279 
     | 
    
         
             
                end
         
     | 
| 
       283 
280 
     | 
    
         | 
| 
       284 
281 
     | 
    
         
             
                def get_by_path(path, json, type: false, &block)
         
     | 
| 
       285 
282 
     | 
    
         
             
                  iterate_path(path) do |parts, part, index|
         
     | 
| 
       286 
     | 
    
         
            -
                    if  
     | 
| 
       287 
     | 
    
         
            -
                      return if shortcut_validation(path, json)
         
     | 
| 
      
 283 
     | 
    
         
            +
                    return if shortcut_validation(path, json)
         
     | 
| 
       288 
284 
     | 
    
         | 
| 
      
 285 
     | 
    
         
            +
                    if %w[* ?].include?(part.to_s)
         
     | 
| 
       289 
286 
     | 
    
         
             
                      type = part
         
     | 
| 
       290 
     | 
    
         
            -
                      walk_with_path(type, index, path, parts, json, &block) && return if index < parts.length.pred
         
     | 
| 
      
 287 
     | 
    
         
            +
                      walk_with_path(type.to_s, index, path, parts, json, &block) && return if index < parts.length.pred
         
     | 
| 
       291 
288 
     | 
    
         | 
| 
       292 
289 
     | 
    
         
             
                      next
         
     | 
| 
       293 
290 
     | 
    
         
             
                    end
         
     |