zencoder 2.1.5 → 2.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +10 -0
- data/lib/zencoder/http/typhoeus.rb +12 -4
- data/lib/zencoder/version.rb +1 -1
- metadata +2 -2
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
|
-
|
6
|
+
perform(:post, url, options)
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.put(url, options={})
|
10
|
-
|
10
|
+
perform(:put, url, options)
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.get(url, options={})
|
14
|
-
|
14
|
+
perform(:get, url, options)
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.delete(url, options={})
|
18
|
-
|
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
|
data/lib/zencoder/version.rb
CHANGED