cdn_asset_gem 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cdn_asset_gem/view/helpers.rb +3 -3
- 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: 8e826b34af0f54768a3fc98449ebc203a35d5cf34b39d6c2d484840bbf57e9a0
|
4
|
+
data.tar.gz: dab135468d131d9a781acd600ded2b942c6d74f6d4277fcc53e08488fa42992c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17c585a3c851ac6348b68b02cb6b9e041d24725c7dbb264431bf10c58d6654221d287c00c8dd34ee83ee37618c2793f907a18c33163131677d51c3739bee1289
|
7
|
+
data.tar.gz: 72042b3a19be3236cc302bdece4b66afccc0005ace2623286b99b41b826c00a7010b1534bd55b3707a1ea67684a944bfad0063ff984eb0e0993cd1ef4878fe6b
|
@@ -4,7 +4,7 @@ module CdnAssetGem
|
|
4
4
|
def map_asset(root_path: '', asset_name:, file_type:)
|
5
5
|
file = "#{file_type}/#{asset_name}.min.#{file_type}"
|
6
6
|
assets_path = if root_path.blank? || root_path == '/'
|
7
|
-
'
|
7
|
+
'assets'
|
8
8
|
else
|
9
9
|
"#{root_path}/assets"
|
10
10
|
end
|
@@ -14,7 +14,7 @@ module CdnAssetGem
|
|
14
14
|
if response.code == '200'
|
15
15
|
JSON.parse(response)
|
16
16
|
else
|
17
|
-
JSON.parse({})
|
17
|
+
JSON.parse("{}")
|
18
18
|
end
|
19
19
|
end
|
20
20
|
if manifest_hash[file]
|
@@ -22,7 +22,7 @@ module CdnAssetGem
|
|
22
22
|
else
|
23
23
|
"#{ENV['CDN_URL']}#{assets_path}/#{file}"
|
24
24
|
end
|
25
|
-
|
25
|
+
resuce StandardError => e
|
26
26
|
Rails.logger.error "CdnAssetGem Error: #{e}"
|
27
27
|
"#{ENV['CDN_URL']}#{assets_path}/#{file}"
|
28
28
|
end
|