Useless code removed
Options given to the Browser initializator improved
This commit is contained in:
@@ -197,9 +197,9 @@ class Browser
|
|||||||
# Override with the options if they are set
|
# Override with the options if they are set
|
||||||
def override_config_with_options(options)
|
def override_config_with_options(options)
|
||||||
options.each do |option, value|
|
options.each do |option, value|
|
||||||
#if ACCESSOR_OPTIONS.include?(option)
|
if ACCESSOR_OPTIONS.include?(option)
|
||||||
self.send(:"#{option}=", value)
|
self.send(:"#{option}=", value)
|
||||||
#end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -33,17 +33,12 @@ class WpTarget
|
|||||||
attr_reader :uri, :verbose
|
attr_reader :uri, :verbose
|
||||||
|
|
||||||
def initialize(target_url, options = {})
|
def initialize(target_url, options = {})
|
||||||
raise "Empty URL" if !target_url
|
|
||||||
|
|
||||||
@uri = URI.parse(add_http_protocol(target_url))
|
@uri = URI.parse(add_http_protocol(target_url))
|
||||||
@verbose = options[:verbose]
|
@verbose = options[:verbose]
|
||||||
@wp_content_dir = options[:wp_content_dir]
|
@wp_content_dir = options[:wp_content_dir]
|
||||||
@wp_plugins_dir = options[:wp_plugins_dir]
|
@wp_plugins_dir = options[:wp_plugins_dir]
|
||||||
|
|
||||||
Browser.instance(#options.merge(:max_threads => options[:threads]))
|
Browser.instance(options.merge(:max_threads => options[:threads]))
|
||||||
:proxy => options[:proxy],
|
|
||||||
:max_threads => options[:threads]
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Alias of @uri.to_s
|
# Alias of @uri.to_s
|
||||||
|
|||||||
Reference in New Issue
Block a user