gravis-typhoeus 0.1.33 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/typhoeus/easy.rb CHANGED
@@ -152,7 +152,7 @@ module Typhoeus
152
152
  elsif method == :head
153
153
  set_option(OPTION_VALUES[:CURLOPT_NOBODY], 1)
154
154
  else
155
- set_option(OPTION_VALUES[:CURLOPT_CUSTOMREQUEST], "DELETE")
155
+ set_option(OPTION_VALUES[:CURLOPT_CUSTOMREQUEST], method.to_s.upcase)
156
156
  end
157
157
  end
158
158
 
@@ -210,7 +210,7 @@ module Typhoeus
210
210
  #
211
211
  def ssl_key_type=(key_type)
212
212
  raise "Invalid ssl key type : '#{key_type}'..." if key_type and !%w(PEM DER ENG).include?(key_type)
213
- set_option(OPTION_VALUES[:CURLOPT_SSLKEYTYPE], key_type)
213
+ set_option(OPTION_VALUES[:CURLOPT_SSLKEYTYPE], key_type)
214
214
  end
215
215
 
216
216
  def ssl_key_password=(key_password)
@@ -149,6 +149,7 @@ module Typhoeus
149
149
  easy.ssl_key_password = request.ssl_key_password
150
150
  easy.ssl_cacert = request.ssl_cacert
151
151
  easy.ssl_capath = request.ssl_capath
152
+ easy.verbose = request.verbose
152
153
 
153
154
  easy.on_success do |easy|
154
155
  queue_next
@@ -1,6 +1,6 @@
1
1
  module Typhoeus
2
2
  class Request
3
- attr_accessor :method, :params, :body, :headers, :timeout, :user_agent, :response, :cache_timeout, :follow_location, :max_redirects, :proxy, :disable_ssl_peer_verification, :ssl_cert, :ssl_cert_type, :ssl_key, :ssl_key_type, :ssl_key_password, :ssl_cacert, :ssl_capath
3
+ attr_accessor :method, :params, :body, :headers, :timeout, :user_agent, :response, :cache_timeout, :follow_location, :max_redirects, :proxy, :disable_ssl_peer_verification, :ssl_cert, :ssl_cert_type, :ssl_key, :ssl_key_type, :ssl_key_password, :ssl_cacert, :ssl_capath, :verbose
4
4
 
5
5
 
6
6
  attr_reader :url
@@ -28,6 +28,7 @@ module Typhoeus
28
28
  # ** +:ssl_key_password
29
29
  # ** +:ssl_cacert
30
30
  # ** +:ssl_capath
31
+ # ** +:verbose
31
32
  #
32
33
  def initialize(url, options = {})
33
34
  @method = options[:method] || :get
@@ -48,6 +49,7 @@ module Typhoeus
48
49
  @ssl_key_password = options[:ssl_key_password]
49
50
  @ssl_cacert = options[:ssl_cacert]
50
51
  @ssl_capath = options[:ssl_capath]
52
+ @verbose = options[:verbose]
51
53
 
52
54
  if @method == :post
53
55
  @url = url
@@ -117,6 +117,14 @@ describe Typhoeus::Easy do
117
117
  end
118
118
  end
119
119
 
120
+ describe "purge" do
121
+ it "should set custom request to purge" do
122
+ easy = Typhoeus::Easy.new
123
+ easy.should_receive(:set_option).with(Typhoeus::Easy::OPTION_VALUES[:CURLOPT_CUSTOMREQUEST], "PURGE").once
124
+ easy.method = :purge
125
+ end
126
+ end
127
+
120
128
  describe "head" do
121
129
  it "should perform a head" do
122
130
  easy = Typhoeus::Easy.new
data/typhoeus.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gravis-typhoeus}
8
- s.version = "0.1.33"
8
+ s.version = "0.1.34"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Dix"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gravis-typhoeus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 89
4
+ hash: 95
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 33
10
- version: 0.1.33
9
+ - 34
10
+ version: 0.1.34
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Dix