poms 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +11 -3
- data/README.md +12 -0
- data/lib/poms/api/auth.rb +40 -0
- data/lib/poms/api/request.rb +44 -0
- data/lib/poms/merged_series.rb +5 -4
- data/lib/poms/version.rb +1 -1
- data/poms.gemspec +4 -5
- data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast_starts_at/returns_a_datetime.yml +17 -17
- data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_position.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_title.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_video_url.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_an_image_id.yml +17 -17
- data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_current_broadcast_fetches_the_current_broadcast.yml +17 -17
- data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_fetches_the_current_broadcast.yml +68 -0
- data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_returns_the_key.yml +68 -0
- data/spec/fixtures/vcr_cassettes/poms/merged_series/turns_the_json_into_a_hash.yml +19 -19
- data/spec/fixtures/vcr_cassettes/poms_fetch/a_broadcast_has_scheduled_events_with_last_with_starts_at.yml +13 -13
- data/spec/fixtures/vcr_cassettes/poms_fetch/a_clip_has_a_title.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms_fetch/an_aankeiler_has_images.yml +13 -13
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_mid.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_title.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_scheduled_events_with_last_with_starts_at.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_broadcast_with_a_mid.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_key.yml +16 -16
- data/spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_media_type.yml +409 -383
- data/spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_title.yml +409 -383
- data/spec/fixtures/vcr_cassettes/poms_fetch_playlist_clips/creates_an_array_of_clips.yml +987 -906
- data/spec/lib/poms/api/auth_spec.rb +34 -0
- data/spec/lib/poms/api/request_spec.rb +30 -0
- data/spec/lib/poms/builderless/clip_spec.rb +2 -2
- data/spec/lib/poms/merged_series_spec.rb +8 -10
- data/spec/lib/poms/views_spec.rb +2 -2
- data/spec/lib/poms_spec.rb +14 -14
- data/spec/spec_helper.rb +4 -4
- metadata +14 -18
- data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_position.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_title.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_video_url.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_an_image_id.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms/merged_series/is_enumerable.yml +0 -46
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'poms/api/auth'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
RSpec.describe Poms::Api::Auth do
|
5
|
+
describe '.encode' do
|
6
|
+
it 'encodes the message with the secret' do
|
7
|
+
expect(described_class.encode('secret', 'message'))
|
8
|
+
.to eq("i19IcCmVwVmMVz2x4hhmqbgl1KeU0WnXBgoDYFeWNgs=\n")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '.message' do
|
13
|
+
it 'creates a message' do
|
14
|
+
message = described_class.message(
|
15
|
+
'/v1/api/media/redirects/',
|
16
|
+
'http://zapp.nl',
|
17
|
+
Date.parse('2015-01-01').rfc822)
|
18
|
+
expect(message).to eq(
|
19
|
+
'origin:http://zapp.nl,x-npo-date:Thu, 1 Jan 2015 00:00:00 '\
|
20
|
+
'+0000,uri:/v1/api/media/redirects/')
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'sorts the params' do
|
24
|
+
message = described_class.message(
|
25
|
+
'/v1/api/media/redirects/',
|
26
|
+
'http://zapp.nl',
|
27
|
+
Date.parse('2015-01-01').rfc822,
|
28
|
+
b: 1, a: 2)
|
29
|
+
expect(message).to eq(
|
30
|
+
'origin:http://zapp.nl,x-npo-date:Thu, 1 Jan 2015 00:00:00 '\
|
31
|
+
'+0000,uri:/v1/api/media/redirects/,a:2,b:1')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'poms/api/request'
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
RSpec.describe Poms::Api::Request do
|
5
|
+
let(:subject) do
|
6
|
+
described_class.new(
|
7
|
+
'https://rs.poms.omroep.nl/v1/api/media/redirects/',
|
8
|
+
'key',
|
9
|
+
'secret',
|
10
|
+
'http://zapp.nl')
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#call' do
|
14
|
+
it 'makes the request' do
|
15
|
+
stub = stub_request(:get, 'https://rs.poms.omroep.nl/v1/api/media/redirects/')
|
16
|
+
subject.call
|
17
|
+
expect(stub).to have_been_requested
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'sets the headers' do
|
21
|
+
headers = { 'Test' => 'Header' }
|
22
|
+
stub = stub_request(:get,
|
23
|
+
'https://rs.poms.omroep.nl/v1/api/media/redirects/')
|
24
|
+
.with(headers: headers)
|
25
|
+
allow(subject).to receive(:headers).and_return(headers)
|
26
|
+
subject.call
|
27
|
+
expect(stub).to have_been_requested
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -4,7 +4,7 @@ describe Poms::Builderless::Clip do
|
|
4
4
|
let(:clip) { Poms.fetch_clip('WO_NPO_1950962') }
|
5
5
|
|
6
6
|
it 'has a title' do
|
7
|
-
expect(clip.title).to eq '
|
7
|
+
expect(clip.title).to eq 'De wielen van de bus'
|
8
8
|
end
|
9
9
|
it 'has a video url' do
|
10
10
|
expect(clip.video_url).to eq 'http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4'
|
@@ -15,6 +15,6 @@ describe Poms::Builderless::Clip do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'has a position' do
|
18
|
-
expect(clip.position).to eq
|
18
|
+
expect(clip.position).to eq 2
|
19
19
|
end
|
20
20
|
end
|
@@ -1,28 +1,26 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Poms::MergedSeries do
|
4
|
-
let(:url) { described_class::
|
4
|
+
let(:url) { described_class::TEST_URL }
|
5
5
|
|
6
6
|
it 'turns the json into a hash' do
|
7
|
-
mids = subject.serie_mids
|
7
|
+
mids = subject.serie_mids(url)
|
8
8
|
expect(mids.keys).to include('POMS_S_EO_097367')
|
9
9
|
expect(mids.values).to include('VPWON_1257896')
|
10
10
|
end
|
11
11
|
|
12
12
|
it 'throws an error on a network error' do
|
13
|
-
|
14
|
-
|
15
|
-
expect { subject.serie_mids }.to raise_error(Poms::PomsError)
|
13
|
+
stub_request(:any, url).to_return(body: '{}', status: 500)
|
14
|
+
expect { subject.serie_mids(url) }.to raise_error(Poms::PomsError)
|
16
15
|
end
|
17
16
|
|
18
17
|
it 'throws an error on invalid json' do
|
19
|
-
|
20
|
-
|
21
|
-
expect { subject.serie_mids }.to raise_error(Poms::PomsError)
|
18
|
+
stub_request(:any, url).to_return(body: 'Test')
|
19
|
+
expect { subject.serie_mids(url) }.to raise_error(Poms::PomsError)
|
22
20
|
end
|
23
21
|
|
24
22
|
it 'throws an error on timeout' do
|
25
|
-
|
26
|
-
expect { subject.serie_mids }.to raise_error(Poms::PomsError)
|
23
|
+
stub_request(:any, url).to_timeout
|
24
|
+
expect { subject.serie_mids(url) }.to raise_error(Poms::PomsError)
|
27
25
|
end
|
28
26
|
end
|
data/spec/lib/poms/views_spec.rb
CHANGED
@@ -5,8 +5,8 @@ describe Poms::Views do
|
|
5
5
|
let(:response) { File.read 'spec/fixtures/poms_broadcast.json' }
|
6
6
|
|
7
7
|
it 'returns a metadata object' do
|
8
|
-
|
9
|
-
|
8
|
+
stub_request(:any, 'http://docs.poms.omroep.nl/media/KRO_1614405')
|
9
|
+
.to_return(body: response)
|
10
10
|
expect(subject.get('KRO_1614405')).to eq(JSON.parse response)
|
11
11
|
end
|
12
12
|
end
|
data/spec/lib/poms_spec.rb
CHANGED
@@ -6,8 +6,8 @@ describe Poms do
|
|
6
6
|
let(:response) { File.read 'spec/fixtures/poms_broadcast.json' }
|
7
7
|
|
8
8
|
before do
|
9
|
-
|
10
|
-
|
9
|
+
stub_request(:get, 'http://docs.poms.omroep.nl/media/KRO_1614405')
|
10
|
+
.to_return(body: response)
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'fetches a broadcast' do
|
@@ -22,27 +22,27 @@ describe Poms do
|
|
22
22
|
it 'fetches a group' do
|
23
23
|
response = File.read 'spec/fixtures/poms_broadcast.json'
|
24
24
|
url = 'http://docs.poms.omroep.nl/media/_design/media/_view/by-group?include_docs=true&key=%22POMS_S_NPO_823012%22&reduce=false'
|
25
|
-
|
25
|
+
stub_request(:get, url).to_return(body: response)
|
26
26
|
expect(Poms.fetch_group('POMS_S_NPO_823012')).to eq(JSON.parse response)
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'returns nil when a broadcast does not exits' do
|
30
|
-
|
31
|
-
|
30
|
+
stub_request(:get, 'http://docs.poms.omroep.nl/media/BLA')
|
31
|
+
.to_return(status: [404, 'Not Found'])
|
32
32
|
expect(Poms.fetch('BLA')).to eq(nil)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
describe '#fetch_playlist_clips' do
|
37
37
|
it 'creates an array of clips' do
|
38
|
-
expect(Poms.fetch_playlist_clips('POMS_S_NPO_818759').size).to eq(
|
38
|
+
expect(Poms.fetch_playlist_clips('POMS_S_NPO_818759').size).to eq(23)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
42
|
describe '#fetch_broadcasts_for_serie' do
|
43
43
|
it 'returns nil when a broadcast does not exist' do
|
44
|
-
|
45
|
-
|
44
|
+
stub_request(:get, 'http://docs.poms.omroep.nl/media/_design/media/_view/by-ancestor-and-type?reduce=false&key=[%22BLA%22,%22BROADCAST%22]&include_docs=true')
|
45
|
+
.to_return(status: [404, 'Not Found'])
|
46
46
|
expect(Poms.fetch_broadcasts_for_serie('BLA')).to eq([])
|
47
47
|
end
|
48
48
|
end
|
@@ -54,7 +54,7 @@ describe Poms do
|
|
54
54
|
|
55
55
|
before do
|
56
56
|
path = 'http://docs.poms.omroep.nl/media/_design/media/_view/broadcasts-by-broadcaster-and-start?startkey=[%22Zapp%22,1369755130000]&endkey=[%22Zapp%22,1370964770000]&reduce=false&include_docs=true'
|
57
|
-
|
57
|
+
stub_request(:get, path).to_return(body: response)
|
58
58
|
end
|
59
59
|
|
60
60
|
it 'fetches all broadcast by zapp and parses it correctly' do
|
@@ -79,7 +79,7 @@ describe Poms do
|
|
79
79
|
describe '#fetch_current_broadcast' do
|
80
80
|
before do
|
81
81
|
path = 'http://docs.poms.omroep.nl/media/_design/media/_view/broadcasts-by-channel-and-start?startkey=[%22NED3%22,1410969127000]&endkey=[%22NED3%22,1410882727000]&reduce=false&include_docs=true&descending=true&limit=1'
|
82
|
-
|
82
|
+
stub_request(:get, path).to_return(body: response)
|
83
83
|
end
|
84
84
|
|
85
85
|
it 'fetches the current broadcast' do
|
@@ -91,7 +91,7 @@ describe Poms do
|
|
91
91
|
describe '#fetch_current_broadcast_and_key' do
|
92
92
|
before do
|
93
93
|
path = 'http://docs.poms.omroep.nl/media/_design/media/_view/broadcasts-by-channel-and-start?startkey=[%22NED3%22,1410969127000]&endkey=[%22NED3%22,1410882727000]&reduce=false&include_docs=true&descending=true&limit=1'
|
94
|
-
|
94
|
+
stub_request(:get, path).to_return(body: response)
|
95
95
|
end
|
96
96
|
|
97
97
|
it 'fetches the current broadcast' do
|
@@ -108,7 +108,7 @@ describe Poms do
|
|
108
108
|
describe '#fetch_next_broadcast' do
|
109
109
|
before do
|
110
110
|
path = 'http://docs.poms.omroep.nl/media/_design/media/_view/broadcasts-by-channel-and-start?startkey=[%22NED3%22,1410969127000]&endkey=[%22NED3%22,1411055527000]&reduce=false&include_docs=true&limit=1'
|
111
|
-
|
111
|
+
stub_request(:get, path).to_return(body: response)
|
112
112
|
end
|
113
113
|
|
114
114
|
it 'fetches the next broadcast' do
|
@@ -120,7 +120,7 @@ describe Poms do
|
|
120
120
|
describe '#fetch_next_broadcast_and_key' do
|
121
121
|
before do
|
122
122
|
path = 'http://docs.poms.omroep.nl/media/_design/media/_view/broadcasts-by-channel-and-start?startkey=[%22NED3%22,1410969127000]&endkey=[%22NED3%22,1411055527000]&reduce=false&include_docs=true&descending=true&limit=1'
|
123
|
-
|
123
|
+
stub_request(:get, path).to_return(body: response)
|
124
124
|
end
|
125
125
|
|
126
126
|
it 'fetches the current broadcast' do
|
@@ -130,7 +130,7 @@ describe Poms do
|
|
130
130
|
|
131
131
|
it 'returns the key' do
|
132
132
|
expect(Poms.fetch_next_broadcast_and_key('NED3')[:key])
|
133
|
-
.to eq(['NED3',
|
133
|
+
.to eq(['NED3', 1_410_969_900_000])
|
134
134
|
end
|
135
135
|
end
|
136
136
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler/setup'
|
3
|
-
require '
|
3
|
+
require 'webmock/rspec'
|
4
4
|
require 'fabrication'
|
5
5
|
require 'vcr'
|
6
6
|
require 'timecop'
|
7
|
-
require 'poms'
|
7
|
+
require 'poms'
|
8
8
|
|
9
|
-
|
9
|
+
WebMock.disable_net_connect!
|
10
10
|
|
11
11
|
VCR.configure do |config|
|
12
12
|
config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
|
13
|
-
config.hook_into :
|
13
|
+
config.hook_into :webmock
|
14
14
|
end
|
15
15
|
|
16
16
|
RSpec.configure do |config|
|
metadata
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Kruijsen
|
8
|
-
- Stijn Meurkens
|
9
|
-
- Tijn Schuurmans
|
10
8
|
autorequire:
|
11
9
|
bindir: bin
|
12
10
|
cert_chain: []
|
13
|
-
date: 2016-
|
11
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
14
12
|
dependencies:
|
15
13
|
- !ruby/object:Gem::Dependency
|
16
14
|
name: bundler
|
@@ -83,7 +81,7 @@ dependencies:
|
|
83
81
|
- !ruby/object:Gem::Version
|
84
82
|
version: '0'
|
85
83
|
- !ruby/object:Gem::Dependency
|
86
|
-
name:
|
84
|
+
name: webmock
|
87
85
|
requirement: !ruby/object:Gem::Requirement
|
88
86
|
requirements:
|
89
87
|
- - ">="
|
@@ -169,8 +167,6 @@ dependencies:
|
|
169
167
|
description: Interface to POMS CouchDB API
|
170
168
|
email:
|
171
169
|
- tom@brightin.nl
|
172
|
-
- stijn@brightin.nl
|
173
|
-
- tijn@brightin.nl
|
174
170
|
executables: []
|
175
171
|
extensions: []
|
176
172
|
extra_rdoc_files: []
|
@@ -183,6 +179,8 @@ files:
|
|
183
179
|
- README.md
|
184
180
|
- Rakefile
|
185
181
|
- lib/poms.rb
|
182
|
+
- lib/poms/api/auth.rb
|
183
|
+
- lib/poms/api/request.rb
|
186
184
|
- lib/poms/base.rb
|
187
185
|
- lib/poms/broadcast.rb
|
188
186
|
- lib/poms/builder.rb
|
@@ -209,17 +207,14 @@ files:
|
|
209
207
|
- spec/fixtures/poms_series.json
|
210
208
|
- spec/fixtures/poms_single_broadcast_by_channel.json
|
211
209
|
- spec/fixtures/poms_zapp.json
|
212
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_position.yml
|
213
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_title.yml
|
214
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_video_url.yml
|
215
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_an_image_id.yml
|
216
210
|
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast_starts_at/returns_a_datetime.yml
|
217
211
|
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_position.yml
|
218
212
|
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_title.yml
|
219
213
|
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_video_url.yml
|
220
214
|
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_an_image_id.yml
|
221
215
|
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_current_broadcast_fetches_the_current_broadcast.yml
|
222
|
-
- spec/fixtures/vcr_cassettes/poms/
|
216
|
+
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_fetches_the_current_broadcast.yml
|
217
|
+
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_returns_the_key.yml
|
223
218
|
- spec/fixtures/vcr_cassettes/poms/merged_series/turns_the_json_into_a_hash.yml
|
224
219
|
- spec/fixtures/vcr_cassettes/poms_fetch/a_broadcast_has_scheduled_events_with_last_with_starts_at.yml
|
225
220
|
- spec/fixtures/vcr_cassettes/poms_fetch/a_clip_has_a_title.yml
|
@@ -233,6 +228,8 @@ files:
|
|
233
228
|
- spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_title.yml
|
234
229
|
- spec/fixtures/vcr_cassettes/poms_fetch_playlist_clips/creates_an_array_of_clips.yml
|
235
230
|
- spec/integration/poms_spec.rb
|
231
|
+
- spec/lib/poms/api/auth_spec.rb
|
232
|
+
- spec/lib/poms/api/request_spec.rb
|
236
233
|
- spec/lib/poms/broadcast_spec.rb
|
237
234
|
- spec/lib/poms/builder_spec.rb
|
238
235
|
- spec/lib/poms/builderless/broadcast_spec.rb
|
@@ -266,7 +263,7 @@ rubyforge_project:
|
|
266
263
|
rubygems_version: 2.4.5
|
267
264
|
signing_key:
|
268
265
|
specification_version: 4
|
269
|
-
summary:
|
266
|
+
summary: Interface to POMS CouchDB API
|
270
267
|
test_files:
|
271
268
|
- spec/fabricators/poms_fabricator.rb
|
272
269
|
- spec/fixtures/poms_broadcast.json
|
@@ -276,17 +273,14 @@ test_files:
|
|
276
273
|
- spec/fixtures/poms_series.json
|
277
274
|
- spec/fixtures/poms_single_broadcast_by_channel.json
|
278
275
|
- spec/fixtures/poms_zapp.json
|
279
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_position.yml
|
280
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_title.yml
|
281
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_video_url.yml
|
282
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_an_image_id.yml
|
283
276
|
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast_starts_at/returns_a_datetime.yml
|
284
277
|
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_position.yml
|
285
278
|
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_title.yml
|
286
279
|
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_video_url.yml
|
287
280
|
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_an_image_id.yml
|
288
281
|
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_current_broadcast_fetches_the_current_broadcast.yml
|
289
|
-
- spec/fixtures/vcr_cassettes/poms/
|
282
|
+
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_fetches_the_current_broadcast.yml
|
283
|
+
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_returns_the_key.yml
|
290
284
|
- spec/fixtures/vcr_cassettes/poms/merged_series/turns_the_json_into_a_hash.yml
|
291
285
|
- spec/fixtures/vcr_cassettes/poms_fetch/a_broadcast_has_scheduled_events_with_last_with_starts_at.yml
|
292
286
|
- spec/fixtures/vcr_cassettes/poms_fetch/a_clip_has_a_title.yml
|
@@ -300,6 +294,8 @@ test_files:
|
|
300
294
|
- spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_title.yml
|
301
295
|
- spec/fixtures/vcr_cassettes/poms_fetch_playlist_clips/creates_an_array_of_clips.yml
|
302
296
|
- spec/integration/poms_spec.rb
|
297
|
+
- spec/lib/poms/api/auth_spec.rb
|
298
|
+
- spec/lib/poms/api/request_spec.rb
|
303
299
|
- spec/lib/poms/broadcast_spec.rb
|
304
300
|
- spec/lib/poms/builder_spec.rb
|
305
301
|
- spec/lib/poms/builderless/broadcast_spec.rb
|
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://docs.poms.omroep.nl/media/WO_NPO_1950962
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
accept-encoding:
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
accept:
|
13
|
-
- "*/*"
|
14
|
-
user-agent:
|
15
|
-
- Ruby
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message: OK
|
20
|
-
headers:
|
21
|
-
date:
|
22
|
-
- Tue, 19 Jan 2016 13:04:50 GMT
|
23
|
-
server:
|
24
|
-
- CouchDB/1.6.1 (Erlang OTP/R15B01)
|
25
|
-
etag:
|
26
|
-
- '"6-a026d5befe017ec7fcef8050ee6e4bcf"'
|
27
|
-
content-type:
|
28
|
-
- text/plain; charset=utf-8
|
29
|
-
content-length:
|
30
|
-
- '1545'
|
31
|
-
cache-control:
|
32
|
-
- must-revalidate
|
33
|
-
x-proxyinstancename:
|
34
|
-
- poms1b
|
35
|
-
set-cookie:
|
36
|
-
- balancer://poms3cluster=balancer.poms1s2db; path=/;
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: |
|
40
|
-
{"_id":"WO_NPO_1950962","_rev":"6-a026d5befe017ec7fcef8050ee6e4bcf","objectType":"program","mid":"WO_NPO_1950962","creationDate":1442490263679,"lastModified":1447947725305,"sortDate":1442490263679,"urn":"urn:vpro:media:program:62589080","embeddable":true,"broadcasters":["NPO"],"titles":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"},{"value":"De wielen van de bus","owner":"BROADCASTER","type":"SUB"}],"descriptions":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"}],"genres":["Jeugd"],"countries":[],"languages":[],"duration":60000,"descendantOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST"}],"memberOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST","index":2,"highlighted":false,"added":1442490529409}],"locations":[{"programUrl":"http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4","avAttributes":{"bitrate":1000000,"avFileFormat":"MP4"},"owner":"BROADCASTER","creationDate":1442490345785,"lastModified":1442490345864,"workflow":"PUBLISHED","urn":"urn:vpro:media:location:62589229"}],"images":[{"title":"Wielen van de bus","description":"wielen van de bus","imageUri":"urn:vpro:image:653515","height":259,"width":559,"owner":"BROADCASTER","type":"PORTRAIT","highlighted":true,"creationDate":1442491591052,"lastModified":1442491591141,"workflow":"PUBLISHED","urn":"urn:vpro:media:image:62590127"}],"publishDate":1447947869447,"workflow":"PUBLISHED","type":"CLIP","avType":"VIDEO"}
|
41
|
-
http_version: '1.1'
|
42
|
-
recorded_at: Tue, 06 Oct 2015 12:00:00 GMT
|
43
|
-
recorded_with: VCR 2.9.3
|
@@ -1,43 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: get
|
5
|
-
uri: http://docs.poms.omroep.nl/media/WO_NPO_1950962
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: ''
|
9
|
-
headers:
|
10
|
-
accept-encoding:
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
accept:
|
13
|
-
- "*/*"
|
14
|
-
user-agent:
|
15
|
-
- Ruby
|
16
|
-
response:
|
17
|
-
status:
|
18
|
-
code: 200
|
19
|
-
message: OK
|
20
|
-
headers:
|
21
|
-
date:
|
22
|
-
- Tue, 19 Jan 2016 13:04:50 GMT
|
23
|
-
server:
|
24
|
-
- CouchDB/1.6.1 (Erlang OTP/R15B01)
|
25
|
-
etag:
|
26
|
-
- '"6-a026d5befe017ec7fcef8050ee6e4bcf"'
|
27
|
-
content-type:
|
28
|
-
- text/plain; charset=utf-8
|
29
|
-
content-length:
|
30
|
-
- '1545'
|
31
|
-
cache-control:
|
32
|
-
- must-revalidate
|
33
|
-
x-proxyinstancename:
|
34
|
-
- poms1b
|
35
|
-
set-cookie:
|
36
|
-
- balancer://poms3cluster=balancer.poms1s1db; path=/;
|
37
|
-
body:
|
38
|
-
encoding: UTF-8
|
39
|
-
string: |
|
40
|
-
{"_id":"WO_NPO_1950962","_rev":"6-a026d5befe017ec7fcef8050ee6e4bcf","objectType":"program","mid":"WO_NPO_1950962","creationDate":1442490263679,"lastModified":1447947725305,"sortDate":1442490263679,"urn":"urn:vpro:media:program:62589080","embeddable":true,"broadcasters":["NPO"],"titles":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"},{"value":"De wielen van de bus","owner":"BROADCASTER","type":"SUB"}],"descriptions":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"}],"genres":["Jeugd"],"countries":[],"languages":[],"duration":60000,"descendantOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST"}],"memberOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST","index":2,"highlighted":false,"added":1442490529409}],"locations":[{"programUrl":"http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4","avAttributes":{"bitrate":1000000,"avFileFormat":"MP4"},"owner":"BROADCASTER","creationDate":1442490345785,"lastModified":1442490345864,"workflow":"PUBLISHED","urn":"urn:vpro:media:location:62589229"}],"images":[{"title":"Wielen van de bus","description":"wielen van de bus","imageUri":"urn:vpro:image:653515","height":259,"width":559,"owner":"BROADCASTER","type":"PORTRAIT","highlighted":true,"creationDate":1442491591052,"lastModified":1442491591141,"workflow":"PUBLISHED","urn":"urn:vpro:media:image:62590127"}],"publishDate":1447947869447,"workflow":"PUBLISHED","type":"CLIP","avType":"VIDEO"}
|
41
|
-
http_version: '1.1'
|
42
|
-
recorded_at: Tue, 06 Oct 2015 12:00:00 GMT
|
43
|
-
recorded_with: VCR 2.9.3
|