agilibox 1.3.3 → 1.3.4

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: 30086edced3407acf9dc08bb62a7820bbd14a6fcf38b4be4e148d8f21047bcda
4
- data.tar.gz: dc9f63647ee47417c9f5744114b2d5ef435c86976c5f34bfb3798cde7c8a9b54
3
+ metadata.gz: 1a9379230e4aad6c54c0d2d50e8817e44b06b0b96e2c21a69bbc954f304e577d
4
+ data.tar.gz: 0a585a25d2957a902b3ba8148860ccb13bbd5d90d37f318fbea93efafce9a023
5
5
  SHA512:
6
- metadata.gz: 6c5fcfadfc02c65eb4e9705e87b25ccc8f3ddbef25667689c1f41f19c3f086904257b61ee9271af27df2ba1a914c1b20902a858b9b12b2e8ae031a6b7658ae73
7
- data.tar.gz: cef1fc2b07fa2c4336aafb4d8e0f028ee4405170478f9dd9406e1d2a86cf16f0f389dfa793782ac97e39660f734b2f423b7501dd8cf072e93cfe1ebf3aa0c252
6
+ metadata.gz: 156b0dc96de93996f93687a907e0f591a3401c3a4732f43ce85a3f1dd6494e814a2e2a9abb4dc0cc7f35b5024ee5d9287f23571702f23331d61257851508f0b6
7
+ data.tar.gz: 3b7c85f43f220f855c357167d2987418d79e22b71e2fb8a98b5e0dab9937fa5b637dfa67f2d3e874471e723fef2c62acf75524f3454095cf46d4adcb16cb7f23
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 1.3.4
6
+
7
+ - Support FontAwesome v4
8
+
5
9
  ## 1.3.3
6
10
 
7
11
  - Fix error messages
@@ -3,7 +3,7 @@ module Agilibox::FontAwesomeHelper
3
3
  id = id.to_s.tr("_", "-").to_sym
4
4
 
5
5
  if fa_style.nil?
6
- fa_style = Agilibox::FontAwesomeHelper.database.dig(id, :styles).to_a.first
6
+ fa_style = Agilibox::FontAwesomeHelper.default_fa_style_for_id(id)
7
7
  end
8
8
 
9
9
  css_classes = options.delete(:class).to_s.split(" ")
@@ -43,5 +43,15 @@ module Agilibox::FontAwesomeHelper
43
43
  require "font_awesome/sass/version"
44
44
  FontAwesome::Sass::VERSION
45
45
  end
46
+
47
+ def default_fa_style_for_id(id)
48
+ return if version.start_with?("4")
49
+
50
+ if version.start_with?("5")
51
+ return Agilibox::FontAwesomeHelper.database.dig(id, :styles).to_a.first
52
+ end
53
+
54
+ raise "invalid font-awesome-sass version"
55
+ end
46
56
  end # class << self
47
57
  end
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.3.3"
2
+ VERSION = "1.3.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilibox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-02 00:00:00.000000000 Z
11
+ date: 2018-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n