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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
33 deletions
+18
-33
legacy_builds.rb
config/routes/legacy_builds.rb
+17
-31
project.rb
config/routes/project.rb
+1
-2
No files found.
lib/gitlab
/routes/legacy_builds.rb
→
config
/routes/legacy_builds.rb
View file @
c0e68011
module
Gitlab
module
Routes
class
LegacyBuilds
def
initialize
(
map
)
@map
=
map
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
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
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
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
...
...
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