fa_rails 0.1.17 → 0.1.18

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
  SHA256:
3
- metadata.gz: 0f6887c46d0f92a78ad9719e221a5dce76b041174196b4ff082d8d0a69787d75
4
- data.tar.gz: c51dc8d5a4ab551cd087590ee1a1c6e3b6c7cd7c70e085bb55240506f4d94378
3
+ metadata.gz: 771f0170fa690c018158f89119397efc56702af5e02b94bb2627b0f6f2b4cab6
4
+ data.tar.gz: 2b5bef6128cd65714edaea480c8024c3f871a3d4c240d79eb008411afbfc0f2c
5
5
  SHA512:
6
- metadata.gz: c823cbb85144fa7592a28bbcc956af71a1b209cf9884c267c526e5927104ea2a0102449fd00b79bd4d1e4305872822f2854962c6859da6f05552cd12304ce541
7
- data.tar.gz: d4cc61016056d8c863d7dc1bdd84a96d83987a67d59895713c1a092531c0c05a62f43cb53719ed90dc8da7c9ad0814213e3a8cf218bd1da671ec71a3bffa7863
6
+ metadata.gz: 06bb529758d62780a54fcc01db8a94ae5bf71e12a4f5b936ff7a7c5198eb96d5ed0e31cc41f9690dba08a3010542ffbdeb7ac0661f2668b82404705b5eac8bbf
7
+ data.tar.gz: 605a8dfe7d36472432e87f99f55faab94e8e6012af8f0e52e448230126ad4ea537fc13fd6494b020c1e9b71bc19ea5d9193ab22444fb454b7db49347338107f2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fa_rails (0.1.17)
4
+ fa_rails (0.1.18)
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.17'
3
+ s.version = '0.1.18'
4
4
  s.date = '2019-07-29'
5
5
  s.summary = 'FontAwesome helper for Rails'
6
6
  s.description = 'A helper module for using FontAwesome icons in Rails.'
data/spec/lib/fa_spec.rb CHANGED
@@ -3,13 +3,28 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  RSpec.describe FA do
6
- it 'should generate the correct link tag' do
7
- tag = FA::Link.new(version: 'v0.1.2', integrity: 'sha384-abc', pro: true)
8
- expect(tag.safe).to eql(
9
- '<link rel="stylesheet" ' \
10
- 'href="https://pro.fontawesome.com/releases/v0.1.2/css/all.css" ' \
11
- 'integrity="sha384-abc" crossorigin="anonymous">'
12
- )
6
+ describe 'link' do
7
+ it 'should generate the correct link tag' do
8
+ tag = FA::Link.new(version: 'v0.1.2', integrity: 'sha384-abc', pro: true)
9
+ expect(tag.safe).to eql(
10
+ '<link rel="stylesheet" ' \
11
+ 'href="https://pro.fontawesome.com/releases/v0.1.2/css/all.css" ' \
12
+ 'integrity="sha384-abc" crossorigin="anonymous">'
13
+ )
14
+ end
15
+
16
+ it 'should generate the correct kit link tag' do
17
+ tag = FA::Link.new(kit: 'abcdefg', pro: true)
18
+ expect(tag.kit).to eql(
19
+ "<script src=\"https://kit.fontawesome.com/abcdefg.js\"></script>"
20
+ )
21
+ end
22
+
23
+ it 'should raise an ArgumentError if not initialized correctly' do
24
+ expect { FA::Link.new(version: 'v0.0.0', pro: true) }.to raise_error(
25
+ ArgumentError, 'Must specify version and integrity or kit.'
26
+ )
27
+ end
13
28
  end
14
29
 
15
30
  describe 'icon' do
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.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander