Merge branch 'add-tanuki-ci-status-favicons' into 'master'
updated to new favicons Closes #12818 See merge request !10923
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -7,6 +7,9 @@ class StatusEntity < Grape::Entity
|
|||
expose :details_path
|
||||
|
||||
expose :favicon do |status|
|
||||
ActionController::Base.helpers.image_path(File.join('ci_favicons', "#{status.favicon}.ico"))
|
||||
dir = 'ci_favicons'
|
||||
dir = File.join(dir, 'dev') if Rails.env.development?
|
||||
|
||||
ActionController::Base.helpers.image_path(File.join(dir, "#{status.favicon}.ico"))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Updated CI status favicons to include the tanuki
|
||||
merge_request: 10923
|
||||
author:
|
|
@ -18,6 +18,12 @@ describe StatusEntity do
|
|||
it 'contains status details' do
|
||||
expect(subject).to include :text, :icon, :favicon, :label, :group
|
||||
expect(subject).to include :has_details, :details_path
|
||||
expect(subject[:favicon]).to eq('/assets/ci_favicons/favicon_status_success.ico')
|
||||
end
|
||||
|
||||
it 'contains a dev namespaced favicon if dev env' do
|
||||
allow(Rails.env).to receive(:development?) { true }
|
||||
expect(entity.as_json[:favicon]).to eq('/assets/ci_favicons/dev/favicon_status_success.ico')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|