font-awesome-rails 3.2.0.0 → 4.7.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZGVhMjg1Njc1ODRjNWE2NjU2NWI0Mzg1NWVlYjE5NTJhMjlmODY2NA==
5
- data.tar.gz: !binary |-
6
- ODBlYTllMGZjODU3OTQ4Y2M2ZmUyNDA1MjcxYmE1YmZhZGJkNDZjMg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NDcxYjVkY2ZlZWRkNmVjY2ZkNmVjZjYxMmI2MGU1YzY0MWY2YTA5ZmI1NjEy
10
- ZTk0ZmE2YTViYmZlN2YwZDMwNDNmYmEzOTIwMTZkNjcwNGQ2ZjYxYTdjYWZh
11
- ZGYzMzEzMzFkN2RmOGYxMDcwYTNkZmM2OGY5OWVhYzI2NDkyMWM=
12
- data.tar.gz: !binary |-
13
- NjFhYzhkN2FhYzZiYWRkNmRiNTk1NGU2NTJhNDZjMzc4ZTQ3YjY1NjczNjM1
14
- NjQxNWE1NjdiYzg2NTllMWEzZDdmZjQzODFiZjA1ZTE2NWU2NDIyNjVmYTQ2
15
- ZTU5MDZlMjhhNjIyNzM5MGFlODMwNDgzODMzYWVjM2NkOTUyZTc=
2
+ SHA256:
3
+ metadata.gz: '080d3193ebf3f975f4e6b969da8bda96beac39c5c9bfc1866607b72534517221'
4
+ data.tar.gz: 6551767e3713086b24d58ba291f5ffe6d2cb948b2ffb7dc5dee774cb1a6fd04f
5
+ SHA512:
6
+ metadata.gz: d487678b52ad1381c3c1d5e8efb2c87d8c5e30a4e3dae68757f6f8329186b28e616d3f8787d35556bd1df69e011b73ef2ca495211b1d8686abf95f37abf15dff
7
+ data.tar.gz: 75860a618f4fb7ee56370a8b7ecf839d729e1e0902ba8ca7ae0181b12229485966a320b7191b562fa5d1ac35ab42af663b3586024c7c740a82678ddf9309eecf
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 bokmann
1
+ Copyright (c) 2012-2017 bokmann
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # font-awesome-rails [![Gem Version](https://badge.fury.io/rb/font-awesome-rails.png)](http://badge.fury.io/rb/font-awesome-rails) [![Build Status](https://secure.travis-ci.org/bokmann/font-awesome-rails.png)](http://travis-ci.org/bokmann/font-awesome-rails)
1
+ # font-awesome-rails
2
+
3
+ [![Gem Version](http://img.shields.io/gem/v/font-awesome-rails.svg)](https://rubygems.org/gems/font-awesome-rails)
4
+ [![Build Status](https://github.com/bokmann/font-awesome-rails/workflows/CI/badge.svg)](https://github.com/bokmann/font-awesome-rails/actions?query=workflow%3ACI)
5
+ [![Gem Downloads](https://img.shields.io/gem/dt/font-awesome-rails.svg)](https://rubygems.org/gems/font-awesome-rails)
2
6
 
3
7
  font-awesome-rails provides the
4
8
  [Font-Awesome](http://fortawesome.github.com/Font-Awesome/) web fonts and
@@ -23,13 +27,14 @@ In your `application.css`, include the css file:
23
27
  *= require font-awesome
24
28
  */
25
29
  ```
30
+ Then restart your webserver if it was previously running.
26
31
 
27
32
  Congrats! You now have scalable vector icon support. Pick an icon and check out the
28
33
  [FontAwesome Examples](http://fortawesome.github.io/Font-Awesome/examples/).
29
34
 
30
35
  ### Sass Support
31
36
 
32
- If you prefer [SCSS](http://sass-lang.com/docs.html), add this to your
37
+ If you prefer [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
33
38
  `application.css.scss` file:
34
39
 
35
40
  ```scss
@@ -44,74 +49,107 @@ add this to your `application.css.sass` file:
44
49
  @import font-awesome
45
50
  ```
46
51
 
47
- ### IE7 Support
52
+ ### Helpers
48
53
 
49
- If you must support IE7, use a
50
- [conditional comment](http://en.wikipedia.org/wiki/Conditional_comment) to
51
- provide the `font-awesome-ie7.min.css` stylesheet to Internet Explorer.
54
+ There are also some helpers (`fa_icon` and `fa_stacked_icon`) that make your
55
+ views _icontastic!_
52
56
 
53
- ```rhtml
54
- <!--[if lt IE 8]>
55
- <%= stylesheet_link_tag "font-awesome-ie7.min.css", media: "all" %>
56
- <![endif]-->
57
- ```
57
+ ```ruby
58
+ fa_icon "camera-retro"
59
+ # => <i class="fa fa-camera-retro"></i>
58
60
 
59
- In haml, that would look like:
61
+ fa_icon "camera-retro", text: "Take a photo"
62
+ # => <i class="fa fa-camera-retro"></i> Take a photo
60
63
 
61
- ```haml
62
- /[if lt IE 8]
63
- = stylesheet_link_tag "font-awesome-ie7.min.css", media: "all"
64
- ```
64
+ fa_icon "chevron-right", text: "Get started", right: true
65
+ # => Get started <i class="fa fa-chevron-right"></i>
65
66
 
66
- Either way, Make sure that `font-awesome-ie7.min.css` is part of `config.assets.precompile` in your `environments/production.rb`.
67
+ fa_icon "quote-left 4x", class: "text-muted pull-left"
68
+ # => <i class="fa fa-quote-left fa-4x text-muted pull-left"></i>
67
69
 
68
- ```ruby
69
- config.assets.precompile += %w( font-awesome-ie7.min.css )
70
+ content_tag(:li, fa_icon("check li", text: "Bulleted list item"))
71
+ # => <li><i class="fa fa-check fa-li"></i> Bulleted list item</li>
70
72
  ```
71
73
 
72
- Alternatively, if you already have a CSS file provided by a conditional
73
- comment (say, `application-ie.css`), you can include the ie7 styleshet in
74
- that:
74
+ ```ruby
75
+ fa_stacked_icon "twitter", base: "square-o"
76
+ # => <span class="fa-stack">
77
+ # => <i class="fa fa-square-o fa-stack-2x"></i>
78
+ # => <i class="fa fa-twitter fa-stack-1x"></i>
79
+ # => </span>
80
+
81
+ fa_stacked_icon "dollar inverse", base: "circle", class: "fa-5x"
82
+ # => <span class="fa-stack fa-5x">
83
+ # => <i class="fa fa-circle fa-stack-2x"></i>
84
+ # => <i class="fa fa-dollar fa-inverse fa-stack-1x"></i>
85
+ # => </span>
86
+
87
+ fa_stacked_icon "terminal inverse", base: "square", class: "pull-right", text: "Hi!"
88
+ # => <span class="fa-stack pull-right">
89
+ # => <i class="fa fa-square fa-stack-2x"></i>
90
+ # => <i class="fa fa-terminal fa-inverse fa-stack-1x"></i>
91
+ # => </span> Hi!
75
92
 
76
- ```css
77
- /*
78
- *= require font-awesome-ie7.min
79
- */
80
93
  ```
81
94
 
82
- ## Changes
83
-
84
- | Version | FontAwesome SHA1 | Notes / Other additions |
85
- |---------+------------------+---------------------------------------------------------------------------|
86
- | 0.1.0 | 378b2d7 | Simplest packaging as a gem as possible |
87
- | 0.2.0 | 563a6f3 | Repackaged after their new release |
88
- | 0.2.1 | 563a6f3 | Forgot I had patched the css to reflect the font assetified location. |
89
- | 0.3.0 | (unknown) | (sorry, will make sure that doesn't happen again) |
90
- | 0.4.0 | 05e5e5b | Pullup request to 2.0 release of font-awesome |
91
- | 0.5.0 | contrib | (christhekeele) Attempt to prepare request to 3.0 release of font-awesome |
92
- | 3.0.1.0 | 7d173f2 | 3.0.1 release (bug fixes and alignment improvements) |
93
- | 3.0.2.0 | 13d5dd3 | 3.0.2 release (better IE7 rendering) |
94
- | 3.1.0.0 | a4612d8 | 3.1.0 release (new icons) |
95
- | 3.1.1.0 | 949a765 | 3.1.1 release (icon fixes) |
96
- | 3.1.1.1 | 949a765 | asset_path -> font_path usage; Now requires Rails >= 3.2. |
97
- | 3.1.1.2 | 949a765 | vendor/assets -> app/assets; Improved Rails 4 support |
98
- | 3.1.1.3 | 949a765 | repackaged gem; cleaned out extraneous files |
99
- | 3.2.0.0 | a9065a1 | 3.2.0 release (new icons |
100
-
101
- **note on version 0.2.0**: FontAwesome now includes scss and sass files, but
102
- when I used them instead of the plain ol css file included in the project, it
103
- wanted some compass libraries. I'm a fan of compass, but including an entire
104
- tool like that in order to generate a @font_face tag seems a little much... I
105
- don't want this gem to require compass for such a trivial thing, so we are
106
- staying on the vanilla css file for now.
107
-
108
- **Running on Rails 3.1?** Make sure to use version 3.1.1.0 or earlier.
95
+ ## Misc
96
+
97
+ ### Rails engines
98
+
99
+ When building a Rails engine that includes font-awesome-rails as a dependency,
100
+ be sure to `require "font-awesome-rails"` somewhere during the initialization of
101
+ your engine. Otherwise, Rails will not automatically pick up the load path of
102
+ the font-awesome-rails assets and helpers ([source 1](https://github.com/bokmann/font-awesome-rails/issues/130#issuecomment-95308175), [source 2](https://bibwild.wordpress.com/2013/02/27/gem-depends-on-rails-engine-gem-gotcha-need-explicit-require/), [source 3](http://stackoverflow.com/questions/5159607/rails-engine-gems-dependencies-how-to-load-them-into-the-application/5850503#5850503)).
103
+
104
+ ### Deploying to sub-folders
105
+
106
+ It is sometimes the case that deploying a Rails application to a production
107
+ environment requires the application to be hosted at a sub-folder on the server.
108
+ This may be the case, for example, if Apache HTTPD or Nginx is being used as a
109
+ front-end proxy server, with Rails handling only requests that come in to a sub-folder
110
+ such as `http://example.com/myrailsapp`. In this case, the
111
+ FontAwesome gem (and other asset-serving engines) needs to know the sub-folder,
112
+ otherwise you can experience a problem roughly described as ["my app works
113
+ fine in development, but fails when I deploy
114
+ it"](https://github.com/bokmann/font-awesome-rails/issues/74).
115
+
116
+ To fix this, set the *relative URL root* for the application. In the
117
+ environment file for the deployed version of the app, for example
118
+ `config/environments/production.rb`,
119
+ set the config option `action_controller.relative_url_root`:
120
+
121
+ MyApp::Application.configure do
122
+ ...
123
+
124
+ # set the relative root, because we're deploying to /myrailsapp
125
+ config.action_controller.relative_url_root = "/myrailsapp"
126
+
127
+ ...
128
+ end
129
+
130
+ The default value of this variable is taken from `ENV['RAILS_RELATIVE_URL_ROOT']`,
131
+ so configuring the environment to define `RAILS_RELATIVE_URL_ROOT` is an alternative strategy.
132
+
133
+ In addition you need to indicate the subfolder when you *precompile* the assets:
134
+
135
+ RAILS_ENV=production bundle exec rake assets:precompile RAILS_RELATIVE_URL_ROOT=/myrailsapp
136
+
137
+ ### Rails 3.2
138
+
139
+ **Note:** In Rails 3.2, make sure font-awesome-rails is outside the bundler asset group
140
+ so that these helpers are automatically loaded in production environments.
141
+
142
+ ## Versioning
143
+
144
+ Versioning follows the core releases of Font-Awesome which follows Semantic
145
+ Versioning 2.0 as defined at <http://semver.org>. We will do our best not to
146
+ make any breaking changes until Font-Awesome core makes a major version bump.
109
147
 
110
148
  ## License
111
149
 
112
- * The [Font Awesome](http://fortawesome.github.com/Font-Awesome) font is
150
+ * The [Font Awesome](http://fortawesome.github.io/Font-Awesome) font is
113
151
  licensed under the [SIL Open Font License](http://scripts.sil.org/OFL).
114
- * [Font Awesome](http://fortawesome.github.com/Font-Awesome) CSS files are
152
+ * [Font Awesome](http://fortawesome.github.io/Font-Awesome) CSS files are
115
153
  licensed under the
116
154
  [MIT License](http://opensource.org/licenses/mit-license.html).
117
155
  * The remainder of the font-awesome-rails project is licensed under the
Binary file