Sha256: d5e9028eeb8b0bd6f27d29b5e6593a1f724fda424dfd49d0768d080ec39f3d64

Contents?: true

Size: 802 Bytes

Versions: 45

Compression:

Stored size: 802 Bytes

Contents

# frozen_string_literal: true

module Faraday
  # ProxyOptions contains the configurable properties for the proxy
  # configuration used when making an HTTP request.
  class ProxyOptions < Options.new(:uri, :user, :password)
    extend Forwardable
    def_delegators :uri, :scheme, :scheme=, :host, :host=, :port, :port=,
                   :path, :path=

    def self.from(value)
      case value
      when String
        value = { uri: Utils.URI(value) }
      when URI
        value = { uri: value }
      when Hash, Options
        if (uri = value.delete(:uri))
          value[:uri] = Utils.URI(uri)
        end
      end
      super(value)
    end

    memoized(:user) { uri&.user && Utils.unescape(uri.user) }
    memoized(:password) { uri&.password && Utils.unescape(uri.password) }
  end
end

Version data entries

45 entries across 37 versions & 11 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/faraday-1.2.0/lib/faraday/options/proxy_options.rb
alloy_sdk-0.1.0 vendor/bundle/ruby/3.0.0/gems/faraday-1.0.1/lib/faraday/options/proxy_options.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/faraday-1.3.0/lib/faraday/options/proxy_options.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/faraday-1.2.0/lib/faraday/options/proxy_options.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/faraday-1.1.0/lib/faraday/options/proxy_options.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/faraday-1.1.0/lib/faraday/options/proxy_options.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/faraday-1.3.0/lib/faraday/options/proxy_options.rb
cocRb-0.1.0 .bundle/ruby/3.0.0/gems/faraday-1.4.1/lib/faraday/options/proxy_options.rb
faraday-1.4.1 lib/faraday/options/proxy_options.rb
faraday-1.4.0 lib/faraday/options/proxy_options.rb
faraday-1.3.1 lib/faraday/options/proxy_options.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/faraday-1.2.0/lib/faraday/options/proxy_options.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/faraday-1.1.0/lib/faraday/options/proxy_options.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/faraday-1.3.0/lib/faraday/options/proxy_options.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/faraday-1.1.0/lib/faraday/options/proxy_options.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/faraday-1.3.0/lib/faraday/options/proxy_options.rb
faraday-1.3.0 lib/faraday/options/proxy_options.rb
faraday-1.2.0 lib/faraday/options/proxy_options.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/faraday-1.1.0/lib/faraday/options/proxy_options.rb
passbase-1.2.0 vendor/bundle/ruby/2.7.0/gems/faraday-1.1.0/lib/faraday/options/proxy_options.rb