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
Jérome Perrin
gitlab-ce
Commits
5fdb5124
Commit
5fdb5124
authored
May 31, 2017
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename build to job
parent
8a9a62e3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
app/controllers/projects/jobs_controller.rb
app/controllers/projects/jobs_controller.rb
+1
-1
app/serializers/build_artifact_entity.rb
app/serializers/build_artifact_entity.rb
+4
-4
app/serializers/build_details_entity.rb
app/serializers/build_details_entity.rb
+1
-1
spec/serializers/build_artifact_entity_spec.rb
spec/serializers/build_artifact_entity_spec.rb
+2
-2
No files found.
app/controllers/projects/jobs_controller.rb
View file @
5fdb5124
...
...
@@ -53,7 +53,7 @@ class Projects::JobsController < Projects::ApplicationController
render
json:
BuildSerializer
.
new
(
project:
@project
,
current_user:
@current_user
)
.
represent
_status
(
@build
,
{},
BuildDetailsEntity
)
.
represent
(
@build
,
{},
BuildDetailsEntity
)
end
end
end
...
...
app/serializers/build_artifact_entity.rb
View file @
5fdb5124
...
...
@@ -10,16 +10,16 @@ class BuildArtifactEntity < Grape::Entity
expose
:path
do
|
job
|
download_namespace_project_job_artifacts_path
(
build
.
project
.
namespace
,
build
.
project
,
build
)
project
.
namespace
,
project
,
job
)
end
expose
:keep_path
,
if:
->
(
*
)
{
job
.
has_expiring_artifacts?
}
do
|
job
|
keep_namespace_project_job_artifacts_path
(
project
.
namespace
,
project
,
build
)
job
)
end
expose
:browse_path
do
|
job
|
...
...
app/serializers/build_details_entity.rb
View file @
5fdb5124
...
...
@@ -4,7 +4,7 @@ class BuildDetailsEntity < BuildEntity
expose
:erased_by
,
if:
->
(
*
)
{
build
.
erased?
},
using:
UserEntity
expose
:erase_path
,
if:
->
(
*
)
{
build
.
erasable?
&&
can?
(
current_user
,
:update_build
,
project
)
}
do
|
build
|
erase_namespace_project_
build
_path
(
project
.
namespace
,
project
,
build
)
erase_namespace_project_
job
_path
(
project
.
namespace
,
project
,
build
)
end
expose
:artifacts
,
using:
BuildArtifactEntity
...
...
spec/serializers/build_artifact_entity_spec.rb
View file @
5fdb5124
...
...
@@ -23,10 +23,10 @@ describe BuildArtifactEntity do
.
to
include
"jobs/
#{
job
.
id
}
/artifacts/download"
expect
(
subject
[
:keep_path
])
.
to
include
"jobs/
#{
build
.
id
}
/artifacts/keep"
.
to
include
"jobs/
#{
job
.
id
}
/artifacts/keep"
expect
(
subject
[
:browse_path
])
.
to
include
"jobs/
#{
build
.
id
}
/artifacts/browse"
.
to
include
"jobs/
#{
job
.
id
}
/artifacts/browse"
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