cdn_asset_gem 1.0.18 → 1.0.19
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 +4 -4
- 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: 02b3f05099f3aff40dfe874521f72473553fa39ecdece2d6399c60bc748406ee
|
4
|
+
data.tar.gz: c0d69e3c3c32e5e226145310eb441969d7c8ecda46201835d8b759150afa465b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 309d91900d35f9a386b293883967bf8ced5a199748af4a2171ce19cd0620a6adf60b6d448bf3a5abb30c7330fbfbc9acbc7742f229f088a7f916118659ea697f
|
7
|
+
data.tar.gz: 84031529f8ff8a9e324b967d5af72645a4e85ebbe3345afb09aa2a2dc78bec8551f4abe06f9f44fc6cf9c545072b7f03cb574aa1318c358345f7ccd6cde33d84
|
@@ -9,15 +9,15 @@ module CdnAssetGem
|
|
9
9
|
"#{root_path}/assets"
|
10
10
|
end
|
11
11
|
begin
|
12
|
-
|
13
|
-
|
12
|
+
Rails.logger.info "CdnAssetGem INFO: file #{file}"
|
13
|
+
Rails.logger.info "CdnAssetGem INFO: assets_path #{assets_path}"
|
14
14
|
Rails.cache.fetch("cdn-asset-#{root_path}-#{file}", expires_in: 5.minutes) do
|
15
15
|
response = HTTP.get("#{ENV['CDN_URL']}#{assets_path}/rev-manifest.json")
|
16
|
-
|
16
|
+
Rails.logger.info "CdnAssetGem INFO: response #{response}"
|
17
17
|
"#{ENV['CDN_URL']}#{assets_path}/#{JSON.parse(response)[file]}"
|
18
18
|
end
|
19
19
|
rescue StandardError => e
|
20
|
-
|
20
|
+
Rails.logger.error "CdnAssetGem ERROR: #{e}"
|
21
21
|
"#{ENV['CDN_URL']}#{assets_path}/#{file}"
|
22
22
|
end
|
23
23
|
end
|