route: repository: move :repository_id routes before non :repository_id routes

On Rails3 new route format, tests pass except following routes.

* 'projects/:id/repository' :action => 'show'
* 'projects/:id/repository/:repository_id' :action => 'show'

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8718 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-01-29 01:23:15 +00:00
parent 83e7ee6729
commit f49d8d8c5f
1 changed files with 29 additions and 26 deletions

View File

@ -233,10 +233,39 @@ ActionController::Routing::Routes.draw do |map|
repositories.with_options :conditions => {:method => :get} do |repository_views|
repository_views.connect 'projects/:id/repository',
:action => 'show'
repository_views.connect 'projects/:id/repository/:repository_id/statistics',
:action => 'stats'
repository_views.connect 'projects/:id/repository/:repository_id/graph',
:action => 'graph'
repository_views.connect 'projects/:id/repository/statistics',
:action => 'stats'
repository_views.connect 'projects/:id/repository/graph',
:action => 'graph'
repository_views.connect 'projects/:id/repository/:repository_id/revisions',
:action => 'revisions'
repository_views.connect 'projects/:id/repository/:repository_id/revisions.:format',
:action => 'revisions'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev',
:action => 'revision'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff',
:action => 'diff'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format',
:action => 'diff'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path',
:action => 'entry', :format => 'raw'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path',
:requirements => {
:action => /(browse|show|entry|changes|annotate|diff)/,
:rev => /[a-z0-9\.\-_]+/
}
repository_views.connect 'projects/:id/repository/:repository_id/raw/*path',
:action => 'entry', :format => 'raw'
repository_views.connect 'projects/:id/repository/:repository_id/:action/*path',
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
repository_views.connect 'projects/:id/repository/revisions',
:action => 'revisions'
repository_views.connect 'projects/:id/repository/revisions.:format',
@ -259,32 +288,6 @@ ActionController::Routing::Routes.draw do |map|
repository_views.connect 'projects/:id/repository/:action/*path',
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
# Same routes with a repository_id
repository_views.connect 'projects/:id/repository/:repository_id/statistics',
:action => 'stats'
repository_views.connect 'projects/:id/repository/:repository_id/graph',
:action => 'graph'
repository_views.connect 'projects/:id/repository/:repository_id/revisions',
:action => 'revisions'
repository_views.connect 'projects/:id/repository/:repository_id/revisions.:format',
:action => 'revisions'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev',
:action => 'revision'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff',
:action => 'diff'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format',
:action => 'diff'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path',
:action => 'entry', :format => 'raw'
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path',
:requirements => {
:action => /(browse|show|entry|changes|annotate|diff)/,
:rev => /[a-z0-9\.\-_]+/
}
repository_views.connect 'projects/:id/repository/:repository_id/raw/*path',
:action => 'entry', :format => 'raw'
repository_views.connect 'projects/:id/repository/:repository_id/:action/*path',
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
repository_views.connect 'projects/:id/repository/:repository_id',
:action => 'show'
end