##// END OF EJS Templates
Merged r9909 from trunk....
Jean-Philippe Lang -
r9774:70d2f30e9f41
parent child
Show More
@@ -224,6 +224,7 RedmineApp::Application.routes.draw do
224 get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions'
224 get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions'
225 get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))',
225 get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))',
226 :controller => 'repositories',
226 :controller => 'repositories',
227 :format => false,
227 :constraints => {
228 :constraints => {
228 :action => /(browse|show|entry|raw|annotate|diff)/,
229 :action => /(browse|show|entry|raw|annotate|diff)/,
229 :rev => /[a-z0-9\.\-_]+/
230 :rev => /[a-z0-9\.\-_]+/
@@ -242,6 +243,7 RedmineApp::Application.routes.draw do
242 delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
243 delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue'
243 get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))',
244 get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))',
244 :controller => 'repositories',
245 :controller => 'repositories',
246 :format => false,
245 :constraints => {
247 :constraints => {
246 :action => /(browse|show|entry|raw|annotate|diff)/,
248 :action => /(browse|show|entry|raw|annotate|diff)/,
247 :rev => /[a-z0-9\.\-_]+/
249 :rev => /[a-z0-9\.\-_]+/
@@ -140,9 +140,11 class RoutingRepositoriesTest < ActionController::IntegrationTest
140 )
140 )
141 assert_routing(
141 assert_routing(
142 { :method => 'get',
142 { :method => 'get',
143 :path => "/projects/redmine/repository/revisions/2457/diff.diff" },
143 :path => "/projects/redmine/repository/revisions/2457/diff" },
144 { :controller => 'repositories', :action => 'diff', :id => 'redmine',
144 { :controller => 'repositories', :action => 'diff', :id => 'redmine',
145 :rev => '2457', :format => 'diff' }
145 :rev => '2457', :format => 'diff' },
146 {},
147 { :format => 'diff' }
146 )
148 )
147 assert_routing(
149 assert_routing(
148 { :method => 'get',
150 { :method => 'get',
@@ -152,6 +154,14 class RoutingRepositoriesTest < ActionController::IntegrationTest
152 )
154 )
153 assert_routing(
155 assert_routing(
154 { :method => 'get',
156 { :method => 'get',
157 :path => "/projects/redmine/repository/revisions/2/diff/#{@path_hash[:path]}" },
158 { :controller => 'repositories', :action => 'diff', :id => 'redmine',
159 :path => @path_hash[:param], :rev => '2', :format => 'diff' },
160 {},
161 { :format => 'diff' }
162 )
163 assert_routing(
164 { :method => 'get',
155 :path => "/projects/redmine/repository/revisions/2/entry/#{@path_hash[:path]}" },
165 :path => "/projects/redmine/repository/revisions/2/entry/#{@path_hash[:path]}" },
156 { :controller => 'repositories', :action => 'entry', :id => 'redmine',
166 { :controller => 'repositories', :action => 'entry', :id => 'redmine',
157 :path => @path_hash[:param], :rev => '2' }
167 :path => @path_hash[:param], :rev => '2' }
@@ -209,9 +219,11 class RoutingRepositoriesTest < ActionController::IntegrationTest
209 )
219 )
210 assert_routing(
220 assert_routing(
211 { :method => 'get',
221 { :method => 'get',
212 :path => "/projects/redmine/repository/foo/revisions/2457/diff.diff" },
222 :path => "/projects/redmine/repository/foo/revisions/2457/diff" },
213 { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
223 { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
214 :rev => '2457', :format => 'diff' }
224 :rev => '2457', :format => 'diff' },
225 {},
226 { :format => 'diff' }
215 )
227 )
216 assert_routing(
228 assert_routing(
217 { :method => 'get',
229 { :method => 'get',
@@ -221,6 +233,14 class RoutingRepositoriesTest < ActionController::IntegrationTest
221 )
233 )
222 assert_routing(
234 assert_routing(
223 { :method => 'get',
235 { :method => 'get',
236 :path => "/projects/redmine/repository/foo/revisions/2/diff/#{@path_hash[:path]}" },
237 { :controller => 'repositories', :action => 'diff', :id => 'redmine', :repository_id => 'foo',
238 :path => @path_hash[:param], :rev => '2', :format => 'diff' },
239 {},
240 { :format => 'diff' }
241 )
242 assert_routing(
243 { :method => 'get',
224 :path => "/projects/redmine/repository/foo/revisions/2/entry/#{@path_hash[:path]}" },
244 :path => "/projects/redmine/repository/foo/revisions/2/entry/#{@path_hash[:path]}" },
225 { :controller => 'repositories', :action => 'entry', :id => 'redmine', :repository_id => 'foo',
245 { :controller => 'repositories', :action => 'entry', :id => 'redmine', :repository_id => 'foo',
226 :path => @path_hash[:param], :rev => '2' }
246 :path => @path_hash[:param], :rev => '2' }
General Comments 0
You need to be logged in to leave comments. Login now