Ethon::Easy cookies hacks modified to reflect the new version of Typhoeus
This commit is contained in:
@@ -181,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!(cookiejar: @cache_dir + '/cookie-jar')
|
||||||
params.merge!(cookie_file: @cache_dir + '/cookie-jar')
|
params.merge!(cookiefile: @cache_dir + '/cookie-jar')
|
||||||
|
|
||||||
params
|
params
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -50,11 +50,11 @@ end
|
|||||||
module Ethon
|
module Ethon
|
||||||
class Easy
|
class Easy
|
||||||
module Options
|
module Options
|
||||||
def cookie_jar=(value)
|
def cookiejar=(value)
|
||||||
Curl.set_option(:cookiejar, value_for(value, :string), handle)
|
Curl.set_option(:cookiejar, value_for(value, :string), handle)
|
||||||
end
|
end
|
||||||
|
|
||||||
def cookie_file=(value)
|
def cookiefile=(value)
|
||||||
Curl.set_option(:cookiefile, value_for(value, :string), handle)
|
Curl.set_option(:cookiefile, value_for(value, :string), handle)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ describe Browser do
|
|||||||
cache_ttl: 250,
|
cache_ttl: 250,
|
||||||
headers: { 'User-Agent' => 'SomeUA' },
|
headers: { 'User-Agent' => 'SomeUA' },
|
||||||
ssl_verifypeer: false, ssl_verifyhost: 0,
|
ssl_verifypeer: false, ssl_verifyhost: 0,
|
||||||
cookie_jar: cookie_jar, cookie_file: cookie_jar
|
cookiejar: cookie_jar, cookiefile: cookie_jar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user