Commit Graph

19 Commits

Author SHA1 Message Date
GitLab Bot 18a102a5b9 Add latest changes from gitlab-org/gitlab@master 2019-11-08 03:06:48 +00:00
GitLab Bot 8c8b94e711 Add latest changes from gitlab-org/gitlab@master 2019-10-07 21:07:54 +00:00
Ash McKenzie 124bad7bd8
Use stub_rails_env for Rails.env stubbing
RailsHelpers.stub_rails_env takes care of
stubbing Rails.env
2019-09-05 12:54:03 +10:00
Stan Hu 3d8d394c97 Merge branch '13988-add-rails-helpers' into 'master'
Add new RailsHelpers module for specs

Closes #66688

See merge request gitlab-org/gitlab-ce!32309
2019-09-03 16:38:08 +00:00
Ash McKenzie 19ff9d9899
Replace rails_helper.rb with spec_helper.rb
rails_helper.rb's only logic was to require
spec_helper.rb.
2019-08-30 12:26:18 +10:00
Ash McKenzie d5dc50392d
Use new RailsHelpers module 2019-08-28 12:01:44 +10:00
lmcandrew e48305c02c EE backport to CE of favicon_spec.rb 2019-05-13 13:23:04 +01:00
Shinya Maeda c6bb038c00 Fix favicon spec 2018-10-02 17:08:12 +02:00
Douwe Maan f83f1db4bd
Read asset host from ActionController::Base instead of application config 2018-06-29 11:22:51 +02:00
Alexis Reigel b612670cc0 Fix: Serve favicon image always from the main GitLab domain to avoid issues with CORS 2018-06-20 14:00:13 +00:00
Douwe Maan 5fc3b8a08d
Remove FaviconUploader favicon_main version
See https://gitlab.com/gitlab-org/gitlab-ce/issues/47677 for more information
2018-06-15 12:28:23 +02:00
Rémy Coutable 0f90c1fd73
Don't use Rails.root.join for upload fixture paths
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-06-11 13:54:25 +02:00
Alexis Reigel 949c30d42b
remove all .ico favicon variations, use png always
the ci status icons are generated client side, wo we don't need the
static files anymore.
2018-06-05 16:20:22 +02:00
Alexis Reigel 9e14f437b6
create favicon overlay on the client
the initial reason for this change was that graphicsmagick does not
support writing to ico files. this fact lead to a chain of changes:

1. use png instead of ico (browser support is good enough)
2. render the overlays on the client using the canvas API. this way we
   only need to store the original favion and generate the overlay versions
   dynamically.
   this change also enables (next step) to simplify the handling of the
   stock favicons as well, as we don't need to generate all the versions
   upfront.
2018-06-05 16:20:21 +02:00
Alexis Reigel 67fe0a17d8
call Gitlab::Favicon.status in serializer
this ways we can keep the `lib/gitlab/ci/status/*` classes to return the
bare favicon name as it was before.

also the favicon uploader versions are now have the same names as the
stock favicons (+ `favicon_` prefix), which makes working with the
status names easier.
2018-06-05 16:20:21 +02:00
Alexis Reigel 40ffa8401b
add request store caching to favicon 2018-06-05 16:20:21 +02:00
Alexis Reigel 822023c64c
Add a '?' to the custom favicon's urls
Without the '?' at the end of the favicon url the custom favicon (i.e.
the favicons that are served through `UploadController`) are not shown
in the browser. It may have something to do with how `#send_file` /
`#send_data` set http headers. When serving the same icon file from the
public directory everything is fine.
2018-06-05 16:20:20 +02:00
Alexis Reigel 44d7b15833
use custom favicon for ci build status favicons 2018-06-05 16:20:19 +02:00
Alexis Reigel a6f3f6b8cd
extract favicon logic to lib class 2018-06-05 16:20:19 +02:00