font-awesome-sass 4.0.2 → 4.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6ad1ab856c67caf3605b0763be27cbe2854da3b
4
- data.tar.gz: fd4c2e8bb2ef057ae1774e69705c1e6a81b80b5d
3
+ metadata.gz: 96b3620e085f2ee618e5b57e44ce13c67b7167dc
4
+ data.tar.gz: 9cb2eb66b7211fd65f7c86bd105a29da258428c0
5
5
  SHA512:
6
- metadata.gz: a7d5a580854d64caa2ffd6da64f0cbc3053610be05fde05de7eb66f484983226da957b251892fd0ae759c141231f9c66736b22bd4c2dd7711bc19d13852fa944
7
- data.tar.gz: cf9dc067f40468f29aa52291f03405d09a820db150f83ae57900d7dd5b7fd37de2f802fa8510fbbbb059b55f4e729266aa2a862ad912b61ba07fe4c6efe3403a
6
+ metadata.gz: fe7a439d9d38a95512b8b57bde5ad857baf97e8d3ca8a4ef06727d07673deb9cd8ec4acc1efd3d0745ec67c84a6535c91e53228163f147c1b9f3af447bf93379
7
+ data.tar.gz: 61b5690489f806518c64c6797a4d42d3e1bb347d99aff711807f92234ba98629807e36bf69d362167ca908dab268dce0c899951ee1f8e0eedb0da80d8356a337
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Font::Awesome::Sass
2
2
 
3
- Font-Awesome SASS gem for use in Ruby/Rails projects
3
+ Font-Awesome SASS gem for use in Ruby projects
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,4 +18,35 @@ Or install it yourself as:
18
18
 
19
19
  If you use Rails/Sprockets, add this to e.g. application.css.scss:
20
20
 
21
- *= require font-awesome
21
+ *= require font-awesome
22
+
23
+ ## Upgrading from 3.*
24
+
25
+ Prepend the `fa` class to existing icons:
26
+
27
+ 3.* Syntax
28
+ <i class="icon-github"></i>
29
+
30
+ 4.* Syntax
31
+ <i class="fa fa-github"></i>
32
+
33
+ ## Rails Helper usage
34
+
35
+ In your view:
36
+
37
+ ```ruby
38
+ icon('flag')
39
+ # => <i class="fa fa-flag"></i>
40
+ ```
41
+
42
+ ```ruby
43
+ icon('flag', '', class: 'strong')
44
+ # => <i class="fa fa-flag strong"></i>
45
+ ```
46
+
47
+ ```ruby
48
+ icon('flag', 'Font Awesome', id: 'my-icon', class: 'strong')
49
+ # => <i id="my-icon" class="fa fa-flag strong"></i> Font Awesome
50
+ ```
51
+
52
+ Note: the icon helper can take a hash of options that will be passed to the content_tag helper
@@ -1,25 +1,28 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'font/awesome/sass/version'
4
+
5
+ require 'font_awesome/sass/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "font-awesome-sass"
8
- spec.version = Font::Awesome::Sass::VERSION
9
- spec.authors = ["Travis Chase"]
10
- spec.email = ["travis@travischase.me"]
11
- spec.description = "Font-Awesome SASS gem for use in Ruby/Rails projects"
12
- spec.summary = "Font-Awesome SASS"
13
- spec.homepage = "https://github.com/FortAwesome/font-awesome-sass"
14
- spec.license = "MIT"
8
+ spec.name = 'font-awesome-sass'
9
+ spec.version = FontAwesome::Sass::VERSION
10
+ spec.authors = ['Travis Chase']
11
+ spec.email = ['travis@travischase.me']
12
+ spec.description = 'Font-Awesome SASS gem for use in Ruby projects'
13
+ spec.summary = 'Font-Awesome SASS'
14
+ spec.homepage = 'https://github.com/FortAwesome/font-awesome-sass'
15
+ spec.license = 'MIT'
15
16
 
16
17
  spec.files = `git ls-files`.split($/)
17
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
+ spec.require_paths = ['lib']
20
21
 
21
- spec.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake"
22
+ spec.add_development_dependency 'bundler', '~> 1.3'
23
+ spec.add_development_dependency 'rake'
24
+ spec.add_development_dependency 'sass-rails'
25
+ spec.add_development_dependency 'compass'
23
26
 
24
- spec.add_runtime_dependency 'sass-rails', '>= 3.1.1'
27
+ spec.add_runtime_dependency 'sass', '~> 3.2'
25
28
  end
@@ -0,0 +1 @@
1
+ require 'font_awesome/sass'
@@ -0,0 +1,58 @@
1
+ module FontAwesome
2
+ module Sass
3
+ class << self
4
+ def load!
5
+ if rails?
6
+ register_rails_engine
7
+ end
8
+
9
+ if compass?
10
+ register_compass_extension
11
+ end
12
+ end
13
+
14
+ def gem_path
15
+ @gem_path ||= File.expand_path('..', File.dirname(__FILE__))
16
+ end
17
+
18
+ def stylesheets_path
19
+ File.join(assets_path, 'stylesheets')
20
+ end
21
+
22
+ def fonts_path
23
+ File.join(assets_path, 'fonts')
24
+ end
25
+
26
+ def assets_path
27
+ @assets_path ||= File.join(gem_path, 'vendor', 'assets')
28
+ end
29
+
30
+ def compass?
31
+ defined?(::Compass)
32
+ end
33
+
34
+ def rails?
35
+ defined?(::Rails)
36
+ end
37
+
38
+ private
39
+
40
+ def register_compass_extension
41
+ ::Compass::Frameworks.register(
42
+ 'font-awesome',
43
+ path: gem_path,
44
+ stylesheets_directory: stylesheets_path,
45
+ templates_directory: File.join(gem_path, 'templates')
46
+ )
47
+ end
48
+
49
+ def register_rails_engine
50
+ require 'sass-rails'
51
+ require 'font_awesome/sass/rails/engine'
52
+ require 'font_awesome/sass/rails/railtie'
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ FontAwesome::Sass.load!
@@ -1,6 +1,6 @@
1
- module Font
2
- module Awesome
3
- module Sass
1
+ module FontAwesome
2
+ module Sass
3
+ module Rails
4
4
  class Engine < ::Rails::Engine
5
5
  initializer 'font-awesome-sass.assets.precompile' do |app|
