zencoder 2.4.5 → 2.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- metadata.gz: f2d73544861c0e7cd642361a2437816642ca58c7
4
- data.tar.gz: 5b52977521b2e4c8e560fd15d08f33183fb96600
5
- SHA512:
6
- metadata.gz: be6f1f160457b702c898017f093e3e40a1a0a2924158f8e9f460f9c90f0623cc55ceb753c43461e570e61bdfe65d22c101b481b353fe8ab88b15ce319d429c1d
7
- data.tar.gz: ca6c56a75f8ebaa4120c23b5158d6819642f1ba607fdd93223d736b83a5f333ceeaa69765a53c89f4d5369309760ad406d289a84f7d1a2a100e50f79ed5540f8
1
+ ---
2
+ SHA512:
3
+ metadata.gz: 351db11c5675afec136ffa1d94c2308524ec6d7dc20a86f1b2088358e10a92deec43c6ab73dd32668c1daed8d11c11af0bb9d01b3d2a2f4ed6e6033567956d01
4
+ data.tar.gz: c28f30c1f61425413c2d33eefccfe381a89115d738b7a305803de888d70b1e42b22810ffbec11b5644eb7dad65758e7bff773fe8e28ed2144938ef4bb3c9b8f4
5
+ SHA1:
6
+ metadata.gz: e5e76dc624b510ba4706620ed60ff6d3bdaf0a3a
7
+ data.tar.gz: 56394b5afa435c82578feb96a39de68aef7dc1bf
@@ -83,6 +83,7 @@ response.code # => 200
83
83
  response.body # => the JSON-parsed body or raw body if unparseable
84
84
  response.raw_body # => the body pre-JSON-parsing
85
85
  response.raw_response # => the raw Net::HTTP or Typhoeus response (see below for how to use Typhoeus)
