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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c7b6338945f6103c543294c5092f971aefadbaf5
4
- data.tar.gz: 47431b632c78c64e3a43bde2a0e9eef9da9306ea
2
+ SHA256:
3
+ metadata.gz: 0f6887c46d0f92a78ad9719e221a5dce76b041174196b4ff082d8d0a69787d75
4
+ data.tar.gz: c51dc8d5a4ab551cd087590ee1a1c6e3b6c7cd7c70e085bb55240506f4d94378
5
5
  SHA512:
6
- metadata.gz: 01426ce80e975e5974b4031705d4c8fedae1c589c4ecfba3d8bc5e87b496e51d19ac1f649da5afda774d439c10325f17f3cc4b2ec8fa2c822d65efa20e5229fe
7
- data.tar.gz: 85e33837b2a86ffaa71c54322807e080c327d3b1e8985d10ec12f69eacaf2b79c5b8c5414563dde574683147436d1389be0250bd94bf838bb528489c6f53e098
6
+ metadata.gz: c823cbb85144fa7592a28bbcc956af71a1b209cf9884c267c526e5927104ea2a0102449fd00b79bd4d1e4305872822f2854962c6859da6f05552cd12304ce541
7
+ data.tar.gz: d4cc61016056d8c863d7dc1bdd84a96d83987a67d59895713c1a092531c0c05a62f43cb53719ed90dc8da7c9ad0814213e3a8cf218bd1da671ec71a3bffa7863
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fa_rails (0.1.15)
4
+ fa_rails (0.1.17)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -39,4 +39,4 @@ DEPENDENCIES
39
39
  simplecov (~> 0.15, >= 0.15.1)
40
40
 
41
41
  BUNDLED WITH
42
- 1.16.0
42
+ 1.17.3
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
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'fa_rails'
3
- s.version = '0.1.16'
4
- s.date = '2018-10-11'
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'
@@ -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:, integrity:, pro: true)
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.16
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: 2018-10-11 00:00:00.000000000 Z
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.11
117
+ rubygems_version: 2.7.6
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: FontAwesome helper for Rails