@@ -246,13 +246,13 Rails.application.routes.draw do | |||||
246 | post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue' |
|
246 | post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue' | |
247 | delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' |
|
247 | delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' | |
248 | get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions' |
|
248 | get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions' | |
249 | get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path)', |
|
249 | %w(browse show entry raw annotate diff).each do |action| | |
250 | :controller => 'repositories', |
|
250 | get "projects/:id/repository/:repository_id/revisions/:rev/#{action}(/*path)", | |
251 | :format => false, |
|
251 | :controller => 'repositories', | |
252 | :constraints => { |
|
252 | :action => action, | |
253 | :action => /(browse|show|entry|raw|annotate|diff)/, |
|
253 | :format => false, | |
254 |
|
|
254 | :constraints => {:rev => /[a-z0-9\.\-_]+/} | |
255 | } |
|
255 | end | |
256 |
|
256 | |||
257 | get 'projects/:id/repository/statistics', :to => 'repositories#stats' |
|
257 | get 'projects/:id/repository/statistics', :to => 'repositories#stats' | |
258 | get 'projects/:id/repository/graph', :to => 'repositories#graph' |
|
258 | get 'projects/:id/repository/graph', :to => 'repositories#graph' | |
@@ -266,21 +266,28 Rails.application.routes.draw do | |||||
266 | get 'projects/:id/repository/revision', :to => 'repositories#revision' |
|
266 | get 'projects/:id/repository/revision', :to => 'repositories#revision' | |
267 | post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue' |
|
267 | post 'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue' | |
268 | delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' |
|
268 | delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' | |
269 | get 'projects/:id/repository/revisions/:rev/:action(/*path)', |
|
269 | %w(browse show entry raw annotate diff).each do |action| | |
270 | :controller => 'repositories', |
|
270 | get "projects/:id/repository/revisions/:rev/#{action}(/*path)", | |
271 | :format => false, |
|
271 | :controller => 'repositories', | |
272 | :constraints => { |
|
272 | :action => action, | |
273 | :action => /(browse|show|entry|raw|annotate|diff)/, |
|
273 | :format => false, | |
274 |
|
|
274 | :constraints => {:rev => /[a-z0-9\.\-_]+/} | |
275 | } |
|
275 | end | |
276 | get 'projects/:id/repository/:repository_id/:action(/*path)', |
|
276 | %w(browse entry raw changes annotate diff).each do |action| | |
277 | :controller => 'repositories', |
|
277 | get "projects/:id/repository/:repository_id/#{action}(/*path)", | |
278 | :action => /(browse|show|entry|raw|changes|annotate|diff)/, |
|
278 | :controller => 'repositories', | |
279 | :format => false |
|
279 | :action => action, | |
280 | get 'projects/:id/repository/:action(/*path)', |
|
280 | :format => false | |
281 | :controller => 'repositories', |
|
281 | end | |
282 | :action => /(browse|show|entry|raw|changes|annotate|diff)/, |
|
282 | %w(browse entry raw changes annotate diff).each do |action| | |
283 | :format => false |
|
283 | get "projects/:id/repository/#{action}(/*path)", | |
|
284 | :controller => 'repositories', | |||
|
285 | :action => action, | |||
|
286 | :format => false | |||
|
287 | end | |||
|
288 | ||||
|
289 | get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => false | |||
|
290 | get 'projects/:id/repository/show/*path', :to => 'repositories#show', :format => false | |||
284 |
|
291 | |||
285 | get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil |
|
292 | get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil | |
286 | get 'projects/:id/repository', :to => 'repositories#show', :path => nil |
|
293 | get 'projects/:id/repository', :to => 'repositories#show', :path => nil |
General Comments 0
You need to be logged in to leave comments.
Login now