@@ -270,6 +270,9 ActionController::Routing::Routes.draw do |map| | |||
|
270 | 270 | repository_views.connect 'projects/:id/repository/:repository_id/show/*path', |
|
271 | 271 | :requirements => { :path => /.+/ } |
|
272 | 272 | |
|
273 | repository_views.connect 'projects/:id/repository/:repository_id/revision', | |
|
274 | :action => 'revision' | |
|
275 | ||
|
273 | 276 | repository_views.connect 'projects/:id/repository/revisions', |
|
274 | 277 | :action => 'revisions' |
|
275 | 278 | repository_views.connect 'projects/:id/repository/revisions.:format', |
@@ -296,13 +299,12 ActionController::Routing::Routes.draw do |map| | |||
|
296 | 299 | repository_views.connect 'projects/:id/repository/:action/*path', |
|
297 | 300 | :requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ } |
|
298 | 301 | |
|
302 | repository_views.connect 'projects/:id/repository/revision', | |
|
303 | :action => 'revision' | |
|
304 | ||
|
299 | 305 | repository_views.connect 'projects/:id/repository/:repository_id', |
|
300 | 306 | :action => 'show' |
|
301 | 307 | end |
|
302 | ||
|
303 | repositories.connect 'projects/:id/repository/revision', | |
|
304 | :action => 'revision', | |
|
305 | :conditions => {:method => [:get, :post]} | |
|
306 | 308 | end |
|
307 | 309 | |
|
308 | 310 | # additional routes for having the file name at the end of url |
@@ -300,6 +300,11 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||
|
300 | 300 | { :controller => 'repositories', :action => 'changes', :id => 'redmine', |
|
301 | 301 | :path => @path_hash[:param] } |
|
302 | 302 | ) |
|
303 | assert_routing( | |
|
304 | { :method => 'get', | |
|
305 | :path => "/projects/redmine/repository/revision" }, | |
|
306 | { :controller => 'repositories', :action => 'revision', :id => 'redmine' } | |
|
307 | ) | |
|
303 | 308 | end |
|
304 | 309 | |
|
305 | 310 | def test_repositories_non_revisions_path_with_repository_id |
@@ -339,6 +344,11 class RoutingRepositoriesTest < ActionController::IntegrationTest | |||
|
339 | 344 | { :controller => 'repositories', :action => 'changes', :id => 'redmine', :repository_id => 'foo', |
|
340 | 345 | :path => @path_hash[:param] } |
|
341 | 346 | ) |
|
347 | assert_routing( | |
|
348 | { :method => 'get', | |
|
349 | :path => "/projects/redmine/repository/foo/revision" }, | |
|
350 | { :controller => 'repositories', :action => 'revision', :id => 'redmine', :repository_id => 'foo'} | |
|
351 | ) | |
|
342 | 352 | end |
|
343 | 353 | |
|
344 | 354 | def test_repositories_related_issues |
General Comments 0
You need to be logged in to leave comments.
Login now