avo-icons 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/avo/icons/helpers.rb +5 -3
- data/lib/avo/icons/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b84949f716999e68fe73d350aaee120b908f6d7889ae90e2246a5de47c222dc1
|
|
4
|
+
data.tar.gz: 64afa9fa3139f5d06c9dc845c83a40cac887b187bc19673c173f00c166edf4d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b662f095bfa176bc4caa035eaad2762061c31113b5ac21fbef6eda120a64fb33012a0c9f4833da6a00617e656d0a45ffb603300675f60ebaa49bbac06776b0f
|
|
7
|
+
data.tar.gz: fca7787df850948d9b574a594e24cd9e94521cbd8e29a1e143acfd24c0071ecd29d6fe91a35c6998c9f68dbeff4b4b38eef8df65a540e020dda5442372c60f2f
|
data/lib/avo/icons/helpers.rb
CHANGED
|
@@ -15,15 +15,17 @@ module Avo
|
|
|
15
15
|
|
|
16
16
|
# inline_svg reads the file and runs a Nokogiri transform on every call, so reuse the markup
|
|
17
17
|
# once code stops reloading. `aria: true` makes inline_svg generate random ids, which must differ per render.
|
|
18
|
-
return
|
|
18
|
+
return avo_icons_render_svg(file_name, **args) if !Rails.application.config.cache_classes || args[:aria]
|
|
19
19
|
|
|
20
20
|
# A copy, so a caller appending to the result cannot change the cached markup.
|
|
21
|
-
Avo::Icons.fetch_rendered_svg([ file_name, args ]) {
|
|
21
|
+
Avo::Icons.fetch_rendered_svg([ file_name, args ]) { avo_icons_render_svg(file_name, **args) }.dup
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
private
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
# Prefixed because view helpers share one namespace with the host app: Jumpstart Pro's
|
|
27
|
+
# ApplicationHelper ships a public `render_svg` that shadowed this one.
|
|
28
|
+
def avo_icons_render_svg(file_name, **args)
|
|
27
29
|
with_asset_finder(Avo::Icons::SvgFinder) do
|
|
28
30
|
inline_svg file_name, **args
|
|
29
31
|
end
|
data/lib/avo/icons/version.rb
CHANGED