zencoder 2.0.0 → 2.1.0

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/lib/zencoder.rb CHANGED
@@ -4,19 +4,13 @@ require 'net/https'
4
4
  require 'timeout'
5
5
 
6
6
  # Gems
7
- require 'multi_json'
8
-
9
- begin
10
- MultiJson.engine
11
- rescue LoadError
12
- require 'json'
13
- end
7
+ require 'active_support' # JSON and XML parsing/encoding
14
8
 
15
9
  # Zencoder
16
10
  require 'zencoder/zencoder'
17
- require 'zencoder/http'
18
11
  require 'zencoder/http/net_http'
19
12
  require 'zencoder/http/typhoeus'
13
+ require 'zencoder/http'
20
14
  require 'zencoder/errors'
21
15
  require 'zencoder/job'
22
16
  require 'zencoder/output'
@@ -1,24 +1,24 @@
1
- module Zencoder::Account
1
+ class Zencoder
2
+ class Account < Zencoder
2
3
 
3
- extend Zencoder
4
+ def self.create(params={}, options={})
5
+ HTTP.post("#{base_url}/account", encode(params, options[:format]), options)
6
+ end
4
7
 
5
- def self.create(params={}, options={})
6
- Zencoder::HTTP.post("#{Zencoder.base_url}/account", MultiJson.encode(params), options)
7
- end
8
+ def self.details(options={})
9
+ params = {:api_key => options.delete(:api_key) || api_key}
10
+ HTTP.get("#{base_url}/account", merge_params(options, params))
11
+ end
8
12
 
9
- def self.details(options={})
10
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key}
11
- Zencoder::HTTP.get("#{Zencoder.base_url}/account", merge_params(options, params))
12
- end
13
+ def self.integration(options={})
14
+ params = {:api_key => options.delete(:api_key) || api_key}
15
+ HTTP.get("#{base_url}/account/integration", merge_params(options, params))
16
+ end
13
17
 
14
- def self.integration(options={})
15
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key}
16
- Zencoder::HTTP.get("#{Zencoder.base_url}/account/integration", merge_params(options, params))
17
- end
18
+ def self.live(options={})
19
+ params = {:api_key => options.delete(:api_key) || api_key}
20
+ HTTP.get("#{base_url}/account/live", merge_params(options, params))
21
+ end
18
22
 
19
- def self.live(options={})
20
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key}
21
- Zencoder::HTTP.get("#{Zencoder.base_url}/account/live", merge_params(options, params))
22
23
  end
23
-
24
24
  end
@@ -1,5 +1,4 @@
1
- class Zencoder::Error < StandardError
2
- end
3
-
4
- class Zencoder::HTTPError < Zencoder::Error
1
+ class Zencoder
2
+ class Error < StandardError; end
3
+ class HTTPError < Error; end
5
4
  end
data/lib/zencoder/http.rb CHANGED
@@ -1,56 +1,90 @@
1
- module Zencoder::HTTP
1
+ class Zencoder
2
+ class HTTP < Zencoder
2
3
 
3
- class << self
4
- attr_accessor :default_options
5
- attr_writer :http_backend
6
- end
4
+ attr_accessor :body, :url, :options, :method, :format
7
5
 
8
- self.default_options = {:timeout => 10000,
9
- :headers => {'Accept' => 'application/json',
10
- 'Content-Type' => 'application/json'}}
6
+ cattr_accessor :default_options
7
+ cattr_accessor :http_backend
11
8
 
12
- def self.http_backend
13
- @http_backend ||= Zencoder::HTTP::NetHTTP
14
- end
9
+ self.http_backend = NetHTTP
15
10
 
16
- def self.post(url, body, options={})
17
- perform_method(:post, url, options.merge(:body => body))
18
- end
11
+ self.default_options = {:timeout => 10000,
12
+ :headers => {'Accept' => 'application/json',
13
+ 'Content-Type' => 'application/json'}}
19
14
 
20
- def self.put(url, body, options={})
21
- perform_method(:put, url, options.merge(:body => body))
22
- end
15
+ def initialize(method, url, options={})
16
+ self.method = method
17
+ self.url = url
18
+ self.options = options
19
+ self.format = options.delete(:format)
20
+ self.body = options.delete(:body)
21
+ end
23
22
 
