summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-06-27 12:57:05 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-06-27 12:57:05 +0100
commit8887c2457f25edab81887a09cf45ed68c9a53656 (patch)
tree6652b806c3efa98e74971e6158694bc02b222629
parented31624970323c13326c3bfc1e154fa4938c5a6d (diff)
downloadgitlab-ce-8887c2457f25edab81887a09cf45ed68c9a53656.tar.gz
Added canary conditional to status_entity.rb
-rw-r--r--app/serializers/status_entity.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/serializers/status_entity.rb b/app/serializers/status_entity.rb
index 3e40ecf1c1c..1338068068a 100644
--- a/app/serializers/status_entity.rb
+++ b/app/serializers/status_entity.rb
@@ -8,7 +8,12 @@ class StatusEntity < Grape::Entity
expose :favicon do |status|
dir = 'ci_favicons'
- dir = File.join(dir, 'dev') if Rails.env.development?
+
+ if ENV['CANARY']
+ dir = File.join(dir, 'canary')
+ elsif Rails.env.development?
+ dir = File.join(dir, 'dev')
+ end
ActionController::Base.helpers.image_path(File.join(dir, "#{status.favicon}.ico"))
end