module CarrierWave::Utilities::Uri

Constants

SAFE_STRING

based on Ruby < 2.0's URI.encode

UNSAFE

Private Instance Methods

encode_path(path) click to toggle source
# File lib/carrierwave/utilities/uri.rb, line 11
def encode_path(path)
  path.to_s.gsub(UNSAFE) do
    us = $&
    tmp = ''
    us.each_byte do |uc|
      tmp << sprintf('%%%02X', uc)
    end
    tmp
  end
end