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 +4 -4
- data/Gemfile.lock +1 -1
- data/fa_rails.gemspec +1 -1
- data/lib/fa/base.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c33ec94dc626c180aaa7587f6919e9359255b44a
|
4
|
+
data.tar.gz: 9f4c3f64315ad8558e14e00a3d51280e6b346374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d31c7603c4a274120b6e0e29713d909996f4836a10fdd020f723a3bd13532e86b46d9a2589ea7d0407d7502579b2cccd131993c5eab56b4b84d5e756538f8f02
|
7
|
+
data.tar.gz: 8361ed55763154d0cac06d3f724cd210fd8444d81fa79a995f08cceaa6ef4056da098aaa14076127845026bfa6b301c225704ccc635458abd81190eb05b6b2f2
|
data/Gemfile.lock
CHANGED
data/fa_rails.gemspec
CHANGED
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
|
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(
|
112
|
-
return
|
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
|