rackr 0.0.59 → 0.0.60
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/rackr/router.rb +15 -7
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 56bb48ce2a38e77c44d84d7ee7537b144bff11293a6162750d497a392d5a2d6d
         | 
| 4 | 
            +
              data.tar.gz: 1698e4e88202736612dfcb27d974f414eaf6dbafd62c40433fd33472b638e53e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 68e05e6048d84a6fdf937d6950f15b2d19d9a510e79aaa4a2bb6e375a19fd6b16788172b66e2b3752293eca89218600b319dfd146657e40fd893a619ba7a6083
         | 
| 7 | 
            +
              data.tar.gz: 2d2cb75c23f21f1d317496e6cf066c74e20f7d13cdf199f754571ba03e77fcd5a72bf253f798fa1dd24a1c434614e8b790652bad8f53591fc374d5043ebfbdbf
         | 
    
        data/lib/rackr/router.rb
    CHANGED
    
    | @@ -200,6 +200,12 @@ class Rackr | |
| 200 200 | 
             
                end
         | 
| 201 201 |  | 
| 202 202 | 
             
                def match_route(request_method)
         | 
| 203 | 
            +
                  find_instance_in_scope = proc do |request_method, found_scopes|
         | 
| 204 | 
            +
                    @instance_routes[request_method].dig(
         | 
| 205 | 
            +
                      *(found_scopes + [:__instances])
         | 
| 206 | 
            +
                    )&.detect { |route_instance| route_instance.match?(@current_request_path_info) }
         | 
| 207 | 
            +
                  end
         | 
| 208 | 
            +
             | 
| 203 209 | 
             
                  last_tail = @splitted_request_path_info.drop(1)
         | 
| 204 210 | 
             
                  found_scopes = []
         | 
| 205 211 |  | 
| @@ -217,10 +223,7 @@ class Rackr | |
| 217 223 | 
             
                        instance_routes = @instance_routes[request_method].dig(*found_scopes)
         | 
| 218 224 | 
             
                        break
         | 
| 219 225 | 
             
                      elsif scope.start_with?(':')
         | 
| 220 | 
            -
                        found_route =  | 
| 221 | 
            -
                          *(found_scopes + [:__instances])
         | 
| 222 | 
            -
                        )&.detect { |route_instance| route_instance.match?(@current_request_path_info) }
         | 
| 223 | 
            -
             | 
| 226 | 
            +
                        found_route = find_instance_in_scope.(request_method, found_scopes)
         | 
| 224 227 | 
             
                        return found_route if found_route
         | 
| 225 228 |  | 
| 226 229 | 
             
                        found_scopes << scope
         | 
| @@ -230,9 +233,14 @@ class Rackr | |
| 230 233 | 
             
                    end
         | 
| 231 234 | 
             
                  end
         | 
| 232 235 |  | 
| 233 | 
            -
                   | 
| 234 | 
            -
             | 
| 235 | 
            -
                   | 
| 236 | 
            +
                  result_route = find_instance_in_scope.(request_method, found_scopes)
         | 
| 237 | 
            +
             | 
| 238 | 
            +
                  if result_route == nil && !found_scopes.empty?
         | 
| 239 | 
            +
                    found_scopes.shift
         | 
| 240 | 
            +
                    result_route = find_instance_in_scope.(request_method, found_scopes)
         | 
| 241 | 
            +
                  end
         | 
| 242 | 
            +
             | 
| 243 | 
            +
                  result_route
         | 
| 236 244 | 
             
                end
         | 
| 237 245 | 
             
              end
         | 
| 238 246 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: rackr
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.60
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Henrique F. Teixeira
         | 
| 8 8 | 
             
            bindir: bin
         | 
| 9 9 | 
             
            cert_chain: []
         | 
| 10 | 
            -
            date: 2025- | 
| 10 | 
            +
            date: 2025-10-11 00:00:00.000000000 Z
         | 
| 11 11 | 
             
            dependencies:
         | 
| 12 12 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 13 13 | 
             
              name: erubi
         |