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