zencoder 2.1.5 → 2.1.6

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/README.markdown CHANGED
@@ -178,6 +178,16 @@ By default we'll send and receive JSON for all our communication. If you would r
178
178
 
179
179
  Zencoder::Job.create({:input => 's3://bucket/key.mp4'}, {:format => :xml})
180
180
 
181
+ ### SSL Verification
182
+
183
+ We try to find the files necessary for SSL verification on your system, but sometimes this results in an error. If you'd like to skip SSL verification you can pass an option in the secondary options hash.
184
+
185
+ Zencoder::Job.create({:input => 's3://bucket/key.mp4'}, {:skip_ssl_verify => true})
186
+
187
+ Alternatively you can add it to the default options.
188
+
189
+ Zencoder::HTTP.default_options.merge!(:skip_ssl_verify => true)
190
+
181
191
  ### Default Options
182
192
 
183
193
  Default options are passed to the HTTP backend. These can be retrieved and modified.
@@ -3,19 +3,27 @@ class Zencoder
3
3
  class Typhoeus
4
4
 
5
5
  def self.post(url, options={})
6
- ::Typhoeus::Request.post(url, options)
6
+ perform(:post, url, options)
7
7
  end
8
8
 
9
9
  def self.put(url, options={})
10
- ::Typhoeus::Request.put(url, options)
10
+ perform(:put, url, options)
11
11
  end
12
12
 
13
13
  def self.get(url, options={})
14
- ::Typhoeus::Request.get(url, options)
14
+ perform(:get, url, options)
15
15
  end
16
16
 
17
17
  def self.delete(url, options={})
18
- ::Typhoeus::Request.delete(url, options)
18
+ perform(:delete, url, options)
19
+ end
20
+
21
+ def self.perform(method, url, options={})
22
+ if options.delete(:skip_ssl_verify)
23
+ options[:disable_ssl_peer_verification] = true
24
+ end
25
+
26
+ ::Typhoeus::Request.send(method, url, options)
19
27
  end
20
28
 
21
29
  end
@@ -1,3 +1,3 @@
1
1
  class Zencoder
2
- VERSION = '2.1.5'
2
+ VERSION = '2.1.6'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 1
8
- - 5
9
- version: 2.1.5
8
+ - 6
9
+ version: 2.1.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Sutton