2cdn 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 24648f75d46864f370dd78343df8224d09b0f6ba
4
- data.tar.gz: 20d9c341145c671a74f2a5c8a5aa32cf07c5268b
3
+ metadata.gz: 69b5549cd9c02076112f14195f37fb3d05d737e3
4
+ data.tar.gz: cb648b51f202b837baf43fa32b0acbc0de49d6a3
5
5
  SHA512:
6
- metadata.gz: 4b9e8b09bcad9a8bcae52ff91bd584b126c786d7025a039a44f506622705c83ffe3f386c88ea0175b42263e3f60ab28b9a94ea436609afab6ee3f629c7df2cb1
7
- data.tar.gz: 8241f4152a543646d8afab76fb4d987a163e61efd1d353a87a41e7590835d537ebf62c8a449af9bb8b3f511ddf3f035815d6795d41b3f9f5f882fb7de2230e08
6
+ metadata.gz: a8fc05e8ac1de848b834e740beb546005dcf9613ca5ee6147816f3af311f313be5a38c28a5c1e2e55ae201ddadfa0f6c794283c9b3b6892e585abfcb42271a8c
7
+ data.tar.gz: d77eafa5db45c6684fefc2041ab31c0f7bd409220764f049c27169a75cddac4f08d627da5073718a8e477364218f79fd64751e103673a7f39a9680a51e0e9626
@@ -67,6 +67,7 @@ module AutoAliCDN
67
67
  next if name =~ /^(\.)|(\.\.)$/
68
68
  file_path = res_path+"/#{name}"
69
69
  file_md5 = Digest::MD5.hexdigest(File.read(file_path))
70
+ res_type = res_path.gsub(/^.*\//, '')
70
71
  suffix = name.split(/\./).last
71
72
  object_key = config.site_resource_path+"/#{res_type}/#{name.gsub(/#{suffix}$/, "-#{file_md5}#{suffix}")}"
72
73
  if bucket.object_exists?(object_key)
@@ -1,3 +1,3 @@
1
1
  module AutoAliCDN
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 2cdn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - liuxi