fa_rails 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +2 -2
- data/README.md +5 -0
- data/fa_rails.gemspec +2 -2
- data/lib/fa/link.rb +11 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0f6887c46d0f92a78ad9719e221a5dce76b041174196b4ff082d8d0a69787d75
|
4
|
+
data.tar.gz: c51dc8d5a4ab551cd087590ee1a1c6e3b6c7cd7c70e085bb55240506f4d94378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c823cbb85144fa7592a28bbcc956af71a1b209cf9884c267c526e5927104ea2a0102449fd00b79bd4d1e4305872822f2854962c6859da6f05552cd12304ce541
|
7
|
+
data.tar.gz: d4cc61016056d8c863d7dc1bdd84a96d83987a67d59895713c1a092531c0c05a62f43cb53719ed90dc8da7c9ad0814213e3a8cf218bd1da671ec71a3bffa7863
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# FA Rails
|
2
2
|
|
3
|
+
[![Gem Version](https://img.shields.io/gem/v/fa_rails.svg)](https://rubygems.org/gems/fa_rails)
|
4
|
+
[![Build Status](https://travis-ci.org/jfiander/fa_rails.svg)](https://travis-ci.org/jfiander/fa_rails)
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/c5becd2d83b6de4b6392/maintainability)](https://codeclimate.com/github/jfiander/fa_rails/maintainability)
|
6
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/c5becd2d83b6de4b6392/test_coverage)](https://codeclimate.com/github/jfiander/fa_rails/test_coverage)
|
7
|
+
|
3
8
|
A quick helper for using FontAwesome icons in Rails.
|
4
9
|
|
5
10
|
## Installation
|
data/fa_rails.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'fa_rails'
|
3
|
-
s.version = '0.1.
|
4
|
-
s.date = '
|
3
|
+
s.version = '0.1.17'
|
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.'
|
7
7
|
s.homepage = 'http://rubygems.org/gems/fa_rails'
|
data/lib/fa/link.rb
CHANGED
@@ -4,9 +4,14 @@ module FA
|
|
4
4
|
# FontAwesome 5 (Pro) Helper for generating CDN links
|
5
5
|
class Link < FA::Base
|
6
6
|
# Outputs the CDN link.
|
7
|
-
def initialize(version
|
7
|
+
def initialize(version: nil, integrity: nil, kit: nil, pro: true)
|
8
|
+
unless (version && integrity) || kit
|
9
|
+
raise ArgumentError, 'Must specify version and integrity or kit.'
|
10
|
+
end
|
11
|
+
|
8
12
|
@version = version
|
9
13
|
@integrity = integrity
|
14
|
+
@kit = kit
|
10
15
|
@subdomain = pro ? 'pro' : 'use'
|
11
16
|
end
|
12
17
|
|
@@ -16,6 +21,11 @@ module FA
|
|
16
21
|
"integrity=\"#{@integrity}\" crossorigin=\"anonymous\">"
|
17
22
|
end
|
18
23
|
|
24
|
+
# Outputs the formatted kit link directly.
|
25
|
+
def kit
|
26
|
+
"<script src=\"https://kit.fontawesome.com/#{@kit}.js\"></script>"
|
27
|
+
end
|
28
|
+
|
19
29
|
private
|
20
30
|
|
21
31
|
def url
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fa_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Fiander
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.6
|
117
|
+
rubygems_version: 2.7.6
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: FontAwesome helper for Rails
|