geoblacklight 2.2.0 → 2.2.1

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: 2e86b617570869dbc3c775eb976b97679793dc85ba5cd797f19b16a59fa02bee
4
- data.tar.gz: 94dece60e2e52021b97650cae502e54da61aa64bc78007d573776d8e5ad78dd3
3
+ metadata.gz: 4ab935fd48ab2b28973a24d5f5c4fccc9ef1d67174108270c02d3fa07e4aca57
4
+ data.tar.gz: ef8b40ef25477de5c2ed4ef18dd9df95da1ad8fd2887190dc103462e39df00da
5
5
  SHA512:
6
- metadata.gz: eb756f21ba28b1adfaa255b689fc2e89a46f8774ccc01f8325369345901ecda7fc3c77ee8e2a67bc9cf2dae7630b9454983a2faad468be5f2ba49bfacbb14b6e
7
- data.tar.gz: 1600f20ab23b02e28573380d2210bab55e8cdc1c3e3039e019cf4b223b3278716185d148d77acf341033df5a2f920e746458ce58dc456b8a8f459192f390d2a5
6
+ metadata.gz: f943750b581ee558dfc1ce54e3534790c731e962b2b6c2f3e9f990dff3b4e30a54f22a440464fbf33039fd820408c663c432a7626838e814868d63df861e7765
7
+ data.tar.gz: '086a56ad83e6ab1e82b36943f4212adbac1899b12f4f464bce5a788a7df3f9f38f0279f675c4726e88ad5fe6a9bff19ce486e92b213b19ea3a6bb3fc4d1236f9'
@@ -86,21 +86,16 @@ module GeoblacklightHelper
86
86
  # @return [SVG or HTML tag]
87
87
  def geoblacklight_icon(name)
88
88
  icon_name = name ? name.to_s.parameterize : 'none'
89
- if asset_exists?(icon_name)
89
+ begin
90
+ icon = blacklight_icon(icon_name)
91
+ # Add icon info to queue after icon instantiated successfully
90
92
  queue_icon_aria_label(icon_name)
91
- blacklight_icon(icon_name)
92
- else
93
- render_empty_span('icon-missing geoblacklight-none')
93
+ icon
94
+ rescue Blacklight::Exceptions::IconNotFound
95
+ tag.span class: 'icon-missing geoblacklight-none'
94
96
  end
95
97
  end
96
98
 
97
- ##
98
- # Checks if an asset file exists
99
- # @return [Boolean]
100
- def asset_exists?(path)
101
- Rails.application.assets.resolve("blacklight/#{path}").present?
102
- end
103
-
104
99
  ##
105
100
  # Render an empty span
106
101
  # @return [HTML tag]
@@ -1,3 +1,3 @@
1
1
  module Geoblacklight
2
- VERSION = '2.2.0'.freeze
2
+ VERSION = '2.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2019-08-09 00:00:00.000000000 Z
14
+ date: 2019-08-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails