fa_rails 0.1.7 → 0.1.8

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: 4ac278955afe8bc5772e25b2806da5a0f1e7b7db
4
- data.tar.gz: e0b8550186a7cbdb50fd3dc6f91966eaec1a2e20
3
+ metadata.gz: a71da27d5e41f547a0ea3bb927e2502298953c5b
4
+ data.tar.gz: d31c7c2826192d37fb2a7b8d2ba584cbe7e8b233
5
5
  SHA512:
6
- metadata.gz: ab5cb1238034715484cf1aa1167b342e4118e0b4b5551a5efcd60e6829e63c7dd785e388cbc852fb52d5b2863e35fc6cd1fd02c2eb76247fad0cc0adf0b3f38e
7
- data.tar.gz: cbb80eb2e7e10643c3ef999738566a56cedb27dba5a018f44393df4b45a0a22f7ad1efdcd8276f57610765be1253d5e994ca059b0b11c0ac158bc3fd9ed82cb8
6
+ metadata.gz: 960520ac8dd74e2d81a4038aa367f6920f77924e0e9048c068177aaf22baff8e63fbb13d60f1b78e20a801ce1d93347a6e0fc5429aa2749941f6d1478d5a1be2
7
+ data.tar.gz: e702d5a2781d539d61a10fed7d64e06158e78eefb1c79f754dd35f523da99d415aa7cab5f78173f413abc2b07876b7c3f011289d552844fda75c6b6413fcabcc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fa_rails (0.1.7)
4
+ fa_rails (0.1.8)
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.7'
3
+ s.version = '0.1.8'
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
@@ -20,6 +20,9 @@ module FA
20
20
  icons.map do |icon|
21
21
  name = icon[:name]
22
22
  options = icon[:options] || {}
23
+ options[:size] ||= 1
24
+ options[:fa] = options[:fa].to_s
25
+ options[:fa] += " stack-#{options[:size]}x"
23
26
 
24
27
  if %i[counter text].include?(name.to_sym)
25
28
  parse_span(name, icon[:text], options)
@@ -35,7 +38,7 @@ module FA
35
38
  title = options[:title]
36
39
 
37
40
  @classes << "fa-#{name}"
38
- @classes << "fa-#{size_x(options[:size])}" if !!options[:size]
41
+ @classes << "fa-#{options[:size]}x"
39
42
  css = @classes.flatten.join(' ')
40
43
  transforms = @transforms.join(' ')
41
44
 
@@ -79,11 +82,6 @@ module FA
79
82
  end
80
83
  end
81
84
 
82
- def size_x(size)
83
- return '' unless !!size || size == 1
84
- "#{size}x"
85
- end
86
-
87
85
  def long_position(position)
88
86
  return 'top-right' if position == :tr
89
87
  return 'top-left' if position == :tl
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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander