basicons_helper 1.0.1 → 1.0.3

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: 53ba6c0eb9657b42c513c5ed5034d8e19251247fa32cb4d04f187b2060cf690c
4
- data.tar.gz: 52ec8ddb8ae8038d1b99f052c1a69f19eb3b50778750c6b548c992b1a6541acb
3
+ metadata.gz: 33a3ec7ba6282059f05e75a7845ad53e30924e2e2194453317c4093bc072ad10
4
+ data.tar.gz: becbde3eabc7bd202ab6a25fc492d5b398a87c88423056f26169b99c4d3a2530
5
5
  SHA512:
6
- metadata.gz: fdde2fd90485b897aed6e0b612e7295d52e64bd6d756704c18f6d2683275f2f800f5a3b8b64815f806c9d2015c4338d40477cf2f9aab56a3087dce16c483d61a
7
- data.tar.gz: b62a521cf7d512ec77895f58096c1c47d1f8fdf2c4b1467992d420dd22a98cf83889eaa424c604b4471caaa10a3919de851c9b830be83642b688f0885520dd2b
6
+ metadata.gz: a6f1a604b846b5d10b579dd05cc796ca7bf52dba8349a1065cecbbeeb13bc89662fa8bd44fabd71b20e82a8be484b5d7e300d58771a91e792444047a99631ced
7
+ data.tar.gz: 5a1f700394e1ff3c6d31ac3a51316b146de8b9151f5b4bf35ed912556b1b8ac472d8ace7f91f7cd545a71399e108f7ccd705eb67f05ae6a875b472ce231693a3
@@ -8,16 +8,14 @@ module BasiconsHelper
8
8
  def basicon(symbol, options = {})
9
9
  return '' if symbol.nil?
10
10
  cache_key = [symbol, options]
11
+
12
+ if tag = basicons_helper_cache[cache_key]
13
+ tag
14
+ else
15
+ icon = Basicons::Basicon.new(symbol, options)
16
+ tag = content_tag(:svg, icon.data.html_safe, icon.options).freeze
17
+ basicons_helper_cache[cache_key] = tag
18
+ tag
19
+ end
11
20
  end
12
21
  end
13
-
14
- # if tag = [octicons]_helper_cache[cache_key]
15
- # tag
16
- # else
17
- # icon = [Octicons]::Octicon.new(symbol, options)
18
-
19
- # tag = content_tag(:svg, icon.path.html_safe, icon.options).freeze # rubocop:disable Rails/OutputSafety
20
- # [octicons]_helper_cache[cache_key] = tag
21
- # tag
22
- # end
23
- # end
@@ -1,3 +1,3 @@
1
1
  module BasiconsHelper
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basicons_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
- - basicons's authors
7
+ - Basicons Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-07 00:00:00.000000000 Z
11
+ date: 2023-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: basicons
@@ -84,5 +84,5 @@ requirements: []
84
84
  rubygems_version: 3.1.2
85
85
  signing_key:
86
86
  specification_version: 4
87
- summary: Basicons rails helper
87
+ summary: Rails basicons helper
88
88
  test_files: []