24
- def self.get(url, options={})
25
- perform_method(:get, url, options)
26
- end
23
+ def self.post(url, body, options={})
24
+ new(:post, url, options.merge(:body => body)).perform_method
25
+ end
27
26
 
28
- def self.delete(url, options={})
29
- perform_method(:delete, url, options)
30
- end
27
+ def self.put(url, body, options={})
28
+ new(:put, url, options.merge(:body => body)).perform_method
29
+ end
31
30
 
31
+ def self.get(url, options={})
32
+ new(:get, url, options).perform_method
33
+ end
32
34
 
33
- protected
35
+ def self.delete(url, options={})
36
+ new(:delete, url, options).perform_method
37
+ end
34
38
 
35
- def self.perform_method(method, url, options)
36
- process_response http_backend.send(method, url, self.default_options.merge(options))
37
- rescue StandardError => e
38
- raise Zencoder::HTTPError, "#{e.class} - #{e.message}"
39
- end
39
+ def perform_method
40
+ process(http_backend.send(method, url, options))
41
+ rescue StandardError => e
42
+ raise HTTPError, "#{e.class} - #{e.message}"
43
+ end
44
+
45
+ def options=(value)
46
+ @options = default_options.merge(value || {})
40
47
 
41
- def self.process_response(http_backend_response)
42
- response = Zencoder::Response.new
43
- response.code = http_backend_response.code
48
+ options[:headers] ||= {}
49
+ options[:headers]['Accept'] ||= "application/#{format}"
50
+ options[:headers]['Content-Type'] ||= "application/#{format}"
44
51
 
45
- begin
46
- response.body = MultiJson.decode(http_backend_response.body.to_s)
47
- rescue StandardError # Hack! Returns different exceptions depending on the JSON engine
48
- response.body = http_backend_response.body
52
+ options
49
53
  end
50
54
 
51
- response.raw_body = http_backend_response.body
52
- response.raw_response = http_backend_response
53
- response
54
- end
55
+ def options
56
+ @options || self.options = default_options
57
+ end
58
+
59
+ def format
60
+ @format ||= :json
61
+ end
62
+
63
+ def http_backend
64
+ self.class.http_backend
65
+ end
66
+
67
+ def default_options
68
+ self.class.default_options
69
+ end
55
70
 
71
+
72
+ protected
73
+
74
+ def process(http_response)
75
+ response = Response.new
76
+ response.code = http_response.code
77
+
78
+ begin
79
+ response.body = decode(http_response.body.to_s, format)
80
+ rescue StandardError # Hack! Returns different exceptions depending on the decoding engine
81
+ response.body = http_response.body
82
+ end
83
+
84
+ response.raw_body = http_response.body
85
+ response.raw_response = http_response
86
+ response
87
+ end
88
+
89
+ end
56
90
  end
@@ -1,142 +1,139 @@
1
1
  # Ruby's Net/HTTP Sucks
2
2
  # Borrowed root cert checking from http://redcorundum.blogspot.com/2008/03/ssl-certificates-and-nethttps.html
3
3
 
4
- module Zencoder::HTTP::NetHTTP
5
-
6
- class << self
7
- attr_accessor :root_cert_paths
8
- end
9
-
10
- self.root_cert_paths = ['/etc/ssl/certs',
11
- '/var/ssl',
12
- '/usr/share/ssl',
13
- '/usr/ssl',
14
- '/etc/ssl',
15
- '/usr/local/openssl',
16
- '/usr/lib/ssl',
17
- '/System/Library/OpenSSL',
18
- '/etc/openssl',
19
- '/usr/local/ssl',
20
- '/etc/pki/tls']
21
-
22
- def self.post(url, options={})
23
- uri = URI.parse(url)
24
- add_params_to_query_string(uri, options[:params])
25
-
26
- request = Net::HTTP::Post.new(path_with_query_string(uri))
27
-
28
- add_headers(request, options[:headers])
29
- add_body(request, options[:body])
30
-
31
- request_with_timeout(http_with_ssl(uri), request, options[:timeout])
32
- end
4
+ class Zencoder
5
+ class HTTP < Zencoder
6
+ class NetHTTP
7
+
8
+ attr_accessor :method, :url, :uri, :body, :params, :headers, :timeout, :options
9
+
10
+ cattr_accessor :root_cert_paths
11
+
12
+ self.root_cert_paths = ['/etc/ssl/certs',
13
+ '/var/ssl',
14
+ '/usr/share/ssl',
15
+ '/usr/ssl',
16
+ '/etc/ssl',
17
+ '/usr/local/openssl',
18
+ '/usr/lib/ssl',
19
+ '/System/Library/OpenSSL',
20
+ '/etc/openssl',
21
+ '/usr/local/ssl',
22
+ '/etc/pki/tls']
23
+
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
32
+ end
33
33
 
34
- def self.put(url, options={})
35
- uri = URI.parse(url)
36
- add_params_to_query_string(uri, options[:params])
34
+ def self.post(url, options={})
35
+ new(:post, url, options).perform
36
+ end
37
37
 
38
- request = Net::HTTP::Put.new(path_with_query_string(uri))
38
+ def self.put(url, options={})
39
+ new(:get, url, options).perform
40
+ end
39
41
 
40
- add_headers(request, options[:headers])
41
- add_body(request, options[:body])
42
+ def self.get(url, options={})
43
+ new(:get, url, options).perform
44
+ end
42
45
 
43
- request_with_timeout(http_with_ssl(uri), request, options[:timeout])
44
- end
46
+ def self.delete(url, options={})
47
+ new(:delete, url, options).perform
48
+ end
45
49
 
46
- def self.get(url, options={})
47
- uri = URI.parse(url)
48
- add_params_to_query_string(uri, options[:params])
50
+ def perform
51
+ deliver(http, request)
52
+ end
49
53
 
50
- request = Net::HTTP::Get.new(path_with_query_string(uri))
51
54
 
52
- add_headers(request, options[:headers])
55
+ protected
53
56
 
54
- request_with_timeout(http_with_ssl(uri), request, options[:timeout])
55
- end
57
+ def deliver(http, request)
58
+ if timeout
59
+ Timeout.timeout(timeout / 1000.0) do
60
+ http.request(request)
61
+ end
62
+ else
63
+ http.request(request)
64
+ end
65
+ end
56
66
 
57
- def self.delete(url, options={})
58
- uri = URI.parse(url)
59
- add_params_to_query_string(uri, options[:params])
67
+ def http
68
+ u = uri
60
69
 
61
- request = Net::HTTP::Delete.new(path_with_query_string(uri))
70
+ http = Net::HTTP.new(u.host, u.port)
62
71
 
63
- add_headers(request, options[:headers])
72
+ if u.scheme == 'https'
73
+ http.use_ssl = true
64
74
 
65
- request_with_timeout(http_with_ssl(uri), request, options[:timeout])
66
- end
75
+ if root_cert_path = locate_root_cert_path
76
+ http.ca_path = root_cert_path
77
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
78
+ http.verify_depth = 5
79
+ else
80
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
81
+ end
82
+ end
67
83
 
84
+ http
85
+ end
68
86
 
69
- protected
87
+ def request
88
+ r = request_class.new(path)
89
+ r.body = body if body
90
+ if headers
91
+ headers.each do |header, value|
92
+ r.add_field(header.to_s, value.to_s)
93
+ end
94
+ end
95
+ r
96
+ end
70
97
 
71
- def self.http_with_ssl(uri)
72
- http = Net::HTTP.new(uri.host, uri.port)
98
+ def uri
99
+ u = URI.parse(url)
73
100
 
74
- if uri.scheme == 'https'
75
- http.use_ssl = true
101
+ if params
102
+ params_as_query = params.map{|k,v| "#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}"}.join('&')
103
+ if u.query.to_s.empty?
104
+ u.query = params_as_query
105
+ else
106
+ u.query = [u.query.to_s, params_as_query].join('&')
107
+ end
108
+ end
76
109
 
77
- if root_cert_path = locate_root_cert_path
78
- http.ca_path = root_cert_path
79
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
80
- http.verify_depth = 5
81
- else
82
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
110
+ u
83
111
  end
84
- end
85
-
86
- http
87
- end
88
-
89
- def self.path_with_query_string(uri)
90
- if uri.path.empty?
91
- uri.path = '/'
92
- end
93
112
 
94
- if uri.query.to_s.empty?
95
- uri.path
96
- else
97
- uri.path + '?' + uri.query.to_s
98
- end
99
- end
113
+ def path
114
+ u = uri
100
115
 
101
- def self.locate_root_cert_path
102
- root_cert_paths.detect do |root_cert_path|
103
- File.directory?(root_cert_path)
104
- end
105
- end
116
+ if u.path.empty?
117
+ u.path = '/'
118
+ end
106
119
 
107
- def self.add_headers(request, headers)
108
- if headers
109
- headers.each do |header, value|
110
- request.add_field(header.to_s, value.to_s)
120
+ if u.query.to_s.empty?
121
+ u.path
122
+ else
123
+ u.path + '?' + u.query.to_s
124
+ end
111
125
  end
112
- end
113
- end
114
-
115
- def self.add_body(request, body)
116
- if body
117
- request.body = body
118
- end
119
- end
120
126
 
121
- def self.add_params_to_query_string(uri, params)
122
- if params
123
- params_as_query = params.map{|k,v| "#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}"}.join('&')
124
- if uri.query.to_s.empty?
125
- uri.query = params_as_query
126
- else
127
- uri.query = [uri.query.to_s, params_as_query].join('&')
127
+ def request_class
128
+ Net::HTTP.const_get(method.to_s.capitalize)
128
129
  end
129
- end
130
- end
131
130
 
132
- def self.request_with_timeout(http, request, timeout)
133
- if timeout
134
- Timeout.timeout(timeout / 1000.0) do
135
- http.request(request)
131
+ def locate_root_cert_path
132
+ self.class.root_cert_paths.detect do |root_cert_path|
133
+ File.directory?(root_cert_path)
134
+ end
136
135
  end
137
- else
138
- http.request(request)
136
+
139
137
  end
140
138
  end
141
-
142
139
  end
@@ -1,19 +1,23 @@
1
- module Zencoder::HTTP::Typhoeus
1
+ class Zencoder
2
+ class HTTP < Zencoder
3
+ class Typhoeus
2
4
 
3
- def self.post(url, options={})
4
- Typhoeus::Request.post(url, options)
5
- end
5
+ def self.post(url, options={})
6
+ ::Typhoeus::Request.post(url, options)
7
+ end
6
8
 
7
- def self.put(url, options={})
8
- Typhoeus::Request.put(url, options)
9
- end
9
+ def self.put(url, options={})
10
+ ::Typhoeus::Request.put(url, options)
11
+ end
10
12
 
11
- def self.get(url, options={})
12
- Typhoeus::Request.get(url, options)
13
- end
13
+ def self.get(url, options={})
14
+ ::Typhoeus::Request.get(url, options)
15
+ end
14
16
 
15
- def self.delete(url, options={})
16
- Typhoeus::Request.delete(url, options)
17
- end
17
+ def self.delete(url, options={})
18
+ ::Typhoeus::Request.delete(url, options)
19
+ end
18
20
 
21
+ end
22
+ end
19
23
  end
data/lib/zencoder/job.rb CHANGED
@@ -1,40 +1,40 @@
1
- module Zencoder::Job
1
+ class Zencoder
2
+ class Job < Zencoder
3
+
4
+ def self.create(params={}, options={})
5
+ params_with_api_key = {:api_key => api_key}.merge(params)
6
+ HTTP.post("#{base_url}/jobs",
7
+ encode(params_with_api_key, options[:format]),
8
+ options)
9
+ end
10
+
11
+ def self.list(options={})
12
+ params = {:api_key => options.delete(:api_key) || api_key,
13
+ :page => options.delete(:page) || 1,
14
+ :per_page => options.delete(:per_page) || 50 }
15
+
16
+ HTTP.get("#{base_url}/jobs", merge_params(options, params))
17
+ end
18
+
19
+ def self.details(job_id, options={})
20
+ params = {:api_key => options.delete(:api_key) || api_key}
21
+ HTTP.get("#{base_url}/jobs/#{job_id}", merge_params(options, params))
22
+ end
23
+
24
+ def self.resubmit(job_id, options={})
25
+ params = {:api_key => options.delete(:api_key) || api_key}
26
+ HTTP.get("#{base_url}/jobs/#{job_id}/resubmit", merge_params(options, params))
27
+ end
28
+
29
+ def self.cancel(job_id, options={})
30
+ params = {:api_key => options.delete(:api_key) || api_key}
31
+ HTTP.get("#{base_url}/jobs/#{job_id}/cancel", merge_params(options, params))
32
+ end
33
+
34
+ def self.delete(job_id, options={})
35
+ params = {:api_key => options.delete(:api_key) || api_key}
36
+ HTTP.delete("#{base_url}/jobs/#{job_id}", merge_params(options, params))
37
+ end
2
38
 
3
- extend Zencoder
4
-
5
- def self.create(params={}, options={})
6
- params_with_api_key = {:api_key => Zencoder.api_key}.merge(params)
7
- Zencoder::HTTP.post("#{Zencoder.base_url}/jobs",
8
- MultiJson.encode(params_with_api_key),
9
- options)
10
- end
11
-
12
- def self.list(options={})
13
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key,
14
- :page => options.delete(:page) || 1,
15
- :per_page => options.delete(:per_page) || 50 }
16
-
17
- Zencoder::HTTP.get("#{Zencoder.base_url}/jobs", merge_params(options, params))
18
39
  end
19
-
20
- def self.details(job_id, options={})
21
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key}
22
- Zencoder::HTTP.get("#{Zencoder.base_url}/jobs/#{job_id}", merge_params(options, params))
23
- end
24
-
25
- def self.resubmit(job_id, options={})
26
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key}
27
- Zencoder::HTTP.get("#{Zencoder.base_url}/jobs/#{job_id}/resubmit", merge_params(options, params))
28
- end
29
-
30
- def self.cancel(job_id, options={})
31
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key}
32
- Zencoder::HTTP.get("#{Zencoder.base_url}/jobs/#{job_id}/cancel", merge_params(options, params))
33
- end
34
-
35
- def self.delete(job_id, options={})
36
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key}
37
- Zencoder::HTTP.delete("#{Zencoder.base_url}/jobs/#{job_id}", merge_params(options, params))
38
- end
39
-
40
40
  end
@@ -1,13 +1,13 @@
1
- module Zencoder::Notification
1
+ class Zencoder
2
+ class Notification < Zencoder
2
3
 
3
- extend Zencoder
4
+ def self.list(options={})
5
+ params = {:api_key => options.delete(:api_key) || api_key,
6
+ :page => options.delete(:page) || 1,
7
+ :per_page => options.delete(:per_page) || 50 }
4
8
 
5
- def self.list(options={})
6
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key,
7
- :page => options.delete(:page) || 1,
8
- :per_page => options.delete(:per_page) || 50 }
9
+ HTTP.get("#{base_url}/notifications", merge_params(options, params))
10
+ end
9
11
 
10
- Zencoder::HTTP.get("#{Zencoder.base_url}/notifications", merge_params(options, params))
11
12
  end
12
-
13
13
  end
@@ -1,10 +1,10 @@
1
- module Zencoder::Output
1
+ class Zencoder
2
+ class Output < Zencoder
2
3
 
3
- extend Zencoder
4
+ def self.progress(output_id, options={})
5
+ params = {:api_key => options.delete(:api_key) || api_key}
6
+ HTTP.get("#{base_url}/outputs/#{output_id}/progress", merge_params(options, params))
7
+ end
4
8
 
5
- def self.progress(output_id, options={})
6
- params = {:api_key => options.delete(:api_key) || Zencoder.api_key}
7
- Zencoder::HTTP.get("#{Zencoder.base_url}/outputs/#{output_id}/progress", merge_params(options, params))
8
9
  end
9
-
10
10
  end
@@ -1,23 +1,25 @@
1
- class Zencoder::Response
1
+ class Zencoder
2
+ class Response < Zencoder
2
3
 
3
- attr_accessor :code, :body, :raw_body, :raw_response
4
+ attr_accessor :code, :body, :raw_body, :raw_response
4
5
 
5
- def initialize(options={})
6
- options.each do |k, v|
7
- send("#{k}=", v) if respond_to?("#{k}=")
6
+ def initialize(options={})
7
+ options.each do |k, v|
8
+ send("#{k}=", v) if respond_to?("#{k}=")
9
+ end
8
10
  end
9
- end
10
11
 
11
- def success?
12
- code.to_i > 199 && code.to_i < 300
13
- end
12
+ def success?
13
+ code.to_i > 199 && code.to_i < 300
14
+ end
14
15
 
15
- def errors
16
- if body.is_a?(Hash)
17
- Array(body['errors']).compact
18
- else
19
- []
16
+ def errors
17
+ if body.is_a?(Hash)
18
+ Array(body['errors']).compact
19
+ else
20
+ []
21
+ end
20
22
  end
21
- end
22
23
 
24
+ end
23
25
  end
@@ -1,3 +1,3 @@
1
- module Zencoder
2
- VERSION = '2.0.0'
1
+ class Zencoder
2
+ VERSION = '2.1.0'
3
3
  end
@@ -1,16 +1,44 @@
1
- module Zencoder
1
+ class Zencoder
2
2
 
3
- class << self
4
- attr_accessor :base_url
5
- attr_accessor :api_key
6
- end
3
+ cattr_accessor :base_url
4
+ cattr_accessor :api_key
7
5
 
8
6
  self.base_url = 'https://app.zencoder.com/api'
9
7
 
8
+ def self.encode(content, format)
9
+ if content.is_a?(String)
10
+ content
11
+ elsif format.to_s == 'xml'
12
+ content.to_xml
13
+ elsif
14
+ content.to_json
15
+ end
16
+ end
17
+
18
+ def encode(content, format)
19
+ self.class.encode(content, format)
20
+ end
21
+
22
+ def self.decode(content, format)
23
+ if content.is_a?(String)
24
+ if format.to_s == 'xml'
25
+ ActiveSupport::XmlMini.parse(content)
26
+ else
27
+ ActiveSupport::JSON.decode(content)
28
+ end
29
+ else
30
+ content
31
+ end
32
+ end
33
+
34
+ def decode(content, format)
35
+ self.class.decode(content, format)
36
+ end
37
+
10
38
 
11
39
  protected
12
40
 
13
- def merge_params(options, params)
41
+ def self.merge_params(options, params)
14
42
  if options[:params]
15
43
  options[:params] = options[:params].merge(params)
16
44
  options
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 2
7
+ - 1
7
8
  - 0
8
- - 0
9
- version: 2.0.0
9
+ version: 2.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Sutton
@@ -14,11 +14,11 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-21 00:00:00 -05:00
17
+ date: 2010-06-30 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: multi_json
21
+ name: active_support
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  requirements:
@@ -30,7 +30,7 @@ dependencies:
30
30
  type: :runtime
31
31
  version_requirements: *id001
32
32
  - !ruby/object:Gem::Dependency
33
- name: json_pure
33
+ name: shoulda
34
34
  prerelease: false
35
35
  requirement: &id002 !ruby/object:Gem::Requirement
36
36
  requirements:
@@ -39,10 +39,10 @@ dependencies:
39
39
  segments:
40
40
  - 0
41
41
  version: "0"
42
- type: :runtime
42
+ type: :development
43
43
  version_requirements: *id002
44
44
  - !ruby/object:Gem::Dependency
45
- name: shoulda
45
+ name: mocha
46
46
  prerelease: false
47
47
  requirement: &id003 !ruby/object:Gem::Requirement
48
48
  requirements:
@@ -54,7 +54,7 @@ dependencies:
54
54
  type: :development
55
55
  version_requirements: *id003
56
56
  - !ruby/object:Gem::Dependency
57
- name: mocha
57
+ name: webmock
58
58
  prerelease: false
59
59
  requirement: &id004 !ruby/object:Gem::Requirement
60
60
  requirements:
@@ -65,18 +65,6 @@ dependencies:
65
65
  version: "0"
66
66
  type: :development
67
67
  version_requirements: *id004
68
- - !ruby/object:Gem::Dependency
69
- name: webmock
70
- prerelease: false
71
- requirement: &id005 !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- segments:
76
- - 0
77
- version: "0"
78
- type: :development
79
- version_requirements: *id005
80
68
  description: Zencoder <http://zencoder.com> integration library.
81
69
  email: nate@zencoder.com
82
70
  executables: []