zencoder 2.1.6 → 2.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zencoder/http.rb +3 -3
- data/lib/zencoder/job.rb +1 -1
- data/lib/zencoder/version.rb +1 -1
- metadata +3 -3
data/lib/zencoder/http.rb
CHANGED
@@ -15,8 +15,8 @@ class Zencoder
|
|
15
15
|
def initialize(method, url, options={})
|
16
16
|
self.method = method
|
17
17
|
self.url = url
|
18
|
-
self.options = options
|
19
18
|
self.format = options.delete(:format)
|
19
|
+
self.options = options
|
20
20
|
self.body = options.delete(:body)
|
21
21
|
end
|
22
22
|
|
@@ -46,8 +46,8 @@ class Zencoder
|
|
46
46
|
@options = default_options.merge(value || {})
|
47
47
|
|
48
48
|
options[:headers] ||= {}
|
49
|
-
options[:headers]['Accept']
|
50
|
-
options[:headers]['Content-Type']
|
49
|
+
options[:headers]['Accept'] = "application/#{format}"
|
50
|
+
options[:headers]['Content-Type'] = "application/#{format}"
|
51
51
|
|
52
52
|
options
|
53
53
|
end
|
data/lib/zencoder/job.rb
CHANGED
@@ -2,7 +2,7 @@ class Zencoder
|
|
2
2
|
class Job < Zencoder
|
3
3
|
|
4
4
|
def self.create(params={}, options={})
|
5
|
-
params_with_api_key = {:api_key => api_key}.merge(params)
|
5
|
+
params_with_api_key = {:api_key => api_key}.merge(decode(params, options[:format]))
|
6
6
|
HTTP.post("#{base_url}/jobs",
|
7
7
|
encode(params_with_api_key, options[:format]),
|
8
8
|
options)
|
data/lib/zencoder/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 2
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 2.1.
|
8
|
+
- 7
|
9
|
+
version: 2.1.7
|
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-
|
17
|
+
date: 2010-07-20 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|