Permalink
Browse files

Merge branch 'master' of http://github.com/pauldix/typhoeus

  • Loading branch information...
gravis committed Jun 28, 2010
2 parents 2281dc8 + 978dd67 commit 1803167abeeb197d99c254fca809a5d753e14125
Showing with 12 additions and 2 deletions.
  1. +2 −0 CHANGELOG.markdown
  2. +2 −2 lib/typhoeus/easy.rb
  3. +8 −0 spec/typhoeus/easy_spec.rb
View
@@ -1,6 +1,8 @@
Pending (0.1.28)
----------------
* Added SSL cert options for Typhoeus::Easy [GH-25, gravis]
+* Ported SSL cert options to Typhoeus::Request interface [gravis]
+* Added support for any HTTP method (purge for Varnish) [ryana]
0.1.27
------
View
@@ -152,7 +152,7 @@ def method=(method)
elsif method == :head
set_option(OPTION_VALUES[:CURLOPT_NOBODY], 1)
else
- set_option(OPTION_VALUES[:CURLOPT_CUSTOMREQUEST], "DELETE")
+ set_option(OPTION_VALUES[:CURLOPT_CUSTOMREQUEST], method.to_s.upcase)
end
end
@@ -210,7 +210,7 @@ def ssl_key=(key)
#
def ssl_key_type=(key_type)
raise "Invalid ssl key type : '#{key_type}'..." if key_type and !%w(PEM DER ENG).include?(key_type)
- set_option(OPTION_VALUES[:CURLOPT_SSLKEYTYPE], key_type)
+ set_option(OPTION_VALUES[:CURLOPT_SSLKEYTYPE], key_type)
end
def ssl_key_password=(key_password)
@@ -117,6 +117,14 @@
end
end
+ describe "purge" do
+ it "should set custom request to purge" do
+ easy = Typhoeus::Easy.new
+ easy.should_receive(:set_option).with(Typhoeus::Easy::OPTION_VALUES[:CURLOPT_CUSTOMREQUEST], "PURGE").once
+ easy.method = :purge
+ end
+ end
+
describe "head" do
it "should perform a head" do
easy = Typhoeus::Easy.new

0 comments on commit 1803167

Please sign in to comment.