cdn_asset_gem 1.0.7 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/cdn_asset_gem/view/helpers.rb +6 -6
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 24fe5a0cd5c5e4feebd0ebc3b0435403f453d02e0189597678e20b99e4ea37c7
|
4
|
+
data.tar.gz: bb0b9a01742329769cc42ca21635bf0030acebe24ae8e95d04245ee38a4770a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02e2311913dace352638a07a76a5f9efea01feef411edb9502a031240ae8cd739b5729f1bcfbb7cb0a4b1bf2ad2dd1b31e67a6481bb5b10f4edfe387ad37d056
|
7
|
+
data.tar.gz: b343dde741bda438c85fa555bf45bcfd7434fbf6337db5531c15b3e9ecc0e9f34e05e86084216f62f6ac7549eca699173d07055cbb595f05dc6848735ca00299
|
@@ -9,10 +9,11 @@ module CdnAssetGem
|
|
9
9
|
else
|
10
10
|
"#{ENV['CDN_URL']}#{root_path}/assets/#{file}"
|
11
11
|
end
|
12
|
+
resuce StandardError => e
|
13
|
+
Rails.logger.error "CdnAssetGem Error: #{e}"
|
14
|
+
"#{ENV['CDN_URL']}#{root_path}/assets/#{file}"
|
12
15
|
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
+
|
16
17
|
def manifest_hash(root_path)
|
17
18
|
if root_path.blank? || root_path == '/'
|
18
19
|
assets_path = '/assets'
|
@@ -22,9 +23,8 @@ module CdnAssetGem
|
|
22
23
|
|
23
24
|
Rails.cache.fetch("cdn-asset-#{root_path}", expires_in: 5.minutes) do
|
24
25
|
uri = URI("#{ENV['CDN_URL']}#{assets_path}/rev-manifest.json")
|
25
|
-
response =
|
26
|
-
|
27
|
-
JSON.parse(response) if response_code == '200'
|
26
|
+
response = HTTP.get(uri)
|
27
|
+
JSON.parse(response) if response.code == '200'
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cdn_asset_gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phil Baker
|
@@ -52,9 +52,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
54
|
rubyforge_project:
|
55
|
-
rubygems_version: 2.
|
55
|
+
rubygems_version: 2.7.8
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Asset generator
|
59
59
|
test_files: []
|
60
|
-
has_rdoc:
|