Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
9ae26cd1
Commit
9ae26cd1
authored
Jun 11, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4257 from jojosch/fix/routing-commit-with-#
Routing fix Commit-List: branch with # and + in name
parents
09572e40
c830bab7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
config/routes.rb
config/routes.rb
+2
-2
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+4
-0
No files found.
config/routes.rb
View file @
9ae26cd1
...
@@ -251,11 +251,11 @@ Gitlab::Application.routes.draw do
...
@@ -251,11 +251,11 @@ Gitlab::Application.routes.draw do
member
do
member
do
# tree viewer logs
# 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"
,
get
"logs_tree/:path"
=>
"refs#logs_tree"
,
as: :logs_file
,
as: :logs_file
,
constraints:
{
constraints:
{
id:
/[a-zA-Z.0-9\/_\-]+/
,
id:
/[a-zA-Z.0-9\/_\-
#%+
]+/
,
path:
/.*/
path:
/.*/
}
}
end
end
...
...
spec/routing/project_routing_spec.rb
View file @
9ae26cd1
...
@@ -201,7 +201,11 @@ describe RefsController, "routing" do
...
@@ -201,7 +201,11 @@ describe RefsController, "routing" do
it
"to #logs_tree"
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/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/feature%2B45/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/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
(
"/gitlabhq/refs/feature%2B45/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'
)
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
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment