flag-icons-rails 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -20
- data/lib/flag-icons-rails/rails/engine.rb +2 -2
- data/lib/flag-icons-rails/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7593b3d81b7ed32bafd7ba5110098905b546be15
|
4
|
+
data.tar.gz: 702d584ea1ff1d990f756a498d5a6be76a05433e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e62cd2b7ae2d2e0331d05da0fc79e6d4f9219341518909dddca1bfa46222c21bdcdb3557c8e4759d0b6d330cfaf3092a1686cbf50390e8d8e85b1a699c916ad
|
7
|
+
data.tar.gz: d919089313887ac74e3ed07d68201d1fdfaa95ecd229d47f312862a3c51eece6fd528c8d3751ded263399d063b777fa868bd1e3f92b3d07a9898d3d89fb537b7
|
data/README.md
CHANGED
@@ -1,62 +1,74 @@
|
|
1
|
-
|
1
|
+
flag-icons-rails [![Gem Version](http://img.shields.io/gem/v/flag-icons-rails.svg)](https://rubygems.org/gems/flag-icons-rails) [![Gem Downloads](http://ruby-gem-downloads-badge.herokuapp.com/flag-icons-rails)](https://rubygems.org/gems/flag-icons-rails) [![Code Climate](https://codeclimate.com/github/eugenegarl/flag-icons-rails/badges/gpa.svg)](https://codeclimate.com/github/eugenegarl/flag-icons-rails)
|
2
2
|
---
|
3
|
-
|
4
|
-
This project integrates [https://github.com/lipis/flag-icon-css](https://github.com/lipis/flag-icon-css) in a Ruby Gem but only the sass version.
|
5
|
-
|
6
|
-
**THIS GEM IS IN EARLY BETA STATE SO USE AT YOUR OWN RISK**
|
3
|
+
**flag-icons-rails** provides [flag-icon-css](https://github.com/lipis/flag-icon-css) - a collection of all country flags in SVG - as a Ruby gem for use with the asset pipeline.
|
7
4
|
|
8
5
|
### Installation
|
9
6
|
|
10
|
-
|
7
|
+
Add this to your Gemfile:
|
11
8
|
|
12
9
|
```ruby
|
13
10
|
gem 'flag-icons-rails'
|
14
11
|
```
|
15
12
|
|
16
|
-
|
13
|
+
and then execute:
|
17
14
|
|
18
15
|
```sh
|
19
16
|
bundle install
|
20
17
|
```
|
21
18
|
|
22
|
-
|
19
|
+
Do not add gem to `assets` section if you want to use [ `flag_icon` rails helper](#rails-helper-usage).
|
20
|
+
|
21
|
+
### Usage
|
22
|
+
|
23
|
+
In your `application.css`, include the file:
|
24
|
+
|
25
|
+
```css
|
26
|
+
/*
|
27
|
+
*= require flag-icon
|
28
|
+
*/
|
29
|
+
```
|
30
|
+
|
31
|
+
If you prefer [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
|
32
|
+
`application.scss` file:
|
23
33
|
|
24
34
|
```scss
|
25
35
|
@import "flag-icon";
|
26
36
|
```
|
27
37
|
|
28
|
-
|
38
|
+
Then restart your webserver if it was previously running.
|
39
|
+
|
40
|
+
### Plain usage
|
29
41
|
|
30
42
|
In your view:
|
31
43
|
|
32
44
|
```html
|
33
|
-
<span class="flag-icon flag-icon-
|
45
|
+
<span class="flag-icon flag-icon-by"></span>
|
34
46
|
```
|
35
47
|
|
36
48
|
```html
|
37
|
-
<span class="flag-icon flag-icon-
|
49
|
+
<span class="flag-icon flag-icon-by flag-icon-squared"></span>
|
38
50
|
```
|
39
51
|
|
40
|
-
|
52
|
+
### Rails Helper usage
|
41
53
|
|
42
54
|
In your view:
|
43
55
|
|
44
56
|
```ruby
|
45
|
-
flag_icon(:
|
46
|
-
# => <span class="flag-icon flag-icon-
|
57
|
+
flag_icon(:by)
|
58
|
+
# => <span class="flag-icon flag-icon-by"></span>
|
47
59
|
```
|
48
60
|
|
49
61
|
```ruby
|
50
|
-
flag_icon(:
|
51
|
-
# => <span class="flag-icon flag-icon-
|
62
|
+
flag_icon(:by, true)
|
63
|
+
# => <span class="flag-icon flag-icon-by flag-icon-squared"></span>
|
52
64
|
```
|
53
65
|
|
54
66
|
```ruby
|
55
|
-
flag_icon(:
|
56
|
-
# => <span id="my-flag" class="flag-icon flag-icon-
|
67
|
+
flag_icon(:by, id: 'my-flag', class: 'strong')
|
68
|
+
# => <span id="my-flag" class="flag-icon flag-icon-by flag-icon-squared strong"></span>
|
57
69
|
```
|
58
70
|
|
59
71
|
### Thanks
|
60
72
|
|
61
|
-
* [
|
62
|
-
* [flag-icon-sass
|
73
|
+
* **lipis** for amazing collection of all country flags [flags-icon-css](https://github.com/lipis/flag-icon-css)
|
74
|
+
* **cfiorini** for [flag-icon-sass](https://github.com/cfiorini/flag-icon-sass) gem this one is based on
|
@@ -2,8 +2,8 @@ module FlagIconsRails
|
|
2
2
|
module Rails
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
initializer 'flag-icons-rails.assets.precompile' do |app|
|
5
|
-
|
6
|
-
app.config.assets.paths <<
|
5
|
+
%w(stylesheets images).each do |sub|
|
6
|
+
app.config.assets.paths << root.join('app', 'assets', sub).to_s
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flag-icons-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugene Garlukovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -573,9 +573,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
573
573
|
version: '0'
|
574
574
|
requirements: []
|
575
575
|
rubyforge_project:
|
576
|
-
rubygems_version: 2.4.
|
576
|
+
rubygems_version: 2.4.8
|
577
577
|
signing_key:
|
578
578
|
specification_version: 4
|
579
579
|
summary: flag-icon-css sass gem for use in Ruby/Rails projects
|
580
580
|
test_files: []
|
581
|
-
has_rdoc:
|