summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-12-11 14:07:12 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-12-11 14:07:12 +0000
commit65b858a7768b97f536891b9b9841376ea4638d92 (patch)
tree0e2950e9396c3458e63ba073eddc06c47180f2b7
parentfeb7c2bcce9c948377e135c33f9760cb79c3822c (diff)
parent1d0dfd50cc7a795b948bc19d701518681b3c9439 (diff)
downloadgitlab-ce-65b858a7768b97f536891b9b9841376ea4638d92.tar.gz
Merge branch 'show_files_with_diff_name' into 'master'
Show files named diff Fixes #1749 See merge request !1318
-rw-r--r--config/routes.rb2
-rw-r--r--spec/routing/project_routing_spec.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 7480f7cdc85..533e044ca4c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -191,7 +191,7 @@ Gitlab::Application.routes.draw do
end
scope module: :projects do
- resources :blob, only: [:show, :destroy], constraints: { id: /.+/ } do
+ resources :blob, only: [:show, :destroy], constraints: { id: /.+/, format: false } do
get :diff, on: :member
end
resources :raw, only: [:show], constraints: {id: /.+/}
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index e4652d1f836..e6505040317 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -417,6 +417,7 @@ describe Projects::BlobController, "routing" do
it "to #show" do
get("/gitlab/gitlabhq/blob/master/app/models/project.rb").should route_to('projects/blob#show', project_id: 'gitlab/gitlabhq', id: 'master/app/models/project.rb')
get("/gitlab/gitlabhq/blob/master/app/models/compare.rb").should route_to('projects/blob#show', project_id: 'gitlab/gitlabhq', id: 'master/app/models/compare.rb')
+ get("/gitlab/gitlabhq/blob/master/app/models/diff.js").should route_to('projects/blob#show', project_id: 'gitlab/gitlabhq', id: 'master/app/models/diff.js')
get("/gitlab/gitlabhq/blob/master/files.scss").should route_to('projects/blob#show', project_id: 'gitlab/gitlabhq', id: 'master/files.scss')
end
end