Sha256: 321f7a551eb644fbc50df1986c98e95d1c58e8318d0d61d5c357dbea53c49d68

Contents?: true

Size: 501 Bytes

Versions: 24

Compression:

Stored size: 501 Bytes

Contents

require 'uri'

module CarrierWave
  module Utilities
    module Uri
    # based on Ruby < 2.0's URI.encode
    SAFE_STRING = URI::REGEXP::PATTERN::UNRESERVED + '\/'
    UNSAFE = Regexp.new("[^#{SAFE_STRING}]", false)

    private
      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
    end # Uri
  end # Utilities
end # CarrierWave

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/carrierwave-2.2.6/lib/carrierwave/utilities/uri.rb
carrierwave-2.2.6 lib/carrierwave/utilities/uri.rb
carrierwave-2.2.5 lib/carrierwave/utilities/uri.rb
carrierwave-1.3.4 lib/carrierwave/utilities/uri.rb
carrierwave-2.2.4 lib/carrierwave/utilities/uri.rb
carrierwave-1.3.3 lib/carrierwave/utilities/uri.rb
carrierwave-2.2.3 lib/carrierwave/utilities/uri.rb
carrierwave-3.0.0.beta lib/carrierwave/utilities/uri.rb
carrierwave-2.2.2 lib/carrierwave/utilities/uri.rb
carrierwave-2.2.1 lib/carrierwave/utilities/uri.rb
carrierwave-2.2.0 lib/carrierwave/utilities/uri.rb
carrierwave-2.1.1 lib/carrierwave/utilities/uri.rb
carrierwave-1.3.2 lib/carrierwave/utilities/uri.rb
carrierwave-2.1.0 lib/carrierwave/utilities/uri.rb
carrierwave-2.0.2 lib/carrierwave/utilities/uri.rb
carrierwave-2.0.1 lib/carrierwave/utilities/uri.rb
carrierwave-2.0.0 lib/carrierwave/utilities/uri.rb
carrierwave-2.0.0.rc lib/carrierwave/utilities/uri.rb
carrierwave-1.3.1 lib/carrierwave/utilities/uri.rb
carrierwave-1.3.0 lib/carrierwave/utilities/uri.rb