rev-api 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +0 -1
- data/Gemfile +0 -1
- data/README.md +0 -1
- data/lib/rev-api/models/order_request.rb +7 -3
- data/lib/rev-api/version.rb +1 -1
- data/rev-api.gemspec +3 -2
- data/spec/lib/rev/models/order_request_spec.rb +24 -13
- metadata +21 -8
- data/Gemfile.lock +0 -77
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6d9816d10431466d097102deefc91846e2dc1b1
|
4
|
+
data.tar.gz: be67240ab97c0b3f4cab2eb3ce8e6f1d39787fa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8aed8b6c55afc38a64d121e9eadbb6059e2ac1155ad0fc37c8b89aa020cd9e60b0ddfbdab321764c27bde0113250b07993d301818f2ae4c6de7398d26a4eea8
|
7
|
+
data.tar.gz: 68ae92704b2639777040c792765c4b73a13c05bcffc90a504562a256275c0c75829c3ab2c447221e25bf302656111560992058db5d4e184b3e97a970049c0434
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-
|
1
|
+
ruby-2.0.0
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -68,7 +68,6 @@ module Rev
|
|
68
68
|
|
69
69
|
# @param type [String] payment method
|
70
70
|
def initialize(type)
|
71
|
-
warn "[DEPRECATION] `Payment` option is now optional, since it will always default to AccountBalance"
|
72
71
|
@type = type
|
73
72
|
end
|
74
73
|
|
@@ -157,8 +156,13 @@ module Rev
|
|
157
156
|
OUTPUT_FILE_FORMATS = {
|
158
157
|
:subrip => 'SubRip',
|
159
158
|
:scc => 'Scc',
|
159
|
+
:mcc => 'Mcc',
|
160
160
|
:ttml => 'Ttml',
|
161
|
-
:qttext => 'QTtext'
|
161
|
+
:qttext => 'QTtext',
|
162
|
+
:transcript => 'Transcript',
|
163
|
+
:webvtt => 'WebVtt',
|
164
|
+
:dfxp => 'Dfxp',
|
165
|
+
:cheetahcap => 'CheetahCap'
|
162
166
|
}
|
163
167
|
|
164
168
|
def initialize(inputs, info = {})
|
@@ -211,7 +215,7 @@ module Rev
|
|
211
215
|
# - :final_only - (the default), notification is sent only when the order is complete
|
212
216
|
def initialize(url, level = nil)
|
213
217
|
@url = url
|
214
|
-
@level = level ? level :
|
218
|
+
@level = level ? level : LEVELS[:final_only]
|
215
219
|
end
|
216
220
|
end
|
217
221
|
end
|
data/lib/rev-api/version.rb
CHANGED
data/rev-api.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'rev-api'
|
6
6
|
s.version = Rev::VERSION
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
|
-
s.required_ruby_version = '>=
|
8
|
+
s.required_ruby_version = '>= 2.0.0'
|
9
9
|
s.date = Date.today.to_s
|
10
10
|
s.summary = "Ruby wrapper for Rev.com API"
|
11
11
|
s.description = "Communicate with Rev.com API using plain Ruby objects without bothering about HTTP"
|
@@ -26,8 +26,9 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_development_dependency('turn', '~> 0.9', '~> 0.9.6')
|
27
27
|
s.add_development_dependency('rake', '~> 10.1', '>= 10.1.0')
|
28
28
|
s.add_development_dependency('yard', '~> 0')
|
29
|
-
s.add_development_dependency('redcarpet')
|
29
|
+
s.add_development_dependency('redcarpet', '~> 3.3')
|
30
30
|
s.add_development_dependency('rubygems-tasks', '~> 0')
|
31
|
+
s.add_development_dependency('coveralls', '~> 0.8')
|
31
32
|
|
32
33
|
s.has_rdoc = 'yard'
|
33
34
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative '../../../spec_helper'
|
2
2
|
|
3
3
|
describe 'OrderRequest' do
|
4
|
-
|
4
|
+
|
5
5
|
it 'has normal priority' do
|
6
6
|
Rev::OrderRequest::PRIORITY[:normal].must_equal 'Normal'
|
7
7
|
end
|
@@ -14,24 +14,24 @@ describe 'OrderRequest' do
|
|
14
14
|
order = Rev::OrderRequest.new({})
|
15
15
|
order.priority.must_equal Rev::OrderRequest::PRIORITY[:normal]
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
it 'accepts priority during init' do
|
19
19
|
priority = Rev::OrderRequest::PRIORITY[:time_insensitivie]
|
20
20
|
order = Rev::OrderRequest.new({ 'priority' => priority })
|
21
21
|
order.priority.must_equal priority
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
it 'has caption options' do
|
25
25
|
order = Rev::OrderRequest.new({})
|
26
26
|
order.must_respond_to :caption_options
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
describe 'InputOptions' do
|
30
30
|
it 'is ApiSerializable' do
|
31
31
|
options = Rev::InputOptions.new([{}], {})
|
32
32
|
options.must_be_kind_of Rev::ApiSerializable
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
it 'requires non-empty inputs' do
|
36
36
|
proc { Rev::InputOptions.new([]) }.must_raise ArgumentError
|
37
37
|
end
|
@@ -39,14 +39,14 @@ describe 'OrderRequest' do
|
|
39
39
|
it 'requires non-nil inputs' do
|
40
40
|
proc { Rev::InputOptions.new(nil) }.must_raise ArgumentError
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
it 'sets inputs from init' do
|
44
44
|
inputs = ['foo']
|
45
45
|
options = Rev::InputOptions.new(inputs)
|
46
46
|
options.inputs.must_equal inputs
|
47
47
|
end
|
48
48
|
end
|
49
|
-
|
49
|
+
|
50
50
|
describe 'TranscriptionOptions' do
|
51
51
|
it 'is InputOptions' do
|
52
52
|
options = Rev::TranscriptionOptions.new([{}], {})
|
@@ -66,28 +66,39 @@ describe 'OrderRequest' do
|
|
66
66
|
options = Rev::CaptionOptions.new([{}], {})
|
67
67
|
options.must_be_kind_of Rev::InputOptions
|
68
68
|
end
|
69
|
-
|
69
|
+
|
70
70
|
it 'has output file formats attribute' do
|
71
71
|
options = Rev::CaptionOptions.new([{}], {})
|
72
72
|
options.must_respond_to :output_file_formats
|
73
73
|
end
|
74
|
-
|
74
|
+
|
75
75
|
it 'has output file formats hash' do
|
76
76
|
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:subrip].must_equal 'SubRip'
|
77
77
|
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:scc].must_equal 'Scc'
|
78
|
+
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:mcc].must_equal 'Mcc'
|
78
79
|
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:ttml].must_equal 'Ttml'
|
79
80
|
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:qttext].must_equal 'QTtext'
|
81
|
+
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:transcript].must_equal 'Transcript'
|
82
|
+
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:webvtt].must_equal 'WebVtt'
|
83
|
+
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:dfxp].must_equal 'Dfxp'
|
84
|
+
Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:cheetahcap].must_equal 'CheetahCap'
|
80
85
|
end
|
81
|
-
|
86
|
+
|
82
87
|
it 'rejects unknowns file formats' do
|
83
|
-
proc { Rev::CaptionOptions.new([{}], { :output_file_formats => ['invalid'] }) }.must_raise ArgumentError
|
88
|
+
proc { Rev::CaptionOptions.new([{}], { :output_file_formats => ['invalid'] }) }.must_raise ArgumentError
|
84
89
|
end
|
85
|
-
|
90
|
+
|
86
91
|
it 'accepts valid file formats' do
|
87
92
|
order = Rev::CaptionOptions.new([{}], { :output_file_formats => [Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:scc]] })
|
88
93
|
order.output_file_formats.length.must_equal 1
|
89
94
|
order.output_file_formats[0].must_equal Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:scc];
|
90
95
|
end
|
91
96
|
end # CaptionOptions
|
92
|
-
end
|
93
97
|
|
98
|
+
describe 'Notification' do
|
99
|
+
it 'Defaults level' do
|
100
|
+
notification = Rev::Notification.new('http://example.com/')
|
101
|
+
notification.level.must_equal Rev::Notification::LEVELS[:final_only]
|
102
|
+
end
|
103
|
+
end # Notification
|
104
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rev-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rev.com, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -128,16 +128,16 @@ dependencies:
|
|
128
128
|
name: redcarpet
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ~>
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: '
|
133
|
+
version: '3.3'
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
|
-
- -
|
138
|
+
- - ~>
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: '
|
140
|
+
version: '3.3'
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: rubygems-tasks
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
@@ -152,6 +152,20 @@ dependencies:
|
|
152
152
|
- - ~>
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '0'
|
155
|
+
- !ruby/object:Gem::Dependency
|
156
|
+
name: coveralls
|
157
|
+
requirement: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - ~>
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0.8'
|
162
|
+
type: :development
|
163
|
+
prerelease: false
|
164
|
+
version_requirements: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ~>
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0.8'
|
155
169
|
description: Communicate with Rev.com API using plain Ruby objects without bothering
|
156
170
|
about HTTP
|
157
171
|
email: api@rev.com
|
@@ -165,7 +179,6 @@ files:
|
|
165
179
|
- .ruby-version
|
166
180
|
- .travis.yml
|
167
181
|
- Gemfile
|
168
|
-
- Gemfile.lock
|
169
182
|
- LICENSE
|
170
183
|
- README.md
|
171
184
|
- Rakefile
|
@@ -233,7 +246,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
233
246
|
requirements:
|
234
247
|
- - '>='
|
235
248
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
249
|
+
version: 2.0.0
|
237
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
251
|
requirements:
|
239
252
|
- - '>='
|
data/Gemfile.lock
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rev-api (2.0.1)
|
5
|
-
httparty (~> 0.11, >= 0.11.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
addressable (2.3.8)
|
11
|
-
ansi (1.5.0)
|
12
|
-
coveralls (0.8.2)
|
13
|
-
json (~> 1.8)
|
14
|
-
rest-client (>= 1.6.8, < 2)
|
15
|
-
simplecov (~> 0.10.0)
|
16
|
-
term-ansicolor (~> 1.3)
|
17
|
-
thor (~> 0.19.1)
|
18
|
-
crack (0.4.2)
|
19
|
-
safe_yaml (~> 1.0.0)
|
20
|
-
docile (1.1.5)
|
21
|
-
domain_name (0.5.24)
|
22
|
-
unf (>= 0.0.5, < 1.0.0)
|
23
|
-
http-cookie (1.0.2)
|
24
|
-
domain_name (~> 0.5)
|
25
|
-
httparty (0.13.5)
|
26
|
-
json (~> 1.8)
|
27
|
-
multi_xml (>= 0.5.2)
|
28
|
-
json (1.8.3)
|
29
|
-
mime-types (2.6.2)
|
30
|
-
minitest (4.7.5)
|
31
|
-
multi_xml (0.5.5)
|
32
|
-
netrc (0.10.3)
|
33
|
-
rake (10.4.2)
|
34
|
-
redcarpet (3.3.2)
|
35
|
-
rest-client (1.8.0)
|
36
|
-
http-cookie (>= 1.0.2, < 2.0)
|
37
|
-
mime-types (>= 1.16, < 3.0)
|
38
|
-
netrc (~> 0.7)
|
39
|
-
rubygems-tasks (0.2.4)
|
40
|
-
safe_yaml (1.0.4)
|
41
|
-
simplecov (0.10.0)
|
42
|
-
docile (~> 1.1.0)
|
43
|
-
json (~> 1.8)
|
44
|
-
simplecov-html (~> 0.10.0)
|
45
|
-
simplecov-html (0.10.0)
|
46
|
-
term-ansicolor (1.3.2)
|
47
|
-
tins (~> 1.0)
|
48
|
-
thor (0.19.1)
|
49
|
-
tins (1.6.0)
|
50
|
-
turn (0.9.7)
|
51
|
-
ansi
|
52
|
-
minitest (~> 4)
|
53
|
-
unf (0.1.4)
|
54
|
-
unf_ext
|
55
|
-
unf_ext (0.0.7.1)
|
56
|
-
vcr (2.6.0)
|
57
|
-
webmock (1.11.0)
|
58
|
-
addressable (>= 2.2.7)
|
59
|
-
crack (>= 0.3.2)
|
60
|
-
yard (0.8.7.6)
|
61
|
-
|
62
|
-
PLATFORMS
|
63
|
-
ruby
|
64
|
-
|
65
|
-
DEPENDENCIES
|
66
|
-
coveralls
|
67
|
-
rake (~> 10.1, >= 10.1.0)
|
68
|
-
redcarpet
|
69
|
-
rev-api!
|
70
|
-
rubygems-tasks (~> 0)
|
71
|
-
turn (~> 0.9.6, ~> 0.9)
|
72
|
-
vcr (~> 2.6.0, ~> 2.6)
|
73
|
-
webmock (~> 1.11.0, ~> 1.11)
|
74
|
-
yard (~> 0)
|
75
|
-
|
76
|
-
BUNDLED WITH
|
77
|
-
1.10.6
|