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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69b5549cd9c02076112f14195f37fb3d05d737e3
4
- data.tar.gz: cb648b51f202b837baf43fa32b0acbc0de49d6a3
3
+ metadata.gz: 2d9f5779d1ea1e345db7f959c351ccfa67ee9c51
4
+ data.tar.gz: 3e2e436c4a6ce0adf98474deb048ce845a058712
5
5
  SHA512:
6
- metadata.gz: a8fc05e8ac1de848b834e740beb546005dcf9613ca5ee6147816f3af311f313be5a38c28a5c1e2e55ae201ddadfa0f6c794283c9b3b6892e585abfcb42271a8c
7
- data.tar.gz: d77eafa5db45c6684fefc2041ab31c0f7bd409220764f049c27169a75cddac4f08d627da5073718a8e477364218f79fd64751e103673a7f39a9680a51e0e9626
6
+ metadata.gz: 9f52c32ce3df35969e841397c7b06bb1e232dc1d9d533ef9aed1d6579d7c45f5a01665b59a4d4fdfbe79d8fd80a79fcdc46fa4ec55da308b5bf0c10e4c6e9f75
7
+ data.tar.gz: 086d921c75c8603d78ba0496a969d2e8ac39084571d587a3cee1ad5b0845ba4493b550430fcf95f6e8a3c566de4b706c4f713c04b35ac37440840b6096b5d373
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module AutoAliCDN
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
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.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - liuxi