Rename build to job
This commit is contained in:
parent
8a9a62e329
commit
5fdb51240f
4 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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|
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue