fa_rails 0.1.10 → 0.1.11

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: 82d003e079e13327fe482fcd9a5c38479f0fd436
4
- data.tar.gz: b53a22724dfdd2021c5c2396e044a806e120dd9d
3
+ metadata.gz: cee37f3a2f313e0ad5099e14bf1d8fdbbbb80a85
4
+ data.tar.gz: 8a9f56c7fedebcb6e1d23fb46614508367d68e28
5
5
  SHA512:
6
- metadata.gz: 8cdfa4a8e1dc98e23868fd25fa5113bd77b9df5fb1ab294c1a116d676e89faac68a8eb94fd9178a4edbece88e2961cb40003b816441769a61b5f5410b3e020db
7
- data.tar.gz: b1bea20bae359fb74f7db2bb9bd62a8085287787996916f90ae4a2a89eb93a77f9a134d87e1e3c206449cb4fa4712db867d6d18b36711c118b4fd2ff8979df94
6
+ metadata.gz: 3bd3d12012947890a51f66c04a791039dba0678983ce27bc2cdc60322849afee34aeb2a9f54f710a48063c5c553e753ca69cc71c66c4d3e028b041575c2f6397
7
+ data.tar.gz: fd4de4291e86822b1d3a74a6677a97e64af65a6cc03eb3b05d1b82dc76b5da677bdb1a87ad70444d0097a612807692e4f5188b2dd2bbb5a9372f0c9ab334eae7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fa_rails (0.1.10)
4
+ fa_rails (0.1.11)
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.10'
3
+ s.version = '0.1.11'
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
@@ -93,7 +93,7 @@ module FA
93
93
  end
94
94
 
95
95
  def parse_classes(options)
96
- @classes = ['fa']
96
+ @classes = []
97
97
  @classes << parse_style(options[:style])
98
98
  @classes << options[:fa].to_s.split(' ').map { |c| "fa-#{c}" }
99
99
  @classes << options[:css].to_s.split(' ')
data/spec/lib/fa_spec.rb CHANGED
@@ -15,18 +15,18 @@ RSpec.describe FA do
15
15
  describe 'icon' do
16
16
  it 'should generate the correct icon from a string or symbol name' do
17
17
  expect(FA::Icon.new('help').safe).to eql(
18
- "<i class='fa fas fa-help fa-1x' data-fa-transform='' title=''></i>"
18
+ "<i class='fas fa-help fa-1x' data-fa-transform='' title=''></i>"
19
19
  )
20
20
 
21
21
  expect(FA::Icon.new(:help).safe).to eql(
22
- "<i class='fa fas fa-help fa-1x' data-fa-transform='' title=''></i>"
22
+ "<i class='fas fa-help fa-1x' data-fa-transform='' title=''></i>"
23
23
  )
24
24
  end
25
25
 
26
26
  it 'should generate the correct icon from a configuration hash' do
27
27
  fa = { name: 'help', options: { style: :light, size: 2 } }
28
28
  expect(FA::Icon.new(fa).safe).to eql(
29
- "<i class='fa fal fa-help fa-2x' data-fa-transform='' title=''></i>"
29
+ "<i class='fal fa-help fa-2x' data-fa-transform='' title=''></i>"
30
30
  )
31
31
  end
32
32
 
@@ -40,7 +40,7 @@ RSpec.describe FA do
40
40
 
41
41
  it 'should generate the correct brand icon' do
42
42
  expect(FA::Icon.new(:github, style: :brands).safe).to eql(
43
- "<i class='fa fab fa-github fa-1x' data-fa-transform='' title=''></i>"
43
+ "<i class='fab fa-github fa-1x' data-fa-transform='' title=''></i>"
44
44
  )
45
45
  end
46
46
  end
@@ -55,9 +55,9 @@ RSpec.describe FA do
55
55
 
56
56
  expect(FA::Layer.new(icons, grow: 2).safe).to eql(
57
57
  "<span class='icon fa-layers fa-stack fa-fw ' title=''>" \
58
- "<i class='fa fas fa-stack-1x fa-square fa-1x' data-fa-transform='grow-2' title=''></i>" \
59
- "<i class='fa fas fa-stack-1x fa-circle fa-1x' data-fa-transform='grow-3' title=''></i>" \
60
- "<i class='fa far fa-stack-1x fa-exclamation fa-1x' data-fa-transform='grow-2' title=''>" \
58
+ "<i class='fas fa-stack-1x fa-square fa-1x' data-fa-transform='grow-2' title=''></i>" \
59
+ "<i class='fas fa-stack-1x fa-circle fa-1x' data-fa-transform='grow-3' title=''></i>" \
60
+ "<i class='far fa-stack-1x fa-exclamation fa-1x' data-fa-transform='grow-2' title=''>" \
61
61
  '</i></span>'
62
62
  )
63
63
  end
@@ -70,8 +70,8 @@ RSpec.describe FA do
70
70
 
71
71
  expect(FA::Layer.new(icons).safe).to eql(
72
72
  "<span class='icon fa-layers fa-stack fa-fw ' title=''>" \
73
- "<i class='fa fas fa-stack-1x fa-square fa-1x' data-fa-transform='grow-0' title=''></i>" \
74
- "<span class='fa fa-stack-1x fa-layers-counter fa-layers-top-left' " \
73
+ "<i class='fas fa-stack-1x fa-square fa-1x' data-fa-transform='grow-0' title=''></i>" \
74
+ "<span class='fa-stack-1x fa-layers-counter fa-layers-top-left' " \
75
75
  "data-fa-transform='grow-0'>17</span></span>"
76
76
  )
77
77
  end
@@ -80,14 +80,14 @@ RSpec.describe FA do
80
80
  describe 'span' do
81
81
  it 'should generate the correct span from a string or symbol type' do
82
82
  expect(FA::Span.new(:text, 'Hello').safe).to eql(
83
- "<span class='fa fa-layers-text ' data-fa-transform=''>Hello</span>"
83
+ "<span class='fa-layers-text ' data-fa-transform=''>Hello</span>"
84
84
  )
85
85
  end
86
86
 
87
87
  it 'should generate the correct span from a configuration hash' do
88
88
  span = { type: :text, text: 'World', options: { position: :bl } }
89
89
  expect(FA::Span.new(span).safe).to eql(
90
- "<span class='fa fa-layers-text fa-layers-bottom-left' " \
90
+ "<span class='fa-layers-text fa-layers-bottom-left' " \
91
91
  "data-fa-transform=''>World</span>"
92
92
  )
93
93
  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.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander