Please sign in to comment.
Merge branch 'constraints'
* constraints: rm reset_parameters because we automatically do it from 9ca4839 move path_parameter encoding check to the request object dispatcher doesn't need `call` anymore call `serve` with the request on dispatchers constraints class does not need the request class anymore give all endpoints a superclass skip the build business if the stack is empty stop hardcoding path_parameters and get it from the request we do not need to cache rack_app a redirect is not a dispatcher by definition, so eliminate test push is_a check up to where the Constraints object is allocated pass the request object to the application pass a request to `matches?` so we can avoid creating excess requests nothing is passed to `rack_app` anymore, so rm the params one fewer is_a check Constraints#app should never return another Constraints object, so switch to if statement eliminate dispatcher is_a checks push is_a?(Dispatcher) check in to one place Always construct route objects with Constraint objects Conflicts: actionpack/lib/action_controller/metal.rb
- Loading branch information...
Showing with 85 additions and 75 deletions.
- +8 −3 actionpack/lib/action_controller/metal.rb
- +0 −4 actionpack/lib/action_dispatch/http/parameters.rb
- +11 −0 actionpack/lib/action_dispatch/http/request.rb
- +1 −9 actionpack/lib/action_dispatch/journey/route.rb
- +1 −1 actionpack/lib/action_dispatch/journey/router.rb
- +10 −0 actionpack/lib/action_dispatch/routing/endpoint.rb
- +4 −11 actionpack/lib/action_dispatch/routing/inspector.rb
- +26 −17 actionpack/lib/action_dispatch/routing/mapper.rb
- +8 −10 actionpack/lib/action_dispatch/routing/redirection.rb
- +10 −18 actionpack/lib/action_dispatch/routing/route_set.rb
- +6 −2 actionpack/test/journey/router_test.rb
|@@ -0,0 +1,10 @@|
|+ module Routing|
|+ class Endpoint # :nodoc:|
|+ def dispatcher?; false; end|
|+ def redirect?; false; end|
|+ def matches?(req); true; end|
|+ def app; self; end|