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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
7ac6496f
Commit
7ac6496f
authored
Oct 11, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip deprecated redirects in PathRegex spec
parent
6a82632b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
lib/gitlab/path_regex.rb
lib/gitlab/path_regex.rb
+0
-1
spec/lib/gitlab/path_regex_spec.rb
spec/lib/gitlab/path_regex_spec.rb
+8
-1
No files found.
lib/gitlab/path_regex.rb
View file @
7ac6496f
...
...
@@ -119,7 +119,6 @@ module Gitlab
analytics
audit_events
avatar
boards
edit
group_members
hooks
...
...
spec/lib/gitlab/path_regex_spec.rb
View file @
7ac6496f
...
...
@@ -72,7 +72,14 @@ describe Gitlab::PathRegex do
route_set
=
Rails
.
application
.
routes
routes_collection
=
route_set
.
routes
routes_array
=
routes_collection
.
routes
routes_array
.
map
{
|
route
|
route
.
path
.
spec
.
to_s
}
non_deprecated_redirect_routes
=
routes_array
.
reject
do
|
route
|
app
=
route
.
app
# `app.app` is either another app, or `self`. We want to find the final app.
app
=
app
.
app
while
app
.
try
(
:app
)
&&
app
.
app
!=
app
app
.
is_a?
(
ActionDispatch
::
Routing
::
PathRedirect
)
&&
app
.
block
.
include?
(
'/-/'
)
end
non_deprecated_redirect_routes
.
map
{
|
route
|
route
.
path
.
spec
.
to_s
}
end
let
(
:routes_without_format
)
{
all_routes
.
map
{
|
path
|
without_format
(
path
)
}
}
...
...
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