2cdn 0.1.4 → 0.1.5
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 +2 -2
- 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: 2d9f5779d1ea1e345db7f959c351ccfa67ee9c51
|
4
|
+
data.tar.gz: 3e2e436c4a6ce0adf98474deb048ce845a058712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f52c32ce3df35969e841397c7b06bb1e232dc1d9d533ef9aed1d6579d7c45f5a01665b59a4d4fdfbe79d8fd80a79fcdc46fa4ec55da308b5bf0c10e4c6e9f75
|
7
|
+
data.tar.gz: 086d921c75c8603d78ba0496a969d2e8ac39084571d587a3cee1ad5b0845ba4493b550430fcf95f6e8a3c566de4b706c4f713c04b35ac37440840b6096b5d373
|
data/lib/auto-ali-cdn/oss.rb
CHANGED
@@ -68,7 +68,7 @@ module AutoAliCDN
|
|
68
68
|
file_path = res_path+"/#{name}"
|
69
69
|
file_md5 = Digest::MD5.hexdigest(File.read(file_path))
|
70
70
|
res_type = res_path.gsub(/^.*\//, '')
|
71
|
-
suffix = name.split(/\./).last
|
71
|
+
suffix = "."+name.split(/\./).last
|
72
72
|
object_key = config.site_resource_path+"/#{res_type}/#{name.gsub(/#{suffix}$/, "-#{file_md5}#{suffix}")}"
|
73
73
|
if bucket.object_exists?(object_key)
|
74
74
|
puts "#{name} --> #{object_key}".color(:dimgray)
|
@@ -114,7 +114,7 @@ module AutoAliCDN
|
|
114
114
|
file_path = res_path+"/#{name}"
|
115
115
|
file_md5 = Digest::MD5.hexdigest(File.read(file_path))
|
116
116
|
res_type = res_path.gsub(/^.*\//, '')
|
117
|
-
suffix = name.split(/\./).last
|
117
|
+
suffix = "."+name.split(/\./).last
|
118
118
|
object_key = config.site_resource_path+"/#{res_type}/#{name.gsub(/#{suffix}$/, "-#{file_md5}#{suffix}")}"
|
119
119
|
if bucket.object_exists?(object_key)
|
120
120
|
replace_res_path.call(config.domain_name+'/'+object_key, res_type+'/'+name)
|
data/lib/auto-ali-cdn/version.rb
CHANGED