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 +4 -4
- data/Gemfile.lock +1 -1
- data/fa_rails.gemspec +1 -1
- data/lib/fa/base.rb +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: cee37f3a2f313e0ad5099e14bf1d8fdbbbb80a85
|
4
|
+
data.tar.gz: 8a9f56c7fedebcb6e1d23fb46614508367d68e28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bd3d12012947890a51f66c04a791039dba0678983ce27bc2cdc60322849afee34aeb2a9f54f710a48063c5c553e753ca69cc71c66c4d3e028b041575c2f6397
|
7
|
+
data.tar.gz: fd4de4291e86822b1d3a74a6677a97e64af65a6cc03eb3b05d1b82dc76b5da677bdb1a87ad70444d0097a612807692e4f5188b2dd2bbb5a9372f0c9ab334eae7
|
data/Gemfile.lock
CHANGED
data/fa_rails.gemspec
CHANGED
data/lib/fa/base.rb
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='
|
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='
|
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='
|
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='
|
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='
|
59
|
-
"<i class='
|
60
|
-
"<i class='
|
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='
|
74
|
-
"<span class='fa
|
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
|
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
|
90
|
+
"<span class='fa-layers-text fa-layers-bottom-left' " \
|
91
91
|
"data-fa-transform=''>World</span>"
|
92
92
|
)
|
93
93
|
end
|