poms 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile.lock +11 -3
  4. data/README.md +12 -0
  5. data/lib/poms/api/auth.rb +40 -0
  6. data/lib/poms/api/request.rb +44 -0
  7. data/lib/poms/merged_series.rb +5 -4
  8. data/lib/poms/version.rb +1 -1
  9. data/poms.gemspec +4 -5
  10. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast_starts_at/returns_a_datetime.yml +17 -17
  11. data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_position.yml +16 -16
  12. data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_title.yml +16 -16
  13. data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_video_url.yml +16 -16
  14. data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_an_image_id.yml +17 -17
  15. data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_current_broadcast_fetches_the_current_broadcast.yml +17 -17
  16. data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_fetches_the_current_broadcast.yml +68 -0
  17. data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_returns_the_key.yml +68 -0
  18. data/spec/fixtures/vcr_cassettes/poms/merged_series/turns_the_json_into_a_hash.yml +19 -19
  19. data/spec/fixtures/vcr_cassettes/poms_fetch/a_broadcast_has_scheduled_events_with_last_with_starts_at.yml +13 -13
  20. data/spec/fixtures/vcr_cassettes/poms_fetch/a_clip_has_a_title.yml +16 -16
  21. data/spec/fixtures/vcr_cassettes/poms_fetch/an_aankeiler_has_images.yml +13 -13
  22. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_mid.yml +16 -16
  23. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_title.yml +16 -16
  24. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_scheduled_events_with_last_with_starts_at.yml +16 -16
  25. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_broadcast_with_a_mid.yml +16 -16
  26. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_key.yml +16 -16
  27. data/spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_media_type.yml +409 -383
  28. data/spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_title.yml +409 -383
  29. data/spec/fixtures/vcr_cassettes/poms_fetch_playlist_clips/creates_an_array_of_clips.yml +987 -906
  30. data/spec/lib/poms/api/auth_spec.rb +34 -0
  31. data/spec/lib/poms/api/request_spec.rb +30 -0
  32. data/spec/lib/poms/builderless/clip_spec.rb +2 -2
  33. data/spec/lib/poms/merged_series_spec.rb +8 -10
  34. data/spec/lib/poms/views_spec.rb +2 -2
  35. data/spec/lib/poms_spec.rb +14 -14
  36. data/spec/spec_helper.rb +4 -4
  37. metadata +14 -18
  38. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_position.yml +0 -43
  39. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_title.yml +0 -43
  40. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_video_url.yml +0 -43
  41. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_an_image_id.yml +0 -43
  42. data/spec/fixtures/vcr_cassettes/poms/merged_series/is_enumerable.yml +0 -46
@@ -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
@@ -1,46 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://rs-test.poms.omroep.nl/v1/api/media/redirects/
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, 05 Jan 2016 16:49:33 GMT
23
- server:
24
- - Apache/2.4.12 (Unix) OpenSSL/1.0.1k
25
- vary:
26
- - Accept
27
- cache-control:
28
- - public
29
- etag:
30
- - '"47646207"'
31
- last-modified:
32
- - Tue, 05 Jan 2016 08:47:10 GMT
33
- content-type:
34
- - application/json;charset=utf-8
35
- x-proxyinstancename:
36
- - poms1a
37
- set-cookie:
38
- - balancer://poms8cluster=balancer.poms8aas; path=/;
39
- transfer-encoding:
40
- - chunked
41
- body:
42
- encoding: UTF-8
43
- string: '{"lastUpdate":"2016-01-05T09:47:10.672+01:00","map":{"POMS_S_EO_097367":"VPWON_1257896"}}'
44
- http_version: '1.1'
45
- recorded_at: Tue, 06 Oct 2015 12:00:00 GMT
46
- recorded_with: VCR 2.9.3