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 ...@@ -53,7 +53,7 @@ class Projects::JobsController < Projects::ApplicationController
render json: BuildSerializer render json: BuildSerializer
.new(project: @project, current_user: @current_user) .new(project: @project, current_user: @current_user)
.represent_status(@build, {}, BuildDetailsEntity) .represent(@build, {}, BuildDetailsEntity)
end end
end end
end end
......
...@@ -10,16 +10,16 @@ class BuildArtifactEntity < Grape::Entity ...@@ -10,16 +10,16 @@ class BuildArtifactEntity < Grape::Entity
expose :path do |job| expose :path do |job|
download_namespace_project_job_artifacts_path( download_namespace_project_job_artifacts_path(
build.project.namespace, project.namespace,
build.project, project,
build) job)
end end
expose :keep_path, if: -> (*) { job.has_expiring_artifacts? } do |job| expose :keep_path, if: -> (*) { job.has_expiring_artifacts? } do |job|
keep_namespace_project_job_artifacts_path( keep_namespace_project_job_artifacts_path(
project.namespace, project.namespace,
project, project,
build) job)
end end
expose :browse_path do |job| expose :browse_path do |job|
......
...@@ -4,7 +4,7 @@ class BuildDetailsEntity < BuildEntity ...@@ -4,7 +4,7 @@ class BuildDetailsEntity < BuildEntity
expose :erased_by, if: -> (*) { build.erased? }, using: UserEntity expose :erased_by, if: -> (*) { build.erased? }, using: UserEntity
expose :erase_path, if: -> (*) { build.erasable? && can?(current_user, :update_build, project) } do |build| 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 end
expose :artifacts, using: BuildArtifactEntity expose :artifacts, using: BuildArtifactEntity
......
...@@ -23,10 +23,10 @@ describe BuildArtifactEntity do ...@@ -23,10 +23,10 @@ describe BuildArtifactEntity do
.to include "jobs/#{job.id}/artifacts/download" .to include "jobs/#{job.id}/artifacts/download"
expect(subject[:keep_path]) expect(subject[:keep_path])
.to include "jobs/#{build.id}/artifacts/keep" .to include "jobs/#{job.id}/artifacts/keep"
expect(subject[:browse_path]) expect(subject[:browse_path])
.to include "jobs/#{build.id}/artifacts/browse" .to include "jobs/#{job.id}/artifacts/browse"
end end
end 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