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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d924734b7bd11d708cb8687523d14cbc2a340167
4
- data.tar.gz: f4101bb6fb260abff276ea498f16387da9854bf9
2
+ SHA256:
3
+ metadata.gz: 24fe5a0cd5c5e4feebd0ebc3b0435403f453d02e0189597678e20b99e4ea37c7
4
+ data.tar.gz: bb0b9a01742329769cc42ca21635bf0030acebe24ae8e95d04245ee38a4770a4
5
5
  SHA512:
6
- metadata.gz: 1f3a2a79860bf7739660e77ebba2a51f5522e7b881bd6115a6f06e6f06500c13c806180eddb053f9842991876b60fca6f2fe5ce6eee72d9637c788710682c159
7
- data.tar.gz: 1a8cf8f7a564a12e20cd69ae40520c0535cfc0a34c6295484bdb326eed917bfd32a2d2ce25338c3cccf82e0af4ff17c2f9412d283305f1979c421500540b63e7
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 = Net::HTTP.get(uri)
26
- response_code = Net::HTTP.get_response(uri).code
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.7
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.6.14
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: