gravis-typhoeus 0.1.33 → 0.1.34
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/typhoeus/easy.rb +2 -2
- data/lib/typhoeus/hydra.rb +1 -0
- data/lib/typhoeus/request.rb +3 -1
- data/spec/typhoeus/easy_spec.rb +8 -0
- data/typhoeus.gemspec +1 -1
- metadata +3 -3
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],
|
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)
|
data/lib/typhoeus/hydra.rb
CHANGED
data/lib/typhoeus/request.rb
CHANGED
@@ -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
|
data/spec/typhoeus/easy_spec.rb
CHANGED
@@ -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
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:
|
4
|
+
hash: 95
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 34
|
10
|
+
version: 0.1.34
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Paul Dix
|