fuse 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ require 'thin'
3
3
 
4
4
  module Fuse
5
5
 
6
- VERSION = '0.1.6'
6
+ VERSION = '0.1.7'
7
7
 
8
8
  LOG_COLOURS = {
9
9
  info: 6, # cyan
@@ -37,6 +37,13 @@ class Fuse::Document
37
37
  title.children = Nokogiri::XML::Text.new(@options[:title], document)
38
38
  end
39
39
 
40
+ #add favicon
41
+ assets.of_type(Fuse::Document::Asset::Image).select{ |a| a.path.match %r`\bfavicon\.\w+$` }.each do |asset|
42
+ head << link = Nokogiri::XML::Node.new('link', document)
43
+ link['rel'] = 'shortcut icon'
44
+ link['href'] = asset.relative_path
45
+ end
46
+
40
47
  #attach stylesheets and scripts
41
48
  [Fuse::Document::Asset::StyleSheet, Fuse::Document::Asset::JavaScript].each do |klass|
42
49
  collection = assets.of_type(klass).sort!
@@ -5,6 +5,12 @@ require 'uglifier'
5
5
  class Fuse::Document::Asset
6
6
 
7
7
  class Image < self
8
+ MIME_TYPES = {
9
+ ico: 'image/x-icon'
10
+ }
11
+ def type
12
+ MIME_TYPES[extension.to_sym] || super
13
+ end
8
14
  end
9
15
 
10
16
  class Xml < self
@@ -27,6 +33,7 @@ class Fuse::Document::Asset
27
33
  png: Image,
28
34
  gif: Image,
29
35
  svg: Image,
36
+ ico: Image,
30
37
  ttf: Font,
31
38
  woff: Font,
32
39
  eot: Font,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-11 00:00:00.000000000 Z
12
+ date: 2013-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thin