fa_rails 0.1.11 → 0.1.12

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: cee37f3a2f313e0ad5099e14bf1d8fdbbbb80a85
4
- data.tar.gz: 8a9f56c7fedebcb6e1d23fb46614508367d68e28
3
+ metadata.gz: c33ec94dc626c180aaa7587f6919e9359255b44a
4
+ data.tar.gz: 9f4c3f64315ad8558e14e00a3d51280e6b346374
5
5
  SHA512:
6
- metadata.gz: 3bd3d12012947890a51f66c04a791039dba0678983ce27bc2cdc60322849afee34aeb2a9f54f710a48063c5c553e753ca69cc71c66c4d3e028b041575c2f6397
7
- data.tar.gz: fd4de4291e86822b1d3a74a6677a97e64af65a6cc03eb3b05d1b82dc76b5da677bdb1a87ad70444d0097a612807692e4f5188b2dd2bbb5a9372f0c9ab334eae7
6
+ metadata.gz: d31c7603c4a274120b6e0e29713d909996f4836a10fdd020f723a3bd13532e86b46d9a2589ea7d0407d7502579b2cccd131993c5eab56b4b84d5e756538f8f02
7
+ data.tar.gz: 8361ed55763154d0cac06d3f724cd210fd8444d81fa79a995f08cceaa6ef4056da098aaa14076127845026bfa6b301c225704ccc635458abd81190eb05b6b2f2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fa_rails (0.1.11)
4
+ fa_rails (0.1.12)
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.11'
3
+ s.version = '0.1.12'
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
@@ -94,7 +94,7 @@ module FA
94
94
 
95
95
  def parse_classes(options)
96
96
  @classes = []
97
- @classes << parse_style(options[:style])
97
+ @classes << parse_style(options)
98
98
  @classes << options[:fa].to_s.split(' ').map { |c| "fa-#{c}" }
99
99
  @classes << options[:css].to_s.split(' ')
100
100
  end
@@ -108,10 +108,11 @@ module FA
108
108
  end
109
109
  end
110
110
 
111
- def parse_style(style)
112
- return 'fas' unless %i[solid regular light brands].include?(style)
111
+ def parse_style(options)
112
+ return if options[:css].to_s.match?(/fa[srlb]/)
113
+ return 'fas' unless %i[solid regular light brands].include?(options[:style])
113
114
 
114
- 'fa' + { solid: 's', regular: 'r', light: 'l', brands: 'b' }[style]
115
+ 'fa' + { solid: 's', regular: 'r', light: 'l', brands: 'b' }[options[:style]]
115
116
  end
116
117
  end
117
118
  end
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.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander