bingo: serve real favicon files

The favicon was an emoji in a data: URI and /favicon.ico was a 404.
Google only shows a site icon in results when the favicon has a
crawlable URL, and the emoji looked different on every platform.

Add an SVG (a 5x5 card with a crossed-out diagonal), a 16/32/48 ICO
and a 180px apple-touch-icon under assets/bingo/, served by explicit
routes because public/ belongs to asxp.io.

Assisted-by: Claude:opus-5
This commit is contained in:
Sergei Poljanski 2026-10-10 09:27:44 +04:00
commit cb2eba1a26
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
6 changed files with 25 additions and 1 deletions

View file

@ -190,6 +190,17 @@ class BingoTest < Minitest::Test
assert_equal 'http://example.org/en?view=operational', last_response.location
end
def test_icons
{ '/favicon.svg' => 'image/svg+xml', '/favicon.ico' => 'image/x-icon',
'/apple-touch-icon.png' => 'image/png' }.each do |path, type|
get path
assert last_response.ok?, path
assert_equal type, last_response.content_type
end
get '/en'
assert_includes last_response.body, '<link rel="icon" href="/favicon.svg" type="image/svg+xml">'
end
def test_root_varies_on_language
get '/'
assert_equal 'Accept-Language', last_response.headers['Vary']