86
+ response.request # => the request object, you can inspect it if you need details on the request to debug it
86
87
  ```
87
88
 
88
89
  ### Parameters
data/Rakefile CHANGED
@@ -9,28 +9,3 @@ Rake::TestTask.new(:test) do |test|
9
9
  end
10
10
 
11
11
  task :default => :test
12
-
13
- require 'rdoc/task'
14
-
15
- Rake::RDocTask.new do |rdoc|
16
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
17
-
18
- rdoc.rdoc_dir = 'rdoc'
19
- rdoc.title = "zencoder-rb #{version}"
20
- rdoc.rdoc_files.include('README*')
21
- rdoc.rdoc_files.include('lib/**/*.rb')
22
- end
23
-
24
- begin
25
- require 'rcov/rcovtask'
26
- Rcov::RcovTask.new do |test|
27
- test.libs << 'test'
28
- test.pattern = 'test/**/*_test.rb'
29
- test.verbose = true
30
- test.rcov_opts << '--exclude "gems/*"'
31
- end
32
- rescue LoadError
33
- task :rcov do
34
- abort "RCov is not available. In order to run rcov, you must: sudo gem install rcov"
35
- end
36
- end
@@ -75,11 +75,15 @@ module Zencoder
75
75
  self.class.default_options
76
76
  end
77
77
 
78
+ def inspect
79
+ "#{method.to_s.upcase} #{url}\nOptions: " + options.inspect
80
+ end
78
81
 
79
82
  protected
80
83
 
81
84
  def process(http_response)
82
85
  response = Response.new
86
+ response.request = self
83
87
  response.code = http_response.code
84
88
 
85
89
  begin
@@ -7,12 +7,12 @@ module Zencoder
7
7
  def initialize(method, url, options)
8
8
  @method = method
9
9
  @url = url
10
- @body = options.delete(:body)
11
- @params = options.delete(:params)
12
- @headers = options.delete(:headers)
13
- @timeout = options.delete(:timeout)
14
- @skip_ssl_verify = options.delete(:skip_ssl_verify)
15
- @options = options
10
+ @options = options.dup
11
+ @body = @options.delete(:body)
12
+ @params = @options.delete(:params)
13
+ @headers = @options.delete(:headers)
14
+ @timeout = @options.delete(:timeout)
15
+ @skip_ssl_verify = @options.delete(:skip_ssl_verify)
16
16
  end
17
17
 
18
18
  def self.post(url, options={})
@@ -19,6 +19,7 @@ module Zencoder
19
19
  end
20
20
 
21
21
  def self.perform(method, url, options={})
22
+ options = options.dup
22
23
  if options.delete(:skip_ssl_verify)
23
24
  options[:disable_ssl_peer_verification] = true
24
25
  end
@@ -30,5 +30,9 @@ module Zencoder
30
30
  put("/jobs/#{job_id}/cancel", nil, options)
31
31
  end
32
32
 
33
+ def self.finish(job_id, options={})
34
+ put("/jobs/#{job_id}/finish", nil, options)
35
+ end
36
+
33
37
  end
34
38
  end
@@ -1,7 +1,7 @@
1
1
  module Zencoder
2
2
  class Response
3
3
 
4
- attr_accessor :code, :body, :raw_body, :raw_response
4
+ attr_accessor :request, :code, :body, :raw_body, :raw_response
5
5
 
6
6
  def initialize(options={})
7
7
  options.each do |k, v|
@@ -1,3 +1,3 @@
1
1
  module Zencoder
2
- GEM_VERSION = '2.4.5'
2
+ GEM_VERSION = '2.4.6'
3
3
  end
metadata CHANGED
@@ -1,78 +1,61 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: zencoder
3
- version: !ruby/object:Gem::Version
4
- version: 2.4.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.4.6
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Nathan Sutton
8
8
  - Brandon Arbini
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-03 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2014-04-02 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
15
16
  name: multi_json
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :runtime
22
17
  prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - '>='
26
- - !ruby/object:Gem::Version
27
- version: '0'
28
- - !ruby/object:Gem::Dependency
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - &id002
21
+ - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ type: :runtime
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
29
27
  name: shoulda
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - '>='
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :development
36
28
  prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - '>='
40
- - !ruby/object:Gem::Version
41
- version: '0'
42
- - !ruby/object:Gem::Dependency
43
- name: mocha
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - '>='
47
- - !ruby/object:Gem::Version
48
- version: '0'
29
+ requirement: &id003 !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - *id002
49
32
  type: :development
33
+ version_requirements: *id003
34
+ - !ruby/object:Gem::Dependency
35
+ name: mocha
50
36
  prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - '>='
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: webmock
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - '>='
61
- - !ruby/object:Gem::Version
62
- version: '0'
37
+ requirement: &id004 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - *id002
63
40
  type: :development
41
+ version_requirements: *id004
42
+ - !ruby/object:Gem::Dependency
43
+ name: webmock
64
44
  prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
45
+ requirement: &id005 !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - *id002
48
+ type: :development
49
+ version_requirements: *id005
70
50
  description: Zencoder <http://zencoder.com> integration library.
71
51
  email: info@zencoder.com
72
52
  executables: []
53
+
73
54
  extensions: []
55
+
74
56
  extra_rdoc_files: []
75
- files:
57
+
58
+ files:
76
59
  - lib/zencoder/account.rb
77
60
  - lib/zencoder/errors.rb
78
61
  - lib/zencoder/http/net_http.rb
@@ -95,25 +78,27 @@ files:
95
78
  - Rakefile
96
79
  homepage: http://github.com/zencoder/zencoder-rb
97
80
  licenses: []
81
+
98
82
  metadata: {}
83
+
99
84
  post_install_message:
100
85
  rdoc_options: []
101
- require_paths:
86
+
87
+ require_paths:
102
88
  - lib
103
- required_ruby_version: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - '>='
106
- - !ruby/object:Gem::Version
107
- version: '0'
108
- required_rubygems_version: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - '>='
111
- - !ruby/object:Gem::Version
112
- version: '0'
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - *id002
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - *id002
113
95
  requirements: []
96
+
114
97
  rubyforge_project: zencoder
115
- rubygems_version: 2.1.11
98
+ rubygems_version: 2.0.14
116
99
  signing_key:
117
100
  specification_version: 4
118
101
  summary: Zencoder <http://zencoder.com> integration library.
119
102
  test_files: []
103
+
104
+ has_rdoc: