module Spidr
Constants
- COMMON_PROXY_PORT
Common proxy port.
- DEFAULT_PROXY
Default proxy information.
- VERSION
Spidr
version
Public Class Methods
disable_proxy!()
click to toggle source
Disables the proxy settings used by all newly created Agent
objects.
# File lib/spidr/spidr.rb, line 53 def Spidr.disable_proxy! @@spidr_proxy = DEFAULT_PROXY return true end
host(name,options={},&block)
click to toggle source
@see Agent.host
# File lib/spidr/spidr.rb, line 97 def Spidr.host(name,options={},&block) Agent.host(name,options,&block) end
proxy()
click to toggle source
Proxy information used by all newly created Agent
objects by default.
@return [Hash]
The Spidr proxy information.
# File lib/spidr/spidr.rb, line 21 def Spidr.proxy @@spidr_proxy ||= DEFAULT_PROXY end
proxy=(new_proxy)
click to toggle source
Sets the proxy information used by Agent
objects.
@param [Hash] new_proxy
The new proxy information.
@option new_proxy [String] :host
The host-name of the proxy.
@option new_proxy [Integer] :port (COMMON_PROXY_PORT
)
The port of the proxy.
@option new_proxy [String] :user
The user to authenticate with the proxy as.
@option new_proxy [String] :password
The password to authenticate with the proxy.
@return [Hash]
The new proxy information.
# File lib/spidr/spidr.rb, line 46 def Spidr.proxy=(new_proxy) @@spidr_proxy = {:port => COMMON_PROXY_PORT}.merge(new_proxy) end
site(url,options={},&block)
click to toggle source
@see Agent.site
# File lib/spidr/spidr.rb, line 104 def Spidr.site(url,options={},&block) Agent.site(url,options,&block) end
start_at(url,options={},&block)
click to toggle source
@see Agent.start_at
# File lib/spidr/spidr.rb, line 81 def Spidr.start_at(url,options={},&block) Agent.start_at(url,options,&block) end
user_agent()
click to toggle source
The User-Agent string used by all Agent
objects by default.
@return [String]
The Spidr User-Agent string.
# File lib/spidr/spidr.rb, line 64 def Spidr.user_agent @@spidr_user_agent ||= nil end
user_agent=(new_agent)
click to toggle source
Sets the Spidr
User-Agent string.
@param [String] new_agent
The new User-Agent string.
# File lib/spidr/spidr.rb, line 74 def Spidr.user_agent=(new_agent) @@spidr_user_agent = new_agent end