1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove wrong rack/utils dependency from AS

Closes #6274
This commit is contained in:
Santiago Pastorino 2012-05-12 09:18:37 -03:00
parent 905c48eab3
commit 3a59eab5f7

View file

@ -1,7 +1,7 @@
require 'active_support/core_ext/file/atomic'
require 'active_support/core_ext/string/conversions'
require 'active_support/core_ext/object/inclusion'
require 'rack/utils'
require 'uri/common'
module ActiveSupport
module Cache
@ -126,7 +126,7 @@ module ActiveSupport
# Translate a key into a file path.
def key_file_path(key)
fname = Rack::Utils.escape(key)
fname = URI.encode_www_form_component(key)
hash = Zlib.adler32(fname)
hash, dir_1 = hash.divmod(0x1000)
dir_2 = hash.modulo(0x1000)
@ -144,7 +144,7 @@ module ActiveSupport
# Translate a file path into a key.
def file_path_key(path)
fname = path[cache_path.to_s.size..-1].split(File::SEPARATOR, 4).last
Rack::Utils.unescape(fname)
URI.decode_www_form_component(fname, Encoding::UTF_8)
end
# Delete empty directories in the cache.