BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c94db0c2
Commit
c94db0c2
authored
May 26, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use - as the prefix so we don't conflict with namespaces
The decision was made around:
https://gitlab.com/gitlab-org/gitlab-ce/issues/26407#note_30624641
parent
70eb0c6a
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
13 additions
and
26 deletions
+13
-26
project.rb
config/routes/project.rb
+1
-1
20170517101044_rename_projects_named_jobs.rb
db/post_migrate/20170517101044_rename_projects_named_jobs.rb
+0
-14
path_regex.rb
lib/gitlab/path_regex.rb
+1
-0
environments_controller_spec.rb
spec/controllers/projects/environments_controller_spec.rb
+2
-2
browse_spec.rb
spec/features/projects/artifacts/browse_spec.rb
+1
-1
download_spec.rb
spec/features/projects/artifacts/download_spec.rb
+1
-1
file_spec.rb
spec/features/projects/artifacts/file_spec.rb
+1
-1
raw_spec.rb
spec/features/projects/artifacts/raw_spec.rb
+1
-1
jobs_spec.rb
spec/features/projects/jobs_spec.rb
+3
-3
build_spec.js
spec/javascripts/build_spec.js
+1
-1
common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+1
-1
No files found.
config/routes/project.rb
View file @
c94db0c2
...
...
@@ -181,7 +181,7 @@ constraints(ProjectUrlConstrainer.new) do
end
end
resources
:jobs
,
only:
[
:index
,
:show
],
constraints:
{
id:
/\d+/
}
do
resources
:jobs
,
path:
'-/jobs'
,
only:
[
:index
,
:show
],
constraints:
{
id:
/\d+/
}
do
collection
do
post
:cancel_all
...
...
db/post_migrate/20170517101044_rename_projects_named_jobs.rb
deleted
100644 → 0
View file @
70eb0c6a
class
RenameProjectsNamedJobs
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
RenameReservedPathsMigration
::
V1
DOWNTIME
=
false
disable_ddl_transaction!
def
up
rename_wildcard_paths
(
'jobs'
)
end
def
down
end
end
lib/gitlab/path_regex.rb
View file @
c94db0c2
...
...
@@ -80,6 +80,7 @@ module Gitlab
# By rejecting `badges` the router can _count_ on the fact that `badges` will
# be preceded by the `namespace/project`.
PROJECT_WILDCARD_ROUTES
=
%w[
-
badges
blame
blob
...
...
spec/controllers/projects/environments_controller_spec.rb
View file @
c94db0c2
...
...
@@ -177,7 +177,7 @@ describe Projects::EnvironmentsController do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
eq
(
{
'redirect_url'
=>
"http://test.host/
#{
project
.
path_with_namespace
}
/jobs/
#{
action
.
id
}
"
})
namespace_project_job_url
(
project
.
namespace
,
project
,
action
)
})
end
end
...
...
@@ -191,7 +191,7 @@ describe Projects::EnvironmentsController do
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
eq
(
{
'redirect_url'
=>
"http://test.host/
#{
project
.
path_with_namespace
}
/environments/
#{
environment
.
id
}
"
})
namespace_project_environment_url
(
project
.
namespace
,
project
,
environment
)
})
end
end
end
...
...
spec/features/projects/artifacts/browse_spec.rb
View file @
c94db0c2
...
...
@@ -15,7 +15,7 @@ feature 'Browse artifact', :js, feature: true do
end
before
do
visit
browse_url
.
sub
(
'
jobs'
,
'
builds'
)
visit
browse_url
.
sub
(
'
/-/jobs'
,
'/
builds'
)
end
it
"redirects to new URL"
do
...
...
spec/features/projects/artifacts/download_spec.rb
View file @
c94db0c2
...
...
@@ -39,7 +39,7 @@ feature 'Download artifact', :js, feature: true do
context
'when visiting old URL'
do
before
do
visit
download_url
.
sub
(
'
jobs'
,
'
builds'
)
visit
download_url
.
sub
(
'
/-/jobs'
,
'/
builds'
)
end
context
'via job id'
do
...
...
spec/features/projects/artifacts/file_spec.rb
View file @
c94db0c2
...
...
@@ -67,7 +67,7 @@ feature 'Artifact file', :js, feature: true do
end
before
do
visit
file_url
.
sub
(
'
jobs'
,
'
builds'
)
visit
file_url
.
sub
(
'
/-/jobs'
,
'/
builds'
)
end
it
"redirects to new URL"
do
...
...
spec/features/projects/artifacts/raw_spec.rb
View file @
c94db0c2
...
...
@@ -15,7 +15,7 @@ feature 'Raw artifact', :js, feature: true do
end
before
do
visit
raw_url
.
sub
(
'
jobs'
,
'
builds'
)
visit
raw_url
.
sub
(
'
/-/jobs'
,
'/
builds'
)
end
it
"redirects to new URL"
do
...
...
spec/features/projects/jobs_spec.rb
View file @
c94db0c2
...
...
@@ -85,7 +85,7 @@ feature 'Jobs', :feature do
end
before
do
visit
jobs_url
.
sub
(
'
jobs'
,
'
builds'
)
visit
jobs_url
.
sub
(
'
/-/jobs'
,
'/
builds'
)
end
it
"redirects to new URL"
do
...
...
@@ -203,7 +203,7 @@ feature 'Jobs', :feature do
end
before
do
visit
job_url
.
sub
(
'
jobs'
,
'
builds'
)
visit
job_url
.
sub
(
'
/-/jobs'
,
'/
builds'
)
end
it
"redirects to new URL"
do
...
...
@@ -473,7 +473,7 @@ feature 'Jobs', :feature do
end
before
do
visit
raw_job_url
.
sub
(
'
jobs'
,
'
builds'
)
visit
raw_job_url
.
sub
(
'
/-/jobs'
,
'/
builds'
)
end
it
"redirects to new URL"
do
...
...
spec/javascripts/build_spec.js
View file @
c94db0c2
...
...
@@ -8,7 +8,7 @@ import '~/breakpoints';
import
'vendor/jquery.nicescroll'
;
describe
(
'Build'
,
()
=>
{
const
BUILD_URL
=
`
${
gl
.
TEST_HOST
}
/frontend-fixtures/builds-project/jobs/1`
;
const
BUILD_URL
=
`
${
gl
.
TEST_HOST
}
/frontend-fixtures/builds-project/
-/
jobs/1`
;
preloadFixtures
(
'builds/build-with-artifacts.html.raw'
);
...
...
spec/javascripts/lib/utils/common_utils_spec.js
View file @
c94db0c2
...
...
@@ -356,7 +356,7 @@ import '~/lib/utils/common_utils';
describe
(
'gl.utils.setCiStatusFavicon'
,
()
=>
{
it
(
'should set page favicon to CI status favicon based on provided status'
,
()
=>
{
const
BUILD_URL
=
`
${
gl
.
TEST_HOST
}
/frontend-fixtures/builds-project/jobs/1/status.json`
;
const
BUILD_URL
=
`
${
gl
.
TEST_HOST
}
/frontend-fixtures/builds-project/
-/
jobs/1/status.json`
;
const
FAVICON_PATH
=
'//icon_status_success'
;
const
spySetFavicon
=
spyOn
(
gl
.
utils
,
'setFavicon'
).
and
.
stub
();
const
spyResetFavicon
=
spyOn
(
gl
.
utils
,
'resetFavicon'
).
and
.
stub
();
...
...
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