-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0827a33
commit 2d452b9
Showing
33 changed files
with
150 additions
and
17 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<% environment.context_class.instance_eval { include ApplicationHelper } %> | ||
<browserconfig> | ||
<msapplication> | ||
<tile> | ||
<square70x70logo src="<%= namespaced_png_favicon_path('mstile',70) %>"/> | ||
<square150x150logo src="<%= namespaced_png_favicon_path('mstile',150) %>"/> | ||
<square310x310logo src="<%= namespaced_png_favicon_path('mstile',310) %>"/> | ||
<wide310x150logo src="<%= favicon_path('mstile-310x150.png') %>"/> | ||
<TileColor>#da532c</TileColor> | ||
</tile> | ||
</msapplication> | ||
</browserconfig> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
require 'test_helper' | ||
|
||
class ApplicationHelperTest < ActionView::TestCase | ||
include ApplicationHelper | ||
|
||
setup do | ||
@namespace = 'android-chrome' | ||
@dimension = 96 | ||
@assets_version = Rails.application.config.assets.version | ||
@path = "/images/logos/favicons/#{@namespace}-#{dimensions(@dimension)}.png?v=" << @assets_version | ||
@rel = 'icon' | ||
end | ||
|
||
test 'should return dimensions' do | ||
assert_equal('96x96', dimensions(@dimension)) | ||
end | ||
|
||
test "should return a favicon's path" do | ||
file = 'test.png' | ||
path = "/images/logos/favicons/#{file}?v=" << @assets_version | ||
|
||
assert_equal(path, favicon_path(file)) | ||
end | ||
|
||
test 'should return favicon attributes' do | ||
assert_equal({rel: @rel, type: 'image/png'}, favicon_attrs(@rel)) | ||
end | ||
|
||
test 'should return favicon attributes for a given type' do | ||
rel = 'mask-icon' | ||
type = 'image/svg+xml' | ||
|
||
assert_equal({rel: rel, type: type}, favicon_attrs(rel, type)) | ||
end | ||
|
||
test "should return a namespaced png favicon's path" do | ||
assert_equal(@path, namespaced_png_favicon_path(@namespace, @dimension)) | ||
end | ||
|
||
test "should return a namespaced png favicon's link tag" do | ||
favicon_link_tag = "<link rel=\"#{@rel}\" type=\"image/png\" href=\"" << @path << "\" sizes=\"#{dimensions(@dimension)}\" />" | ||
|
||
assert_equal(favicon_link_tag, namespaced_png_favicon_link_tag(@namespace, @dimension, @rel)) | ||
end | ||
end |