From 3245063a74fda9d841a48f3ad96c3572d9ca803d Mon Sep 17 00:00:00 2001 From: erwanlr Date: Thu, 11 Apr 2013 12:56:40 +0200 Subject: [PATCH] Ethon::Easy cookies hacks modified to reflect the new version of Typhoeus --- lib/common/browser.rb | 4 ++-- lib/common/hacks.rb | 4 ++-- spec/lib/common/browser_spec.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/common/browser.rb b/lib/common/browser.rb index eb5e8349..651b35f8 100644 --- a/lib/common/browser.rb +++ b/lib/common/browser.rb @@ -181,8 +181,8 @@ class Browser params.merge!(ssl_verifypeer: false) params.merge!(ssl_verifyhost: 0) - params.merge!(cookie_jar: @cache_dir + '/cookie-jar') - params.merge!(cookie_file: @cache_dir + '/cookie-jar') + params.merge!(cookiejar: @cache_dir + '/cookie-jar') + params.merge!(cookiefile: @cache_dir + '/cookie-jar') params end diff --git a/lib/common/hacks.rb b/lib/common/hacks.rb index 98dcfbbb..8f308844 100644 --- a/lib/common/hacks.rb +++ b/lib/common/hacks.rb @@ -50,11 +50,11 @@ end module Ethon class Easy module Options - def cookie_jar=(value) + def cookiejar=(value) Curl.set_option(:cookiejar, value_for(value, :string), handle) end - def cookie_file=(value) + def cookiefile=(value) Curl.set_option(:cookiefile, value_for(value, :string), handle) end end diff --git a/spec/lib/common/browser_spec.rb b/spec/lib/common/browser_spec.rb index e06e649f..68b89861 100644 --- a/spec/lib/common/browser_spec.rb +++ b/spec/lib/common/browser_spec.rb @@ -267,7 +267,7 @@ describe Browser do cache_ttl: 250, headers: { 'User-Agent' => 'SomeUA' }, ssl_verifypeer: false, ssl_verifyhost: 0, - cookie_jar: cookie_jar, cookie_file: cookie_jar + cookiejar: cookie_jar, cookiefile: cookie_jar } }