2cdn 0.1.6 → 0.1.7
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 -1
- 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: 3c996bcc49f1bca833dba20e11da6c94df4623ef
|
4
|
+
data.tar.gz: f8969fcce81a249e8c41cfb86da20ed5b8341384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3054742ee178d240cebfc1b87c883680e4a90fb2e7332fe3d8237c3ad9508df1f750b8a587822db2735ba3ba507ee2982357ac8d5d487a4970d27d9b7c34bc7
|
7
|
+
data.tar.gz: 9a51696e1f77c49e93974060335d8eae02c9fadbc8dcf8ad3d3571867f3329907ed017a527d8b904aea9495067c13184717bab58d7c4f95a3b95366fe9b4936d
|
data/lib/auto-ali-cdn/oss.rb
CHANGED
@@ -70,7 +70,7 @@ module AutoAliCDN
|
|
70
70
|
res_type = res_path.gsub(/^.*\//, '')
|
71
71
|
suffix = "."+name.split(/\./).last
|
72
72
|
new_name = rename ? name.gsub(/#{suffix}$/, "-#{file_md5}#{suffix}"): name
|
73
|
-
object_key = config.site_resource_path+"/#{
|
73
|
+
object_key = config.site_resource_path+"/#{Time.now.strftime("%F %H:%M")}/#{new_name}"
|
74
74
|
if bucket.object_exists?(object_key)
|
75
75
|
puts "#{name} --> #{object_key}".color(:dimgray)
|
76
76
|
replace_res_path.call(res_type+'/'+name, config.domain_name+'/'+object_key)
|
data/lib/auto-ali-cdn/version.rb
CHANGED