From bdedf6f63fcdc20f315dddaa3938e3e06f4816db Mon Sep 17 00:00:00 2001 From: erwanlr Date: Thu, 11 Apr 2013 14:48:43 +0200 Subject: [PATCH] Back to the previous version of Typhoeus & Ethon to avoid seg fault in rspec --- Gemfile | 3 ++- lib/common/hacks.rb | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index a11f8caa..3a1e6f0c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source "https://rubygems.org" -gem "typhoeus", ">=0.6.3" +gem "typhoeus", "=0.6.2" +gem "ethon", "=0.5.10" gem "nokogiri" gem "json" diff --git a/lib/common/hacks.rb b/lib/common/hacks.rb index c4717d90..8f308844 100644 --- a/lib/common/hacks.rb +++ b/lib/common/hacks.rb @@ -47,6 +47,20 @@ module Typhoeus end end +module Ethon + class Easy + module Options + def cookiejar=(value) + Curl.set_option(:cookiejar, value_for(value, :string), handle) + end + + def cookiefile=(value) + Curl.set_option(:cookiefile, value_for(value, :string), handle) + end + end + end +end + # Override for puts to enable logging def puts(o = '') # remove color for logging