From 9cb333d5097ca4a332d15c0d22748145bbff423f Mon Sep 17 00:00:00 2001 From: Anita Graham Date: Thu, 15 Jul 2021 06:19:43 +0800 Subject: [PATCH] Remove call to URI.Encode for dragonfly.cache_store_root. (#3490) URI.Encode is deprecated. The line is commented ``` URI.encode("file:#{extension.dragonfly_cache_store_root}/meta"), # URI encoded in case of spaces ``` This variable being encoded is used as a file path and it is not clear that encoding spaces is useful in this case. --- dragonfly/lib/refinery/dragonfly/dragonfly.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dragonfly/lib/refinery/dragonfly/dragonfly.rb b/dragonfly/lib/refinery/dragonfly/dragonfly.rb index 9a992d5666..68c0802ef4 100644 --- a/dragonfly/lib/refinery/dragonfly/dragonfly.rb +++ b/dragonfly/lib/refinery/dragonfly/dragonfly.rb @@ -81,8 +81,8 @@ def attach!(app, extension) unless app.config.action_controller.perform_caching && app.config.action_dispatch.rack_cache app.config.middleware.insert 0, ::Rack::Cache, { verbose: extension.dragonfly_cache_log_level =='verbose', - metastore: URI.encode("file:#{extension.dragonfly_cache_store_root}/meta"), # URI encoded in case of spaces - entitystore: URI.encode("file:#{extension.dragonfly_cache_store_root}/body") + metastore: "file:#{extension.dragonfly_cache_store_root}/meta", + entitystore: "file:#{extension.dragonfly_cache_store_root}/body" } end app.config.middleware.insert_after ::Rack::Cache, ::Dragonfly::Middleware, extension.dragonfly_name