Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2015-12-28 14:06:27 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 14:48:14 +0300
commit5ff7ec42dc8759717c485478261128d61ea70b9a (patch)
tree68a30bc4a0b967de057d0f5e7160cce3d38b1e90 /app/models/ci/build.rb
parent8eeed761a9c25ea8ccfc347fbd3f5894b5957d9e (diff)
Add method that checks if artifacts browser is supported
This is needed because of backward compatibility. Previously artifacts archive had `.tar.gz` format, but artifacts browser requires ZIP format now.
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 327114e0350..1506e957b3c 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -339,6 +339,12 @@ module Ci
artifacts?
end
+ def artifacts_browser_supported?
+ # TODO, since carrierwave 0.10.0 we will be able to check mime type here
+ #
+ artifacts? && artifacts_file.path.end_with?('zip')
+ end
+
def artifacts_metadata(path)
[]
end