Cookie-jar file moved to cache/browser/
This commit is contained in:
@@ -31,13 +31,11 @@ class Browser
|
|||||||
override_config_with_options(options)
|
override_config_with_options(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
@hydra = Typhoeus::Hydra.new(
|
@hydra = Typhoeus::Hydra.new(max_concurrency: @max_threads)
|
||||||
max_concurrency: @max_threads,
|
|
||||||
#connecttimeout: @request_timeout
|
|
||||||
)
|
|
||||||
|
|
||||||
# TODO : add an argument for the cache dir instead of using a constant
|
# TODO : add an argument for the cache dir instead of using a constant
|
||||||
@cache = TyphoeusCache.new(CACHE_DIR + '/browser')
|
@cache_dir = CACHE_DIR + '/browser'
|
||||||
|
@cache = TyphoeusCache.new(@cache_dir)
|
||||||
|
|
||||||
@cache.clean
|
@cache.clean
|
||||||
|
|
||||||
@@ -183,8 +181,8 @@ class Browser
|
|||||||
params.merge!(ssl_verifypeer: false)
|
params.merge!(ssl_verifypeer: false)
|
||||||
params.merge!(ssl_verifyhost: 0)
|
params.merge!(ssl_verifyhost: 0)
|
||||||
|
|
||||||
params.merge!(cookie_jar: CACHE_DIR + '/cookie-jar')
|
params.merge!(cookie_jar: @cache_dir + '/cookie-jar')
|
||||||
params.merge!(cookie_file: CACHE_DIR + '/cookie-jar')
|
params.merge!(cookie_file: @cache_dir + '/cookie-jar')
|
||||||
|
|
||||||
params
|
params
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ describe Browser do
|
|||||||
|
|
||||||
describe '#merge_request_params' do
|
describe '#merge_request_params' do
|
||||||
let(:params) { {} }
|
let(:params) { {} }
|
||||||
let(:cookie_jar) { CACHE_DIR + '/cookie-jar' }
|
let(:cookie_jar) { CACHE_DIR + '/browser/cookie-jar' }
|
||||||
let(:default_expectation) {
|
let(:default_expectation) {
|
||||||
{
|
{
|
||||||
cache_ttl: 250,
|
cache_ttl: 250,
|
||||||
|
|||||||
Reference in New Issue
Block a user