get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions'
get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))',
:controller => 'repositories',
+ :format => false,
:constraints => {
:action => /(browse|show|entry|raw|annotate|diff)/,
:rev => /[a-z0-9\.\-_]+/
delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))',
:controller => 'repositories',
+ :format => false,
:constraints => {
:action => /(browse|show|entry|raw|annotate|diff)/,
:rev => /[a-z0-9\.\-_]+/
)
assert_routing(
{ :method => 'get',
- :path => "/projects/redmine/repository/revisions/2457/diff.diff" },
+ :path => "/projects/redmine/repository/revisions/2457/diff" },
{ :controller => 'repositories', :action => 'diff', :id => 'redmine',
- :rev => '2457', :format => 'diff' }
+ :rev => '2457', :format => 'diff' },
+ {},
+ { :format => 'diff' }
)
assert_routing(
{ :method => 'get',
{ :controller => 'repositories', :action => 'diff', :id => 'redmine',
:path => @path_hash[:param], :rev => '2' }
)
+ assert_routing(
+ { :method => 'get',
+ :path => "/projects/redmine/repository/revisions/2/diff/#{@path_hash[:path]}" },
+ { :controller => 'repositories', :action => 'diff', :id => 'redmine',
+ :path => @path_hash[:param], :rev => '2', :format => 'diff' },
+ {},
+ { :format => 'diff' }
+ )
assert_routing(
{ :method => 'get',
:path => "/projects/redmine/repository/revisions/2/entry/#{@path_hash[:path]}" },
)
assert_routing(
{ :method => 'get',
- :path => "/projects/redmine/repository/foo/revisions/2457/diff.diff" },
+ :path => "/projects/redmine/repository/foo/revisions/2457/diff" },
{ :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
- :rev => '2457', :format => 'diff' }
+ :rev => '2457', :format => 'diff' },
+ {},
+ { :format => 'diff' }
)
assert_routing(
{ :method => 'get',
{ :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
:path => @path_hash[:param], :rev => '2' }
)
+ assert_routing(
+ { :method => 'get',
+ :path => "/projects/redmine/repository/foo/revisions/2/diff/#{@path_hash[:path]}" },
+ { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
+ :path => @path_hash[:param], :rev => '2', :format => 'diff' },
+ {},
+ { :format => 'diff' }
+ )
assert_routing(
{ :method => 'get',
:path => "/projects/redmine/repository/foo/revisions/2/entry/#{@path_hash[:path]}" },