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 +4 -4
- data/lib/auto-ali-cdn/oss.rb +1 -0
- data/lib/auto-ali-cdn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69b5549cd9c02076112f14195f37fb3d05d737e3
|
4
|
+
data.tar.gz: cb648b51f202b837baf43fa32b0acbc0de49d6a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8fc05e8ac1de848b834e740beb546005dcf9613ca5ee6147816f3af311f313be5a38c28a5c1e2e55ae201ddadfa0f6c794283c9b3b6892e585abfcb42271a8c
|
7
|
+
data.tar.gz: d77eafa5db45c6684fefc2041ab31c0f7bd409220764f049c27169a75cddac4f08d627da5073718a8e477364218f79fd64751e103673a7f39a9680a51e0e9626
|
data/lib/auto-ali-cdn/oss.rb
CHANGED
@@ -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)
|
data/lib/auto-ali-cdn/version.rb
CHANGED