summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2017-09-21 10:34:12 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-03 12:04:48 +0100
commit61864a5a5bb523953589c9398a431c4369fbfc76 (patch)
tree5eac32ef8155e9066d7d1488d7856e83605aa6a5 /lib/api/entities.rb
parent25df666156279e5b392b429519b4f4ba01eefaac (diff)
downloadgitlab-ce-61864a5a5bb523953589c9398a431c4369fbfc76.tar.gz
Rename Artifact to JobArtifact, split metadata out
Two things at ones, as there was no clean way to seperate the commit and give me feedback from the tests. But the model Artifact is now JobArtifact, and the table does not have a type anymore, but the metadata is now its own model: Ci::JobArtifactMetadata.
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 9eb2c98c436..0964bd98fbb 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -1006,13 +1006,9 @@ module API
expose :type, :url, :username, :password
end
- class ArtifactFile < Grape::Entity
- expose :filename, :size
- end
-
class Dependency < Grape::Entity
expose :id, :name, :token
- expose :artifacts_file, using: ArtifactFile, if: ->(job, _) { job.artifacts? }
+ expose :artifacts_file, using: JobArtifactFile, if: ->(job, _) { job.artifacts? }
end
class Response < Grape::Entity
@@ -1036,7 +1032,7 @@ module API
expose :steps, using: Step
expose :image, using: Image
expose :services, using: Service
- expose :artifacts_options, as: :artifacts, using: Artifacts
+ expose :artifacts, using: Artifacts
expose :cache, using: Cache
expose :credentials, using: Credentials
expose :dependencies, using: Dependency