summaryrefslogtreecommitdiff
path: root/lib/api/job_artifacts.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /lib/api/job_artifacts.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'lib/api/job_artifacts.rb')
-rw-r--r--lib/api/job_artifacts.rb56
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/api/job_artifacts.rb b/lib/api/job_artifacts.rb
index 933bd067e26..d100f2c431a 100644
--- a/lib/api/job_artifacts.rb
+++ b/lib/api/job_artifacts.rb
@@ -12,19 +12,19 @@ module API
end
params do
- requires :id, type: String, desc: 'The ID of a project'
+ requires :id, type: String, desc: "The ID of a project"
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
- desc 'Download the artifacts archive from a job' do
- detail 'This feature was introduced in GitLab 8.10'
+ desc "Download the artifacts archive from a job" do
+ detail "This feature was introduced in GitLab 8.10"
end
params do
- requires :ref_name, type: String, desc: 'The ref from repository'
- requires :job, type: String, desc: 'The name for the job'
+ requires :ref_name, type: String, desc: "The ref from repository"
+ requires :job, type: String, desc: "The name for the job"
end
route_setting :authentication, job_token_allowed: true
- get ':id/jobs/artifacts/:ref_name/download',
- requirements: { ref_name: /.+/ } do
+ get ":id/jobs/artifacts/:ref_name/download",
+ requirements: {ref_name: /.+/} do
authorize_download_artifacts!
latest_build = user_project.latest_successful_build_for!(params[:job], params[:ref_name])
@@ -32,37 +32,37 @@ module API
present_carrierwave_file!(latest_build.artifacts_file)
end
- desc 'Download a specific file from artifacts archive from a ref' do
- detail 'This feature was introduced in GitLab 11.5'
+ desc "Download a specific file from artifacts archive from a ref" do
+ detail "This feature was introduced in GitLab 11.5"
end
params do
- requires :ref_name, type: String, desc: 'The ref from repository'
- requires :job, type: String, desc: 'The name for the job'
- requires :artifact_path, type: String, desc: 'Artifact path'
+ requires :ref_name, type: String, desc: "The ref from repository"
+ requires :job, type: String, desc: "The name for the job"
+ requires :artifact_path, type: String, desc: "Artifact path"
end
- get ':id/jobs/artifacts/:ref_name/raw/*artifact_path',
- format: false,
- requirements: { ref_name: /.+/ } do
+ get ":id/jobs/artifacts/:ref_name/raw/*artifact_path",
+ format: false,
+ requirements: {ref_name: /.+/} do
authorize_download_artifacts!
build = user_project.latest_successful_build_for!(params[:job], params[:ref_name])
path = Gitlab::Ci::Build::Artifacts::Path
- .new(params[:artifact_path])
+ .new(params[:artifact_path])
bad_request! unless path.valid?
send_artifacts_entry(build, path)
end
- desc 'Download the artifacts archive from a job' do
- detail 'This feature was introduced in GitLab 8.5'
+ desc "Download the artifacts archive from a job" do
+ detail "This feature was introduced in GitLab 8.5"
end
params do
- requires :job_id, type: Integer, desc: 'The ID of a job'
+ requires :job_id, type: Integer, desc: "The ID of a job"
end
route_setting :authentication, job_token_allowed: true
- get ':id/jobs/:job_id/artifacts' do
+ get ":id/jobs/:job_id/artifacts" do
authorize_download_artifacts!
build = find_build!(params[:job_id])
@@ -70,14 +70,14 @@ module API
present_carrierwave_file!(build.artifacts_file)
end
- desc 'Download a specific file from artifacts archive' do
- detail 'This feature was introduced in GitLab 10.0'
+ desc "Download a specific file from artifacts archive" do
+ detail "This feature was introduced in GitLab 10.0"
end
params do
- requires :job_id, type: Integer, desc: 'The ID of a job'
- requires :artifact_path, type: String, desc: 'Artifact path'
+ requires :job_id, type: Integer, desc: "The ID of a job"
+ requires :artifact_path, type: String, desc: "Artifact path"
end
- get ':id/jobs/:job_id/artifacts/*artifact_path', format: false do
+ get ":id/jobs/:job_id/artifacts/*artifact_path", format: false do
authorize_read_builds!
build = find_build!(params[:job_id])
@@ -91,13 +91,13 @@ module API
send_artifacts_entry(build, path)
end
- desc 'Keep the artifacts to prevent them from being deleted' do
+ desc "Keep the artifacts to prevent them from being deleted" do
success Entities::Job
end
params do
- requires :job_id, type: Integer, desc: 'The ID of a job'
+ requires :job_id, type: Integer, desc: "The ID of a job"
end
- post ':id/jobs/:job_id/artifacts/keep' do
+ post ":id/jobs/:job_id/artifacts/keep" do
authorize_update_builds!
build = find_build!(params[:job_id])