fa_rails 0.1.8 → 0.1.9

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: a71da27d5e41f547a0ea3bb927e2502298953c5b
4
- data.tar.gz: d31c7c2826192d37fb2a7b8d2ba584cbe7e8b233
3
+ metadata.gz: 7472a6957c0b16253da64467dd0678beda165eb6
4
+ data.tar.gz: f731108b740ad48d56cc8044126505da30569148
5
5
  SHA512:
6
- metadata.gz: 960520ac8dd74e2d81a4038aa367f6920f77924e0e9048c068177aaf22baff8e63fbb13d60f1b78e20a801ce1d93347a6e0fc5429aa2749941f6d1478d5a1be2
7
- data.tar.gz: e702d5a2781d539d61a10fed7d64e06158e78eefb1c79f754dd35f523da99d415aa7cab5f78173f413abc2b07876b7c3f011289d552844fda75c6b6413fcabcc
6
+ metadata.gz: f8996b4b9c69cbfa7391f848aaa8f4c166702c7a9baccb4c097bc8c0d18b694af33692c9663f065aece16765c7866d80352e033420c6ea80dced5ff3d13bb0b6
7
+ data.tar.gz: 4ecefd2bee7b8251ca00d393570e8b2e60b27e3c5e436ebb39fd0853c5650e298812538140f1daac2ce96725a0b67e2949dcece92f0c7f53f074ca3fd51ed6c5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fa_rails (0.1.8)
4
+ fa_rails (0.1.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/fa_rails.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'fa_rails'
3
- s.version = '0.1.8'
3
+ s.version = '0.1.9'
4
4
  s.date = '2018-07-30'
5
5
  s.summary = 'FontAwesome helper for Rails'
6
6
  s.description = 'A helper module for using FontAwesome icons in Rails.'
data/lib/fa/base.rb CHANGED
@@ -19,9 +19,7 @@ module FA
19
19
  def parse_all(icons)
20
20
  icons.map do |icon|
21
21
  name = icon[:name]
22
- options = icon[:options] || {}
23
- options[:size] ||= 1
24
- options[:fa] = options[:fa].to_s
22
+ options = fa_options(icon[:options])
25
23
  options[:fa] += " stack-#{options[:size]}x"
26
24
 
27
25
  if %i[counter text].include?(name.to_sym)
@@ -61,7 +59,7 @@ module FA
61
59
  end
62
60
 
63
61
  def fa_options(options)
64
- default = { style: :solid, css: '', fa: '' }
62
+ default = { style: :solid, css: '', fa: '', size: 1 }
65
63
 
66
64
  default.merge(options.to_h)
67
65
  end
@@ -95,7 +93,7 @@ module FA
95
93
  end
96
94
 
97
95
  def parse_classes(options)
98
- @classes = []
96
+ @classes = ['fa']
99
97
  @classes << parse_style(options[:style])
100
98
  @classes << options[:fa].to_s.split(' ').map { |c| "fa-#{c}" }
101
99
  @classes << options[:css].to_s.split(' ')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fa_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander