flag-icons-rails 1.1.1 → 1.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aca36b552d69e96b87566ecab1a75fed5f8da298
4
- data.tar.gz: 2bb615162324dfdbe18963a236c7be7645a142ff
3
+ metadata.gz: 7593b3d81b7ed32bafd7ba5110098905b546be15
4
+ data.tar.gz: 702d584ea1ff1d990f756a498d5a6be76a05433e
5
5
  SHA512:
6
- metadata.gz: cdfeff79318bcd653e369525ba95f3221ea2c57658fa9fa7da8517cc04986346a39e2717fdfeab13335568571f27536015ade2647cd53e4a34ddfc9394326d4a
7
- data.tar.gz: bc134ac1b4ecbc39a1b1559057cef00f660a94fda5613765e1f1c90dd8fc6da52f4d35e5f46b1bfb1005f3a2ff5f8886097b8f5de6b3a11a8c60ef40c3edd990
6
+ metadata.gz: 9e62cd2b7ae2d2e0331d05da0fc79e6d4f9219341518909dddca1bfa46222c21bdcdb3557c8e4759d0b6d330cfaf3092a1686cbf50390e8d8e85b1a699c916ad
7
+ data.tar.gz: d919089313887ac74e3ed07d68201d1fdfaa95ecd229d47f312862a3c51eece6fd528c8d3751ded263399d063b777fa868bd1e3f92b3d07a9898d3d89fb537b7
data/README.md CHANGED
@@ -1,62 +1,74 @@
1
- FlagIconsRails
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
- In your Gemfile include:
7
+ Add this to your Gemfile:
11
8
 
12
9
  ```ruby
13
10
  gem 'flag-icons-rails'
14
11
  ```
15
12
 
16
- And then execute:
13
+ and then execute:
17
14
 
18
15
  ```sh
19
16
  bundle install
20
17
  ```
21
18
 
22
- Import the FlagIconsRails styles in your `app/assets/stylesheets/application.scss`.
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
- #### Plain usage
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-it"></span>
45
+ <span class="flag-icon flag-icon-by"></span>
34
46
  ```
35
47
 
36
48
  ```html
37
- <span class="flag-icon flag-icon-it flag-icon-squared"></span>
49
+ <span class="flag-icon flag-icon-by flag-icon-squared"></span>
38
50
  ```
39
51
 
40
- #### Rails Helper usage
52
+ ### Rails Helper usage
41
53
 
42
54
  In your view:
43
55
 
44
56
  ```ruby
45
- flag_icon(:it)
46
- # => <span class="flag-icon flag-icon-it"></span>
57
+ flag_icon(:by)
58
+ # => <span class="flag-icon flag-icon-by"></span>
47
59
  ```
48
60
 
49
61
  ```ruby
50
- flag_icon(:it, true)
51
- # => <span class="flag-icon flag-icon-it flag-icon-squared"></span>
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(:it, id: 'my-flag', class: 'strong')
56
- # => <span id="my-flag" class="flag-icon flag-icon-it flag-icon-squared strong"></span>
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
- * [lipis/flag-icon-css](https://github.com/lipis/flag-icon-css) for flags-icon-css
62
- * [flag-icon-sass gem](https://github.com/cfiorini/flag-icon-sass) for gem this one is based on
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
- Dir.glob("#{root}/app/assets/images/flags/**/").each do |path|
6
- app.config.assets.paths << path
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
@@ -1,4 +1,4 @@
1
1
  module FlagIconsRails
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.1.2'.freeze
3
3
  FLAG_ICONS_CSS_VERSION = '1.1.0'.freeze
4
4
  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.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-10 00:00:00.000000000 Z
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.6
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: