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
c0e68011
Commit
c0e68011
authored
Jul 06, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just draw :legacy_builds
parent
72ed502a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
38 deletions
+23
-38
config/routes/legacy_builds.rb
config/routes/legacy_builds.rb
+22
-0
config/routes/project.rb
config/routes/project.rb
+1
-2
lib/gitlab/routes/legacy_builds.rb
lib/gitlab/routes/legacy_builds.rb
+0
-36
No files found.
config/routes/legacy_builds.rb
0 → 100644
View file @
c0e68011
resources
:builds
,
only:
[
:index
,
:show
],
constraints:
{
id:
/\d+/
}
do
collection
do
resources
:artifacts
,
only:
[],
controller:
'build_artifacts'
do
collection
do
get
:latest_succeeded
,
path:
'*ref_name_and_path'
,
format:
false
end
end
end
member
do
get
:raw
end
resource
:artifacts
,
only:
[],
controller:
'build_artifacts'
do
get
:download
get
:browse
,
path:
'browse(/*path)'
,
format:
false
get
:file
,
path:
'file/*path'
,
format:
false
get
:raw
,
path:
'raw/*path'
,
format:
false
end
end
config/routes/project.rb
View file @
c0e68011
require
'constraints/project_url_constrainer'
require
'gitlab/routes/legacy_builds'
resources
:projects
,
only:
[
:index
,
:new
,
:create
]
...
...
@@ -253,7 +252,7 @@ constraints(ProjectUrlConstrainer.new) do
end
end
Gitlab
::
Routes
::
LegacyBuilds
.
new
(
self
).
draw
draw
:legacy_builds
resources
:hooks
,
only:
[
:index
,
:create
,
:edit
,
:update
,
:destroy
],
constraints:
{
id:
/\d+/
}
do
member
do
...
...
lib/gitlab/routes/legacy_builds.rb
deleted
100644 → 0
View file @
72ed502a
module
Gitlab
module
Routes
class
LegacyBuilds
def
initialize
(
map
)
@map
=
map
end
def
draw
@map
.
instance_eval
do
resources
:builds
,
only:
[
:index
,
:show
],
constraints:
{
id:
/\d+/
}
do
collection
do
resources
:artifacts
,
only:
[],
controller:
'build_artifacts'
do
collection
do
get
:latest_succeeded
,
path:
'*ref_name_and_path'
,
format:
false
end
end
end
member
do
get
:raw
end
resource
:artifacts
,
only:
[],
controller:
'build_artifacts'
do
get
:download
get
:browse
,
path:
'browse(/*path)'
,
format:
false
get
:file
,
path:
'file/*path'
,
format:
false
get
:raw
,
path:
'raw/*path'
,
format:
false
end
end
end
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