Commit 5fdb5124 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Rename build to job

parent 8a9a62e3
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment