From 05eb51531d39762ec826d810b5a190f829f6dced Mon Sep 17 00:00:00 2001 From: Ryunosuke SATO Date: Wed, 19 Aug 2015 22:17:07 +0900 Subject: [PATCH] Allow over 32 chars length hash digest Sprockets 3 appends 64 chars length digest. > Default digest changed to SHA256. see: https://github.com/rails/sprockets/tree/v3.0.0#version-history --- lib/asset_sync/storage.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/asset_sync/storage.rb b/lib/asset_sync/storage.rb index c67691c4..d718200b 100644 --- a/lib/asset_sync/storage.rb +++ b/lib/asset_sync/storage.rb @@ -137,7 +137,7 @@ def upload_file(f) :content_type => mime } - if /-[0-9a-fA-F]{32}$/.match(File.basename(f,File.extname(f))) + if /-[0-9a-fA-F]{32,}$/.match(File.basename(f,File.extname(f))) file.merge!({ :cache_control => "public, max-age=#{one_year}", :expires => CGI.rfc1123_date(Time.now + one_year)