Module: Chromedriver::Binary

Defined in:
lib/chromedriver/binary.rb,
lib/chromedriver/binary/finder.rb,
lib/chromedriver/binary/railtie.rb,
lib/chromedriver/binary/version.rb,
lib/chromedriver/binary/platform.rb,
lib/chromedriver/binary/system_helper.rb,
lib/chromedriver/binary/version_resolver.rb,
lib/chromedriver/binary/download_progress.rb,
lib/chromedriver/binary/downloader_helper.rb,
lib/chromedriver/binary/chromedriver_downloader.rb

Defined Under Namespace

Modules: DownloaderHelper, Platform, SystemHelper, VersionResolver Classes: BrowserNotFound, ChromedriverDownloader, DownloadProgress, Error, Finder, Railtie, VersionError

Constant Summary collapse

DEFAULT_INSTALL_DIR =
File.expand_path("~/.webdrivers")
VERSION =
"0.1.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.install_dirString

Returns the install (download) directory path for the drivers.

Returns:

  • (String)


29
30
31
# File 'lib/chromedriver/binary.rb', line 29

def install_dir
  @install_dir ||= ENV["CHROMEDRIVER_INSTALL_DIR"] || DEFAULT_INSTALL_DIR
end

.loggerObject

Returns the value of attribute logger.



22
23
24
# File 'lib/chromedriver/binary.rb', line 22

def logger
  @logger
end

.proxy_addrObject

Returns the value of attribute proxy_addr.



22
23
24
# File 'lib/chromedriver/binary.rb', line 22

def proxy_addr
  @proxy_addr
end

.proxy_passObject

Returns the value of attribute proxy_pass.



22
23
24
# File 'lib/chromedriver/binary.rb', line 22

def proxy_pass
  @proxy_pass
end

.proxy_portObject

Returns the value of attribute proxy_port.



22
23
24
# File 'lib/chromedriver/binary.rb', line 22

def proxy_port
  @proxy_port
end

.proxy_userObject

Returns the value of attribute proxy_user.



22
23
24
# File 'lib/chromedriver/binary.rb', line 22

def proxy_user
  @proxy_user
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Provides a convenient way to configure the gem.

Examples:

Configure proxy and cache_time

Chromedriver::Binary.configure do |config|
  config.proxy_addr = 'myproxy_address.com'
  config.proxy_port = '8080'
  config.proxy_user = 'username'
  config.proxy_pass = 'password'
end

Yields:

  • (_self)

Yield Parameters:



44
45
46
# File 'lib/chromedriver/binary.rb', line 44

def configure
  yield self if block_given?
end