diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-10 21:45:06 +0200 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-13 11:09:19 +0100 |
commit | 421be01dabb13cd1f45d0118b4e1be9d33baef61 (patch) | |
tree | f886bfcadb224a9c8d7cc28ed77ec918e3052f29 /lib | |
parent | 9281709b41ce5be5637194cda191a6dd76ddd495 (diff) | |
download | gitlab-ce-421be01dabb13cd1f45d0118b4e1be9d33baef61.tar.gz |
Improve design based on review
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/builds.rb | 5 | ||||
-rw-r--r-- | lib/ci/api/entities.rb | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb index 704654e9e8c..644e5a2a99d 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -167,10 +167,11 @@ module API user_can_download_artifacts: can?(current_user, :download_build_artifacts, user_project) end - # Keep the artifacts to prevent them to be deleted + # Keep the artifacts to prevent them from being deleted # # Parameters: - # id (required) - The ID of a build + # id (required) - the id of a project + # build_id (required) - The ID of a build # Example Request: # POST /projects/:id/builds/:build_id/artifacts/keep post ':id/builds/:build_id/artifacts/keep' do diff --git a/lib/ci/api/entities.rb b/lib/ci/api/entities.rb index 352d92e7cc0..3f5bdaba3f5 100644 --- a/lib/ci/api/entities.rb +++ b/lib/ci/api/entities.rb @@ -20,7 +20,7 @@ module Ci expose :name, :token, :stage expose :project_id expose :project_name - expose :artifacts_file, using: ArtifactFile, if: lambda { |build, opts| build.artifacts? } + expose :artifacts_file, using: ArtifactFile, if: ->(build, _) { build.artifacts? } end class BuildDetails < Build @@ -29,7 +29,7 @@ module Ci expose :before_sha expose :allow_git_fetch expose :token - expose :artifacts_expire_at, if: lambda { |build, opts| build.artifacts? } + expose :artifacts_expire_at, if: ->(build, _) { build.artifacts? } expose :options do |model| model.options |