Sha256: 642442f471f1ae0d20ea1d8a6c1106e0297fb1d46711b40b99ae1bdf89c03068

Contents?: true

Size: 635 Bytes

Versions: 5

Compression:

Stored size: 635 Bytes

Contents

require 'uri'

module Capybara
  module Webmock
    class ProxiedRequest
      attr_reader :referrer, :uri

      def initialize(raw_referrer, raw_uri)
        @referrer = raw_referrer == "-" ? nil : URI.parse(raw_referrer)
        @uri = URI.parse(raw_uri)
      end

      def fragment; @uri.fragment; end
      def host; @uri.host; end
      def hostname; @uri.hostname; end
      def password; @uri.password; end
      def path; @uri.path; end
      def port; @uri.port; end
      def query; @uri.query; end
      def scheme; @uri.scheme; end
      def user; @uri.user; end
      def userinfo; @uri.userinfo; end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
capybara-webmock-0.5.4 lib/capybara/webmock/proxied_request.rb
capybara-webmock-0.5.3 lib/capybara/webmock/proxied_request.rb
capybara-webmock-0.5.2 lib/capybara/webmock/proxied_request.rb
capybara-webmock-0.5.1 lib/capybara/webmock/proxied_request.rb
capybara-webmock-0.5.0 lib/capybara/webmock/proxied_request.rb