Sha256: 50ddc58f22b49e092adb9ef9d0f88c0454f43b4ae9151f0f32e416fd5b85b01a

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

module Paperclip
  class HttpUrlProxyAdapter < UriAdapter
    def self.register
      Paperclip.io_adapters.register self do |target|
        String === target && target =~ REGEXP
      end
    end

    REGEXP = /\Ahttps?:\/\//

    def initialize(target, options = {})
      escaped = URI.escape(target)
      super(URI(target == URI.unescape(target) ? escaped : target), options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paperclip-6.1.0 lib/paperclip/io_adapters/http_url_proxy_adapter.rb