fa_rails 0.1.9 → 0.1.10
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 +4 -4
- data/Gemfile.lock +1 -1
- data/fa_rails.gemspec +1 -1
- data/spec/lib/fa_spec.rb +11 -11
- 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: 82d003e079e13327fe482fcd9a5c38479f0fd436
|
|
4
|
+
data.tar.gz: b53a22724dfdd2021c5c2396e044a806e120dd9d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cdfa4a8e1dc98e23868fd25fa5113bd77b9df5fb1ab294c1a116d676e89faac68a8eb94fd9178a4edbece88e2961cb40003b816441769a61b5f5410b3e020db
|
|
7
|
+
data.tar.gz: b1bea20bae359fb74f7db2bb9bd62a8085287787996916f90ae4a2a89eb93a77f9a134d87e1e3c206449cb4fa4712db867d6d18b36711c118b4fd2ff8979df94
|
data/Gemfile.lock
CHANGED
data/fa_rails.gemspec
CHANGED
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='fas fa-help' data-fa-transform='' title=''></i>"
|
|
18
|
+
"<i class='fa 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='fas fa-help' data-fa-transform='' title=''></i>"
|
|
22
|
+
"<i class='fa 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='fal fa-help fa-2x' data-fa-transform='' title=''></i>"
|
|
29
|
+
"<i class='fa 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='fab fa-github' data-fa-transform='' title=''></i>"
|
|
43
|
+
"<i class='fa 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='fas fa-square' data-fa-transform='grow-2' title=''></i>" \
|
|
59
|
-
"<i class='fas fa-circle' data-fa-transform='grow-3' title=''></i>" \
|
|
60
|
-
"<i class='far fa-exclamation' data-fa-transform='grow-2' 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=''>" \
|
|
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='fas fa-square' data-fa-transform='grow-0' title=''></i>" \
|
|
74
|
-
"<span class='fa-layers-counter fa-layers-top-left' " \
|
|
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' " \
|
|
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-layers-text ' data-fa-transform=''>Hello</span>"
|
|
83
|
+
"<span class='fa 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-layers-text fa-layers-bottom-left' " \
|
|
90
|
+
"<span class='fa fa-layers-text fa-layers-bottom-left' " \
|
|
91
91
|
"data-fa-transform=''>World</span>"
|
|
92
92
|
)
|
|
93
93
|
end
|