zencoder 2.1.4 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ class Zencoder
5
5
  class HTTP < Zencoder
6
6
  class NetHTTP
7
7
 
8
- attr_accessor :method, :url, :uri, :body, :params, :headers, :timeout, :options
8
+ attr_accessor :method, :url, :uri, :body, :params, :headers, :timeout, :skip_ssl_verify, :options
9
9
 
10
10
  cattr_accessor :root_cert_paths
11
11
 
@@ -22,13 +22,14 @@ class Zencoder
22
22
  '/etc/pki/tls']
23
23
 
24
24
  def initialize(method, url, options)
25
- @method = method
26
- @url = url
27
- @body = options.delete(:body)
28
- @params = options.delete(:params)
29
- @headers = options.delete(:headers)
30
- @timeout = options.delete(:timeout)
31
- @options = options
25
+ @method = method
26
+ @url = url
27
+ @body = options.delete(:body)
28
+ @params = options.delete(:params)
29
+ @headers = options.delete(:headers)
30
+ @timeout = options.delete(:timeout)
31
+ @skip_ssl_verify = options.delete(:skip_ssl_verify)
32
+ @options = options
32
33
  end
33
34
 
34
35
  def self.post(url, options={})
@@ -72,7 +73,7 @@ class Zencoder
72
73
  if u.scheme == 'https'
73
74
  http.use_ssl = true
74
75
 
75
- if root_cert_path = locate_root_cert_path
76
+ if !skip_ssl_verify && root_cert_path = locate_root_cert_path
76
77
  http.ca_path = root_cert_path
77
78
  http.verify_mode = OpenSSL::SSL::VERIFY_PEER
78
79
  http.verify_depth = 5
@@ -1,3 +1,3 @@
1
1
  class Zencoder
2
- VERSION = '2.1.4'
2
+ VERSION = '2.1.5'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 1
8
- - 4
9
- version: 2.1.4
8
+ - 5
9
+ version: 2.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Sutton
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-07 00:00:00 -05:00
17
+ date: 2010-07-14 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency