Sha256: 6c4a387d2f22464b558566b05cbee6560dbe44b0b08feaa220465ae420c97bc5

Contents?: true

Size: 819 Bytes

Versions: 77

Compression:

Stored size: 819 Bytes

Contents

require 'net/http/persistent'

module Selenium
  module WebDriver
    module Remote
      module Http

        # @api private
        class Persistent < Default

          def close
            @http.shutdown if @http
          end

          private

          def new_http_client
            proxy = nil

            if @proxy
              unless @proxy.respond_to?(:http) && url = @proxy.http
                raise Error::WebDriverError, "expected HTTP proxy, got #{@proxy.inspect}"
              end
              proxy = URI.parse(url)
            end

            Net::HTTP::Persistent.new "webdriver", proxy
          end

          def response_for(request)
            http.request server_url, request
          end

        end # Persistent
      end # Http
    end # Remote
  end # WebDriver
end # Selenium

Version data entries

77 entries across 77 versions & 5 rubygems

Version Path
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.22.2 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.22.2.rc2 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.22.2.rc1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.22.1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.22.0 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.22.0.rc3 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.22.0.rc2 lib/selenium/webdriver/remote/http/persistent.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.22.0.rc1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.21.2 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.21.2.rc1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.21.1 lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.21.0 lib/selenium/webdriver/remote/http/persistent.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/remote/http/persistent.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/remote/http/persistent.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/remote/http/persistent.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/remote/http/persistent.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/remote/http/persistent.rb
selenium-webdriver-2.20.0 lib/selenium/webdriver/remote/http/persistent.rb