Skip to content
Snippets Groups Projects
Commit 37ff9d88 authored by Johannes Schleifenbaum's avatar Johannes Schleifenbaum
Browse files

Routing fix Commit-List: switch to branch with # in name

parent 05bc6589
No related branches found
No related tags found
1 merge request!4257Routing fix Commit-List: branch with # and + in name
Loading
Loading
@@ -251,11 +251,11 @@ Gitlab::Application.routes.draw do
 
member do
# tree viewer logs
get "logs_tree", constraints: { id: /[a-zA-Z.\/0-9_\-]+/ }
get "logs_tree", constraints: { id: /[a-zA-Z.\/0-9_\-#%]+/ }
get "logs_tree/:path" => "refs#logs_tree",
as: :logs_file,
constraints: {
id: /[a-zA-Z.0-9\/_\-]+/,
id: /[a-zA-Z.0-9\/_\-#%]+/,
path: /.*/
}
end
Loading
Loading
Loading
Loading
@@ -201,7 +201,9 @@ describe RefsController, "routing" do
 
it "to #logs_tree" do
get("/gitlabhq/refs/stable/logs_tree").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'stable')
get("/gitlabhq/refs/feature%2345/logs_tree").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'feature#45')
get("/gitlabhq/refs/stable/logs_tree/foo/bar/baz").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'stable', path: 'foo/bar/baz')
get("/gitlabhq/refs/feature%2345/logs_tree/foo/bar/baz").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'feature#45', path: 'foo/bar/baz')
get("/gitlab/gitlabhq/refs/stable/logs_tree/files.scss").should route_to('refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'stable', path: 'files.scss')
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment