rev-api 2.2.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +22 -21
- data/.ruby-gemset +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +8 -8
- data/Gemfile +3 -3
- data/LICENSE +191 -191
- data/README.md +131 -132
- data/Rakefile +13 -13
- data/examples/cli.rb +270 -270
- data/lib/rev-api.rb +26 -26
- data/lib/rev-api/api.rb +326 -326
- data/lib/rev-api/api_serializable.rb +30 -30
- data/lib/rev-api/exceptions.rb +97 -97
- data/lib/rev-api/http_client.rb +97 -97
- data/lib/rev-api/models/order.rb +129 -130
- data/lib/rev-api/models/order_request.rb +292 -194
- data/lib/rev-api/version.rb +3 -3
- data/rev-api.gemspec +33 -34
- data/spec/fixtures/api_cassettes/cancel_order.yml +38 -38
- data/spec/fixtures/api_cassettes/cancel_order_not_allowed.yml +40 -40
- data/spec/fixtures/api_cassettes/get_attachment_content.yml +399 -399
- data/spec/fixtures/api_cassettes/get_attachment_content_as_pdf.yml +399 -399
- data/spec/fixtures/api_cassettes/get_attachment_content_as_text.yml +65 -65
- data/spec/fixtures/api_cassettes/get_attachment_content_as_youtube_transcript.yml +66 -66
- data/spec/fixtures/api_cassettes/get_attachment_content_unacceptable_representation.yml +42 -42
- data/spec/fixtures/api_cassettes/get_attachment_content_with_invalid_id.yml +42 -42
- data/spec/fixtures/api_cassettes/get_attachment_metadata.yml +42 -42
- data/spec/fixtures/api_cassettes/get_attachment_with_invalid_id.yml +40 -40
- data/spec/fixtures/api_cassettes/get_orders.yml +122 -122
- data/spec/fixtures/api_cassettes/get_orders_with_clientRef.yml +41 -41
- data/spec/fixtures/api_cassettes/get_tc_order.yml +44 -44
- data/spec/fixtures/api_cassettes/get_third_page_of_orders.yml +52 -52
- data/spec/fixtures/api_cassettes/link_input.yml +44 -44
- data/spec/fixtures/api_cassettes/link_input_with_all_attributes.yml +44 -44
- data/spec/fixtures/api_cassettes/link_input_with_spaces_in_filename.yml +45 -45
- data/spec/fixtures/api_cassettes/not_found_order.yml +42 -42
- data/spec/fixtures/api_cassettes/submit_cp_order.yml +44 -45
- data/spec/fixtures/api_cassettes/submit_su_order.yml +44 -45
- data/spec/fixtures/api_cassettes/submit_tc_order_with_account_balance.yml +44 -45
- data/spec/fixtures/api_cassettes/submit_tc_order_with_invalid_request.yml +45 -45
- data/spec/fixtures/api_cassettes/submit_tc_order_without_specifying_payment.yml +44 -45
- data/spec/fixtures/api_cassettes/unauthorized.yml +42 -42
- data/spec/fixtures/api_cassettes/upload_input.yml +90 -90
- data/spec/fixtures/api_cassettes/upload_input_with_invalid_content_type.yml +91 -91
- data/spec/lib/rev/api_spec.rb +30 -24
- data/spec/lib/rev/cancel_order_spec.rb +24 -24
- data/spec/lib/rev/exceptions_spec.rb +8 -8
- data/spec/lib/rev/get_attachment_content_spec.rb +79 -79
- data/spec/lib/rev/get_attachment_metadata_spec.rb +33 -33
- data/spec/lib/rev/get_order_spec.rb +52 -52
- data/spec/lib/rev/get_orders_spec.rb +62 -62
- data/spec/lib/rev/http_client_spec.rb +32 -32
- data/spec/lib/rev/models/order_request_spec.rb +122 -11
- data/spec/lib/rev/models/order_spec.rb +58 -58
- data/spec/lib/rev/post_inputs_spec.rb +94 -94
- data/spec/lib/rev/post_order_spec.rb +163 -163
- data/spec/spec_helper.rb +47 -49
- data/spec/test_helpers.rb +5 -0
- metadata +54 -69
- data/.coveralls.yml +0 -2
@@ -1,163 +1,163 @@
|
|
1
|
-
require_relative '../../spec_helper'
|
2
|
-
|
3
|
-
describe 'POST /orders' do
|
4
|
-
let(:client) { Rev.new('welcome', 'AAAAAu/YjZ3phXU5FsF35yIcgiA=', 'www.revtrunk.com') }
|
5
|
-
|
6
|
-
# some defaults we use often
|
7
|
-
let(:billing_address) { Rev::BillingAddress.new(
|
8
|
-
:street => '123 Pine Lane',
|
9
|
-
:street2 => 'Apt D',
|
10
|
-
:city => 'MyTown',
|
11
|
-
:state => 'MN',
|
12
|
-
:zip => '12345',
|
13
|
-
:country_alpha2 => 'US'
|
14
|
-
)}
|
15
|
-
|
16
|
-
let(:balance_payment) { Rev::Payment.new(Rev::Payment::TYPES[:account_balance]) }
|
17
|
-
let(:transcription_inputs) {
|
18
|
-
inputs = []
|
19
|
-
inputs << Rev::Input.new(:external_link => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc')
|
20
|
-
inputs << Rev::Input.new(:audio_length_seconds => 900, :external_link => 'https://vimeo.com/7976699')
|
21
|
-
}
|
22
|
-
let(:caption_inputs) {
|
23
|
-
inputs = []
|
24
|
-
inputs << Rev::Input.new(:video_length_seconds => 900, :external_link => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc')
|
25
|
-
}
|
26
|
-
let(:transcription_options) { Rev::TranscriptionOptions.new(transcription_inputs,
|
27
|
-
:verbatim => true, :timestamps => true) }
|
28
|
-
let(:caption_options) {
|
29
|
-
Rev::CaptionOptions.new(caption_inputs, :output_file_formats => ['SubRip'])
|
30
|
-
}
|
31
|
-
let(:subtitle_options) {
|
32
|
-
Rev::CaptionOptions.new(caption_inputs, :subtitle_languages => ['es','it'],
|
33
|
-
:output_file_formats => ['SubRip'])
|
34
|
-
}
|
35
|
-
|
36
|
-
it 'must place order using account balance' do
|
37
|
-
VCR.insert_cassette 'submit_tc_order_with_account_balance'
|
38
|
-
|
39
|
-
request = Rev::OrderRequest.new(
|
40
|
-
:transcription_options => transcription_options
|
41
|
-
)
|
42
|
-
|
43
|
-
new_order_num = client.submit_order(request)
|
44
|
-
|
45
|
-
new_order_num.must_equal 'TC0406615008'
|
46
|
-
expected_body = {
|
47
|
-
'payment' => {
|
48
|
-
'type' => 'AccountBalance'
|
49
|
-
},
|
50
|
-
'non_standard_tat_guarantee' => false,
|
51
|
-
'transcription_options' => {
|
52
|
-
'inputs' => [
|
53
|
-
{ 'external_link' => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc' },
|
54
|
-
{ 'external_link' => 'https://vimeo.com/7976699', 'audio_length_seconds' => 900 }
|
55
|
-
],
|
56
|
-
'verbatim' => true,
|
57
|
-
'timestamps' => true
|
58
|
-
}
|
59
|
-
}
|
60
|
-
assert_order_placement_success(expected_body)
|
61
|
-
end
|
62
|
-
|
63
|
-
it 'must default to account balance if payment property not set' do
|
64
|
-
VCR.insert_cassette 'submit_tc_order_without_specifying_payment'
|
65
|
-
|
66
|
-
request = Rev::OrderRequest.new(
|
67
|
-
:transcription_options => transcription_options
|
68
|
-
)
|
69
|
-
|
70
|
-
new_order_num = client.submit_order(request)
|
71
|
-
|
72
|
-
new_order_num.must_equal 'TC0406615008'
|
73
|
-
expected_body = {
|
74
|
-
'payment' => {
|
75
|
-
'type' => 'AccountBalance'
|
76
|
-
},
|
77
|
-
'non_standard_tat_guarantee' => false,
|
78
|
-
'transcription_options' => {
|
79
|
-
'inputs' => [
|
80
|
-
{ 'external_link' => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc' },
|
81
|
-
{ 'external_link' => 'https://vimeo.com/7976699', 'audio_length_seconds' => 900 }
|
82
|
-
],
|
83
|
-
'verbatim' => true,
|
84
|
-
'timestamps' => true
|
85
|
-
}
|
86
|
-
}
|
87
|
-
assert_order_placement_success(expected_body)
|
88
|
-
end
|
89
|
-
|
90
|
-
it 'must raise BadRequest error in case of request validation failure' do
|
91
|
-
VCR.insert_cassette 'submit_tc_order_with_invalid_request'
|
92
|
-
|
93
|
-
# example - missing transcription options
|
94
|
-
request = Rev::OrderRequest.new
|
95
|
-
|
96
|
-
action = lambda { client.submit_order(request) }
|
97
|
-
exception = action.must_raise Rev::BadRequestError
|
98
|
-
exception.message.must_match '10004: You must specify either transcription or caption options in an order'
|
99
|
-
exception.code.must_equal Rev::OrderRequestErrorCodes::OPTIONS_NOT_SPECIFIED
|
100
|
-
end
|
101
|
-
|
102
|
-
it 'must submit caption order with options' do
|
103
|
-
VCR.insert_cassette 'submit_cp_order'
|
104
|
-
|
105
|
-
request = Rev::OrderRequest.new(:caption_options => caption_options)
|
106
|
-
|
107
|
-
new_order_num = client.submit_order(request)
|
108
|
-
|
109
|
-
new_order_num.must_equal 'CP12345'
|
110
|
-
expected_body = {
|
111
|
-
'payment' => {
|
112
|
-
'type' => 'AccountBalance'
|
113
|
-
},
|
114
|
-
'non_standard_tat_guarantee' => false,
|
115
|
-
'caption_options' => {
|
116
|
-
'inputs'=> [
|
117
|
-
{ 'video_length_seconds' => 900, 'external_link' => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc' }
|
118
|
-
],
|
119
|
-
'output_file_formats' => [Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:subrip]]
|
120
|
-
}
|
121
|
-
}
|
122
|
-
assert_order_placement_success(expected_body)
|
123
|
-
end
|
124
|
-
|
125
|
-
it 'must submit subtitle order with options' do
|
126
|
-
VCR.insert_cassette 'submit_su_order'
|
127
|
-
|
128
|
-
request = Rev::OrderRequest.new(:caption_options => subtitle_options)
|
129
|
-
|
130
|
-
new_order_num = client.submit_order(request)
|
131
|
-
|
132
|
-
new_order_num.must_equal 'CP56789'
|
133
|
-
expected_body = {
|
134
|
-
'payment' => {
|
135
|
-
'type' => 'AccountBalance'
|
136
|
-
},
|
137
|
-
'non_standard_tat_guarantee' => false,
|
138
|
-
'caption_options' => {
|
139
|
-
'inputs'=> [
|
140
|
-
{ 'video_length_seconds' => 900, 'external_link' => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc' }
|
141
|
-
],
|
142
|
-
'subtitle_languages' => ['es','it'],
|
143
|
-
'output_file_formats' => [Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:subrip]]
|
144
|
-
}
|
145
|
-
}
|
146
|
-
assert_order_placement_success(expected_body)
|
147
|
-
end
|
148
|
-
|
149
|
-
after do
|
150
|
-
VCR.eject_cassette
|
151
|
-
end
|
152
|
-
|
153
|
-
private
|
154
|
-
|
155
|
-
def assert_order_placement_success(expected_body)
|
156
|
-
assert_requested(:post, /.*\/orders/, :times => 1) do |req|
|
157
|
-
req.headers['Content-Type'].must_equal 'application/json'
|
158
|
-
actual_body = JSON.load req.body
|
159
|
-
actual_body.must_equal expected_body
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
end
|
1
|
+
require_relative '../../spec_helper'
|
2
|
+
|
3
|
+
describe 'POST /orders' do
|
4
|
+
let(:client) { Rev.new('welcome', 'AAAAAu/YjZ3phXU5FsF35yIcgiA=', 'www.revtrunk.com') }
|
5
|
+
|
6
|
+
# some defaults we use often
|
7
|
+
let(:billing_address) { Rev::BillingAddress.new(
|
8
|
+
:street => '123 Pine Lane',
|
9
|
+
:street2 => 'Apt D',
|
10
|
+
:city => 'MyTown',
|
11
|
+
:state => 'MN',
|
12
|
+
:zip => '12345',
|
13
|
+
:country_alpha2 => 'US'
|
14
|
+
)}
|
15
|
+
|
16
|
+
let(:balance_payment) { Rev::Payment.new(Rev::Payment::TYPES[:account_balance]) }
|
17
|
+
let(:transcription_inputs) {
|
18
|
+
inputs = []
|
19
|
+
inputs << Rev::Input.new(:external_link => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc', accents: ['AmericanNeutral', 'Australian'])
|
20
|
+
inputs << Rev::Input.new(:audio_length_seconds => 900, :external_link => 'https://vimeo.com/7976699', speakers: ['Billy', 'Bob'], glossary: ['Sandwich'])
|
21
|
+
}
|
22
|
+
let(:caption_inputs) {
|
23
|
+
inputs = []
|
24
|
+
inputs << Rev::Input.new(:video_length_seconds => 900, :external_link => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc', speakers: ['Billy', 'Bob'], glossary: ['Sandwich'])
|
25
|
+
}
|
26
|
+
let(:transcription_options) { Rev::TranscriptionOptions.new(transcription_inputs,
|
27
|
+
:verbatim => true, :timestamps => true) }
|
28
|
+
let(:caption_options) {
|
29
|
+
Rev::CaptionOptions.new(caption_inputs, :output_file_formats => ['SubRip'])
|
30
|
+
}
|
31
|
+
let(:subtitle_options) {
|
32
|
+
Rev::CaptionOptions.new(caption_inputs, :subtitle_languages => ['es','it'],
|
33
|
+
:output_file_formats => ['SubRip'])
|
34
|
+
}
|
35
|
+
|
36
|
+
it 'must place order using account balance' do
|
37
|
+
VCR.insert_cassette 'submit_tc_order_with_account_balance'
|
38
|
+
|
39
|
+
request = Rev::OrderRequest.new(
|
40
|
+
:transcription_options => transcription_options
|
41
|
+
)
|
42
|
+
|
43
|
+
new_order_num = client.submit_order(request)
|
44
|
+
|
45
|
+
new_order_num.must_equal 'TC0406615008'
|
46
|
+
expected_body = {
|
47
|
+
'payment' => {
|
48
|
+
'type' => 'AccountBalance'
|
49
|
+
},
|
50
|
+
'non_standard_tat_guarantee' => false,
|
51
|
+
'transcription_options' => {
|
52
|
+
'inputs' => [
|
53
|
+
{ 'external_link' => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc', 'accents' => ['AmericanNeutral', 'Australian']},
|
54
|
+
{ 'external_link' => 'https://vimeo.com/7976699', 'audio_length_seconds' => 900, 'speakers' => ['Billy', 'Bob'], 'glossary' => ['Sandwich'] }
|
55
|
+
],
|
56
|
+
'verbatim' => true,
|
57
|
+
'timestamps' => true
|
58
|
+
}
|
59
|
+
}
|
60
|
+
assert_order_placement_success(expected_body)
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'must default to account balance if payment property not set' do
|
64
|
+
VCR.insert_cassette 'submit_tc_order_without_specifying_payment'
|
65
|
+
|
66
|
+
request = Rev::OrderRequest.new(
|
67
|
+
:transcription_options => transcription_options
|
68
|
+
)
|
69
|
+
|
70
|
+
new_order_num = client.submit_order(request)
|
71
|
+
|
72
|
+
new_order_num.must_equal 'TC0406615008'
|
73
|
+
expected_body = {
|
74
|
+
'payment' => {
|
75
|
+
'type' => 'AccountBalance'
|
76
|
+
},
|
77
|
+
'non_standard_tat_guarantee' => false,
|
78
|
+
'transcription_options' => {
|
79
|
+
'inputs' => [
|
80
|
+
{ 'external_link' => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc', 'accents' => ['AmericanNeutral', 'Australian']},
|
81
|
+
{ 'external_link' => 'https://vimeo.com/7976699', 'audio_length_seconds' => 900, 'speakers' => ['Billy', 'Bob'], 'glossary' => ['Sandwich'] }
|
82
|
+
],
|
83
|
+
'verbatim' => true,
|
84
|
+
'timestamps' => true
|
85
|
+
}
|
86
|
+
}
|
87
|
+
assert_order_placement_success(expected_body)
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'must raise BadRequest error in case of request validation failure' do
|
91
|
+
VCR.insert_cassette 'submit_tc_order_with_invalid_request'
|
92
|
+
|
93
|
+
# example - missing transcription options
|
94
|
+
request = Rev::OrderRequest.new
|
95
|
+
|
96
|
+
action = lambda { client.submit_order(request) }
|
97
|
+
exception = action.must_raise Rev::BadRequestError
|
98
|
+
exception.message.must_match '10004: You must specify either transcription or caption options in an order'
|
99
|
+
exception.code.must_equal Rev::OrderRequestErrorCodes::OPTIONS_NOT_SPECIFIED
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'must submit caption order with options' do
|
103
|
+
VCR.insert_cassette 'submit_cp_order'
|
104
|
+
|
105
|
+
request = Rev::OrderRequest.new(:caption_options => caption_options)
|
106
|
+
|
107
|
+
new_order_num = client.submit_order(request)
|
108
|
+
|
109
|
+
new_order_num.must_equal 'CP12345'
|
110
|
+
expected_body = {
|
111
|
+
'payment' => {
|
112
|
+
'type' => 'AccountBalance'
|
113
|
+
},
|
114
|
+
'non_standard_tat_guarantee' => false,
|
115
|
+
'caption_options' => {
|
116
|
+
'inputs'=> [
|
117
|
+
{ 'video_length_seconds' => 900, 'external_link' => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc', 'speakers' => ['Billy', 'Bob'], 'glossary' => ['Sandwich'] }
|
118
|
+
],
|
119
|
+
'output_file_formats' => [Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:subrip]]
|
120
|
+
}
|
121
|
+
}
|
122
|
+
assert_order_placement_success(expected_body)
|
123
|
+
end
|
124
|
+
|
125
|
+
it 'must submit subtitle order with options' do
|
126
|
+
VCR.insert_cassette 'submit_su_order'
|
127
|
+
|
128
|
+
request = Rev::OrderRequest.new(:caption_options => subtitle_options)
|
129
|
+
|
130
|
+
new_order_num = client.submit_order(request)
|
131
|
+
|
132
|
+
new_order_num.must_equal 'CP56789'
|
133
|
+
expected_body = {
|
134
|
+
'payment' => {
|
135
|
+
'type' => 'AccountBalance'
|
136
|
+
},
|
137
|
+
'non_standard_tat_guarantee' => false,
|
138
|
+
'caption_options' => {
|
139
|
+
'inputs'=> [
|
140
|
+
{ 'video_length_seconds' => 900, 'external_link' => 'http://www.youtube.com/watch?v=UF8uR6Z6KLc', 'speakers' => ['Billy', 'Bob'], 'glossary' => ['Sandwich'] }
|
141
|
+
],
|
142
|
+
'subtitle_languages' => ['es','it'],
|
143
|
+
'output_file_formats' => [Rev::CaptionOptions::OUTPUT_FILE_FORMATS[:subrip]]
|
144
|
+
}
|
145
|
+
}
|
146
|
+
assert_order_placement_success(expected_body)
|
147
|
+
end
|
148
|
+
|
149
|
+
after do
|
150
|
+
VCR.eject_cassette
|
151
|
+
end
|
152
|
+
|
153
|
+
private
|
154
|
+
|
155
|
+
def assert_order_placement_success(expected_body)
|
156
|
+
assert_requested(:post, /.*\/orders/, :times => 1) do |req|
|
157
|
+
req.headers['Content-Type'].must_equal 'application/json'
|
158
|
+
actual_body = JSON.load req.body
|
159
|
+
actual_body.must_equal expected_body
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,49 +1,47 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
require '
|
8
|
-
require '
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
c.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
c.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
expected_request.headers
|
46
|
-
|
47
|
-
|
48
|
-
end
|
49
|
-
end
|
1
|
+
require_relative '../lib/rev-api'
|
2
|
+
require_relative 'test_helpers.rb'
|
3
|
+
|
4
|
+
#dependencies
|
5
|
+
require 'minitest/autorun'
|
6
|
+
require 'webmock/minitest'
|
7
|
+
require 'vcr'
|
8
|
+
require 'turn'
|
9
|
+
|
10
|
+
module MiniTest
|
11
|
+
class Spec
|
12
|
+
class << self
|
13
|
+
def xit(desc='anonymous')
|
14
|
+
it(name) { skip 'DISABLED' }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
Turn.config do |c|
|
21
|
+
c.format = :outline
|
22
|
+
c.trace = false
|
23
|
+
c.natural = true
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
VCR.configure do |c|
|
28
|
+
c.cassette_library_dir = 'spec/fixtures/api_cassettes'
|
29
|
+
c.default_cassette_options = { :record => :once, :allow_unused_http_interactions => false,
|
30
|
+
:match_requests_on => [:method, :uri, :rev_headers] }
|
31
|
+
c.hook_into :webmock
|
32
|
+
c.ignore_hosts 'www.example.com' # used to stub requests manually, see http_client_spec
|
33
|
+
|
34
|
+
# http://ruby-doc.org/stdlib-2.0.0/libdoc/net/http/rdoc/Net/HTTP.html#label-Compression - we ignore 'Accept-Encoding'
|
35
|
+
c.register_request_matcher :rev_headers do |actual_request, expected_request|
|
36
|
+
actual_request.headers.delete 'Accept-Encoding'
|
37
|
+
|
38
|
+
# ignore specific version of a client recorded
|
39
|
+
actual_user_agent = actual_request.headers['User-Agent'].to_s.split('/').first
|
40
|
+
expected_user_agent = actual_request.headers['User-Agent'].to_s.split('/').first
|
41
|
+
|
42
|
+
actual_request.headers.delete 'User-Agent'
|
43
|
+
expected_request.headers.delete 'User-Agent'
|
44
|
+
|
45
|
+
actual_request.headers == expected_request.headers# && actual_user_agent == expected_user_agent
|
46
|
+
end
|
47
|
+
end
|
metadata
CHANGED
@@ -1,171 +1,157 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rev-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
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:
|
11
|
+
date: 2020-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.11'
|
20
|
-
- - '>='
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 0.11.0
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0.11'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.11'
|
30
|
-
- - '>='
|
27
|
+
- - "~>"
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: 0.11.0
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0.11'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: webmock
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - ~>
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '1.11'
|
40
|
-
- - ~>
|
37
|
+
- - "~>"
|
41
38
|
- !ruby/object:Gem::Version
|
42
39
|
version: 1.11.0
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '1.11'
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - ~>
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '1.11'
|
50
|
-
- - ~>
|
47
|
+
- - "~>"
|
51
48
|
- !ruby/object:Gem::Version
|
52
49
|
version: 1.11.0
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '1.11'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: vcr
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - ~>
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '2.6'
|
60
|
-
- - ~>
|
57
|
+
- - "~>"
|
61
58
|
- !ruby/object:Gem::Version
|
62
59
|
version: 2.6.0
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '2.6'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '2.6'
|
70
|
-
- - ~>
|
67
|
+
- - "~>"
|
71
68
|
- !ruby/object:Gem::Version
|
72
69
|
version: 2.6.0
|
70
|
+
- - "~>"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '2.6'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: turn
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- - ~>
|
77
|
+
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0.9'
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.9.6
|
83
83
|
type: :development
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.9'
|
90
|
-
- - ~>
|
90
|
+
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: 0.9.6
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: rake
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- - ~>
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '10.1'
|
100
|
-
- - '>='
|
97
|
+
- - "~>"
|
101
98
|
- !ruby/object:Gem::Version
|
102
99
|
version: 10.1.0
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '10.1'
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '10.1'
|
110
|
-
- - '>='
|
107
|
+
- - "~>"
|
111
108
|
- !ruby/object:Gem::Version
|
112
109
|
version: 10.1.0
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '10.1'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: yard
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- - ~>
|
117
|
+
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
119
|
+
version: 0.9.14
|
120
120
|
type: :development
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- - ~>
|
124
|
+
- - "~>"
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version:
|
126
|
+
version: 0.9.14
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: redcarpet
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- - ~>
|
131
|
+
- - "~>"
|
132
132
|
- !ruby/object:Gem::Version
|
133
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
140
|
version: '3.3'
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: rubygems-tasks
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
|
-
- - ~>
|
145
|
+
- - "~>"
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
type: :development
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
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'
|
169
155
|
description: Communicate with Rev.com API using plain Ruby objects without bothering
|
170
156
|
about HTTP
|
171
157
|
email: api@rev.com
|
@@ -173,11 +159,10 @@ executables: []
|
|
173
159
|
extensions: []
|
174
160
|
extra_rdoc_files: []
|
175
161
|
files:
|
176
|
-
- .
|
177
|
-
- .
|
178
|
-
- .ruby-
|
179
|
-
- .
|
180
|
-
- .travis.yml
|
162
|
+
- ".gitignore"
|
163
|
+
- ".ruby-gemset"
|
164
|
+
- ".ruby-version"
|
165
|
+
- ".travis.yml"
|
181
166
|
- Gemfile
|
182
167
|
- LICENSE
|
183
168
|
- README.md
|
@@ -232,6 +217,7 @@ files:
|
|
232
217
|
- spec/lib/rev/post_inputs_spec.rb
|
233
218
|
- spec/lib/rev/post_order_spec.rb
|
234
219
|
- spec/spec_helper.rb
|
220
|
+
- spec/test_helpers.rb
|
235
221
|
- spec/tmp_get_attachment_content
|
236
222
|
homepage: https://www.rev.com/api
|
237
223
|
licenses:
|
@@ -244,17 +230,16 @@ require_paths:
|
|
244
230
|
- spec
|
245
231
|
required_ruby_version: !ruby/object:Gem::Requirement
|
246
232
|
requirements:
|
247
|
-
- -
|
233
|
+
- - ">="
|
248
234
|
- !ruby/object:Gem::Version
|
249
235
|
version: 2.0.0
|
250
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
237
|
requirements:
|
252
|
-
- -
|
238
|
+
- - ">="
|
253
239
|
- !ruby/object:Gem::Version
|
254
240
|
version: '0'
|
255
241
|
requirements: []
|
256
|
-
|
257
|
-
rubygems_version: 2.4.8
|
242
|
+
rubygems_version: 3.0.3
|
258
243
|
signing_key:
|
259
244
|
specification_version: 4
|
260
245
|
summary: Ruby wrapper for Rev.com API
|