gravis-typhoeus 0.1.30 → 0.1.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/typhoeus/easy.rb +7 -6
  2. data/typhoeus.gemspec +1 -1
  3. metadata +3 -3
data/lib/typhoeus/easy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Typhoeus
2
2
  class Easy
3
- attr_reader :response_body, :response_header, :method, :headers, :url
3
+ attr_reader :response_body, :response_header, :method, :headers, :url, :params
4
4
  attr_accessor :start_time
5
5
 
6
6
  # These integer codes are available in curl/curl.h
@@ -163,6 +163,7 @@ module Typhoeus
163
163
  end
164
164
 
165
165
  def params=(params)
166
+ @params = params
166
167
  params_string = params.keys.collect do |k|
167
168
  value = params[k]
168
169
  if value.is_a? Hash
@@ -185,14 +186,14 @@ module Typhoeus
185
186
  # Set SSL certificate
186
187
  # " The string should be the file name of your certificate. "
187
188
  # The default format is "PEM" and can be changed with ssl_cert_type=
188
- def ssl_cert=(cert, cert_type = "PEM")
189
+ def ssl_cert=(cert)
189
190
  set_option(OPTION_VALUES[:CURLOPT_SSLCERT], cert)
190
191
  end
191
192
 
192
193
  # Set SSL certificate type
193
194
  # " The string should be the format of your certificate. Supported formats are "PEM" and "DER" "
194
195
  def ssl_cert_type=(cert_type)
195
- raise "Invalid ssl cert type : '#{cert_type}'..." unless %w(PEM DER).include?(cert_type)
196
+ raise "Invalid ssl cert type : '#{cert_type}'..." if cert_type and !%w(PEM DER).include?(cert_type)
196
197
  set_option(OPTION_VALUES[:CURLOPT_SSLCERTTYPE], cert_type)
197
198
  end
198
199
 
@@ -200,15 +201,15 @@ module Typhoeus
200
201
  # " The string should be the file name of your private key. "
201
202
  # The default format is "PEM" and can be changed with ssl_key_type=
202
203
  #
203
- def ssl_key=(key, options = {})
204
+ def ssl_key=(key)
204
205
  set_option(OPTION_VALUES[:CURLOPT_SSLKEY], key)
205
206
  end
206
207
 
207
208
  # Set SSL Key type
208
209
  # " The string should be the format of your private key. Supported formats are "PEM", "DER" and "ENG". "
209
210
  #
210
- def ssk_key_type=(key_type)
211
- raise "Invalid ssl key type : '#{key_type}'..." unless %w(PEM DER ENG).include?(cert_type)
211
+ def ssl_key_type=(key_type)
212
+ raise "Invalid ssl key type : '#{key_type}'..." if key_type and !%w(PEM DER ENG).include?(key_type)
212
213
  set_option(OPTION_VALUES[:CURLOPT_SSLKEYTYPE], key_type)
213
214
  end
214
215
 
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.30"
8
+ s.version = "0.1.31"
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: 39
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 30
10
- version: 0.1.30
9
+ - 31
10
+ version: 0.1.31
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Dix