6
6
  app.config.assets.precompile += %w(
@@ -10,4 +10,4 @@ module Font
10
10
  end
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -0,0 +1,17 @@
1
+ module FontAwesome
2
+ module Sass
3
+ module Rails
4
+ module ViewHelpers
5
+ def icon(icon, text="", html_options={})
6
+ content_class = "fa fa-#{icon}"
7
+ content_class << " #{html_options[:class]}" if html_options.key?(:class)
8
+ html_options[:class] = content_class
9
+
10
+ html = content_tag(:i, nil, html_options)
11
+ html << " #{text}" unless text.blank?
12
+ html.html_safe
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ require "font_awesome/sass/rails/helpers"
2
+
3
+ module FontAwesome
4
+ module Sass
5
+ module Rails
6
+ class Railtie < ::Rails::Railtie
7
+ initializer "font-awesome-sass.view_helpers" do
8
+ ActionView::Base.send :include, ViewHelpers
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ module FontAwesome
2
+ module Sass
3
+ VERSION = '4.0.3'
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Font Awesome 4.0.1
2
+ * Font Awesome 4.0.3
3
3
  * the iconic font designed for Bootstrap
4
4
  * ------------------------------------------------------------------------------
5
5
  * The full suite of pictographic icons, examples, and documentation can be
@@ -21,9 +21,13 @@
21
21
  * ------------------------------------------------------------------------------
22
22
  * Email: dave@fontawesome.io
23
23
  * Twitter: http://twitter.com/davegandy
24
- * Work: Lead Product Designer @ Kyruus - http://kyruus.com
25
24
  */
26
25
 
26
+ //= depend_on_asset "fontawesome-webfont.eot"
27
+ //= depend_on_asset "fontawesome-webfont.svg"
28
+ //= depend_on_asset "fontawesome-webfont.ttf"
29
+ //= depend_on_asset "fontawesome-webfont.woff"
30
+
27
31
  @import "font-awesome/variables";
28
32
  @import "font-awesome/mixins";
29
33
  @import "font-awesome/path";
@@ -3,11 +3,11 @@
3
3
 
4
4
  @font-face {
5
5
  font-family: 'FontAwesome';
6
- src: font-url('fontawesome-webfont.eot?v=#{$fa-version}');
7
- src: font-url('fontawesome-webfont.eot?v=#{$fa-version}#iefix') format('embedded-opentype'),
8
- font-url('fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
9
- font-url('fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
10
- font-url('fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
6
+ src: url('./fontawesome-webfont.eot?v=#{$fa-version}');
7
+ src: url('./fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
8
+ url('./fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
9
+ url('./fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
10
+ url('./fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
11
11
  font-weight: normal;
12
12
  font-style: normal;
13
13
  }
@@ -1,7 +1,8 @@
1
1
  // Variables
2
2
  // --------------------------
3
+
3
4
  $fa-css-prefix: fa !default;
4
- $fa-version: "4.0.2" !default;
5
+ $fa-version: "4.0.3" !default;
5
6
  $fa-border-color: #eee !default;
6
7
  $fa-inverse: #fff !default;
7
8
  $fa-li-width: (30em / 14) !default;
@@ -375,4 +376,3 @@ $fa-var-wheelchair: "\f193";
375
376
  $fa-var-vimeo-square: "\f194";
376
377
  $fa-var-try: "\f195";
377
378
  $fa-var-plus-square-o: "\f196";
378
-
metadata CHANGED
@@ -1,73 +1,104 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: font-awesome-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Chase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-04 00:00:00.000000000 Z
11
+ date: 2014-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sass-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 3.1.1
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: compass
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sass
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.2'
48
76
  type: :runtime
49
77
  prerelease: false
50
78
  version_requirements: !ruby/object:Gem::Requirement
51
79
  requirements:
52
- - - '>='
80
+ - - "~>"
53
81
  - !ruby/object:Gem::Version
54
- version: 3.1.1
55
- description: Font-Awesome SASS gem for use in Ruby/Rails projects
82
+ version: '3.2'
83
+ description: Font-Awesome SASS gem for use in Ruby projects
56
84
  email:
57
85
  - travis@travischase.me
58
86
  executables: []
59
87
  extensions: []
60
88
  extra_rdoc_files: []
61
89
  files:
62
- - .gitignore
90
+ - ".gitignore"
63
91
  - Gemfile
64
92
  - LICENSE.txt
65
93
  - README.md
66
94
  - Rakefile
67
95
  - font-awesome-sass.gemspec
68
- - lib/font/awesome/sass.rb
69
- - lib/font/awesome/sass/engine.rb
70
- - lib/font/awesome/sass/version.rb
96
+ - lib/font-awesome-sass.rb
97
+ - lib/font_awesome/sass.rb
98
+ - lib/font_awesome/sass/rails/engine.rb
99
+ - lib/font_awesome/sass/rails/helpers.rb
100
+ - lib/font_awesome/sass/rails/railtie.rb
101
+ - lib/font_awesome/sass/version.rb
71
102
  - vendor/assets/fonts/fontawesome-webfont.eot
72
103
  - vendor/assets/fonts/fontawesome-webfont.svg
73
104
  - vendor/assets/fonts/fontawesome-webfont.ttf
@@ -97,17 +128,17 @@ require_paths:
97
128
  - lib
98
129
  required_ruby_version: !ruby/object:Gem::Requirement
99
130
  requirements:
100
- - - '>='
131
+ - - ">="
101
132
  - !ruby/object:Gem::Version
102
133
  version: '0'
103
134
  required_rubygems_version: !ruby/object:Gem::Requirement
104
135
  requirements:
105
- - - '>='
136
+ - - ">="
106
137
  - !ruby/object:Gem::Version
107
138
  version: '0'
108
139
  requirements: []
109
140
  rubyforge_project:
110
- rubygems_version: 2.0.5
141
+ rubygems_version: 2.2.0
111
142
  signing_key:
112
143
  specification_version: 4
113
144
  summary: Font-Awesome SASS
@@ -1,8 +0,0 @@
1
- module Font
2
- module Awesome
3
- module Sass
4
- require 'font/awesome/sass/engine'
5
- require 'font/awesome/sass/version'
6
- end
7
- end
8
- end
@@ -1,7 +0,0 @@
1
- module Font
2
- module Awesome
3
- module Sass
4
- VERSION = '4.0.2'
5
- end
6
- end
7
- end