poms 1.2.2 → 2.0.0.a
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +17 -0
- data/.rubocop.yml +24 -0
- data/.ruby-version +1 -0
- data/.todo.reek +50 -0
- data/CHANGELOG.md +1 -0
- data/Gemfile +4 -0
- data/README.md +54 -6
- data/bin/ci-run +57 -0
- data/bin/ci-setup +46 -0
- data/bin/reek +16 -0
- data/bin/rspec +16 -0
- data/bin/rubocop +16 -0
- data/examples/fetch.rb +16 -0
- data/examples/search.rb +17 -0
- data/lib/poms.rb +84 -156
- data/lib/poms/api/auth.rb +42 -22
- data/lib/poms/api/client.rb +58 -0
- data/lib/poms/api/drivers/net_http.rb +69 -0
- data/lib/poms/api/json_client.rb +35 -0
- data/lib/poms/api/pagination_client.rb +67 -0
- data/lib/poms/api/request.rb +29 -31
- data/lib/poms/api/response.rb +31 -0
- data/lib/poms/api/search.rb +38 -0
- data/lib/poms/api/uris.rb +10 -0
- data/lib/poms/api/uris/media.rb +41 -0
- data/lib/poms/api/uris/schedule.rb +28 -0
- data/lib/poms/configuration.rb +59 -0
- data/lib/poms/errors.rb +26 -0
- data/lib/poms/fields.rb +26 -3
- data/lib/poms/timestamp.rb +10 -3
- data/lib/poms/version.rb +1 -1
- data/poms.gemspec +10 -11
- metadata +59 -128
- data/Gemfile.lock +0 -120
- data/lib/poms/base.rb +0 -8
- data/lib/poms/broadcast.rb +0 -55
- data/lib/poms/builder.rb +0 -92
- data/lib/poms/builderless/broadcast.rb +0 -37
- data/lib/poms/builderless/clip.rb +0 -36
- data/lib/poms/connect.rb +0 -11
- data/lib/poms/has_ancestors.rb +0 -54
- data/lib/poms/has_base_attributes.rb +0 -29
- data/lib/poms/merged_series.rb +0 -28
- data/lib/poms/poms_error.rb +0 -5
- data/lib/poms/schedule_event.rb +0 -34
- data/lib/poms/season.rb +0 -13
- data/lib/poms/series.rb +0 -12
- data/lib/poms/views.rb +0 -52
- data/spec/fabricators/poms_fabricator.rb +0 -44
- data/spec/fixtures/poms_broadcast.json +0 -318
- data/spec/fixtures/poms_broadcast_multiple_schedule_events.json +0 -354
- data/spec/fixtures/poms_broadcast_pippi.json +0 -180
- data/spec/fixtures/poms_group.json +0 -1087
- data/spec/fixtures/poms_series.json +0 -49
- data/spec/fixtures/poms_single_broadcast_by_channel.json +0 -136
- data/spec/fixtures/poms_zapp.json +0 -47363
- data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast_starts_at/returns_a_datetime.yml +0 -53
- data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_position.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_title.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_video_url.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_an_image_id.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_current_broadcast_fetches_the_current_broadcast.yml +0 -60
- data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_fetches_the_current_broadcast.yml +0 -68
- data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_returns_the_key.yml +0 -68
- data/spec/fixtures/vcr_cassettes/poms/merged_series/turns_the_json_into_a_hash.yml +0 -46
- data/spec/fixtures/vcr_cassettes/poms_fetch/a_broadcast_has_scheduled_events_with_last_with_starts_at.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms_fetch/a_clip_has_a_title.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms_fetch/an_aankeiler_has_images.yml +0 -43
- data/spec/fixtures/vcr_cassettes/poms_fetch_broadcasts_for_serie/returns_nil_when_a_broadcast_does_not_exist.yml +0 -42
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_mid.yml +0 -51
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_title.yml +0 -51
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_scheduled_events_with_last_with_starts_at.yml +0 -51
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_broadcast_with_a_mid.yml +0 -51
- data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_key.yml +0 -51
- data/spec/fixtures/vcr_cassettes/poms_fetch_descendant_mids/returns_a_list_of_mids.yml +0 -42
- data/spec/fixtures/vcr_cassettes/poms_fetch_descendants_for_serie/builds_a_list_of_broadcasts.yml +0 -102755
- data/spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_media_type.yml +0 -448
- data/spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_title.yml +0 -448
- data/spec/fixtures/vcr_cassettes/poms_fetch_playlist_clips/creates_an_array_of_clips.yml +0 -1051
- data/spec/integration/poms_spec.rb +0 -87
- data/spec/lib/poms/api/auth_spec.rb +0 -34
- data/spec/lib/poms/api/request_spec.rb +0 -30
- data/spec/lib/poms/broadcast_spec.rb +0 -49
- data/spec/lib/poms/builder_spec.rb +0 -53
- data/spec/lib/poms/builderless/broadcast_spec.rb +0 -11
- data/spec/lib/poms/builderless/clip_spec.rb +0 -20
- data/spec/lib/poms/fields_spec.rb +0 -63
- data/spec/lib/poms/merged_series_spec.rb +0 -26
- data/spec/lib/poms/schedule_event_spec.rb +0 -15
- data/spec/lib/poms/timestamp_spec.rb +0 -13
- data/spec/lib/poms/views_spec.rb +0 -38
- data/spec/lib/poms_spec.rb +0 -137
- data/spec/spec_helper.rb +0 -32
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'addressable/uri'
|
2
|
+
|
3
|
+
module Poms
|
4
|
+
module Api
|
5
|
+
module Uris
|
6
|
+
# Builds uri's for /media endpoints
|
7
|
+
module Media
|
8
|
+
API_PATH = '/v1/api/media'.freeze
|
9
|
+
|
10
|
+
module_function
|
11
|
+
|
12
|
+
def single(base_uri, mid)
|
13
|
+
uri_for_path(base_uri, "/#{mid}")
|
14
|
+
end
|
15
|
+
|
16
|
+
def multiple(base_uri)
|
17
|
+
uri_for_path(base_uri, '/multiple')
|
18
|
+
end
|
19
|
+
|
20
|
+
def descendants(base_uri, mid)
|
21
|
+
uri_for_path(base_uri, "/#{mid}/descendants")
|
22
|
+
end
|
23
|
+
|
24
|
+
def members(base_uri, mid)
|
25
|
+
uri_for_path(base_uri, "/#{mid}/members")
|
26
|
+
end
|
27
|
+
|
28
|
+
# URI for merged series
|
29
|
+
def redirects(base_uri)
|
30
|
+
uri_for_path(base_uri, '/redirects/')
|
31
|
+
end
|
32
|
+
|
33
|
+
def uri_for_path(base_uri, path)
|
34
|
+
base_uri.merge(path: "#{API_PATH}#{path}")
|
35
|
+
end
|
36
|
+
|
37
|
+
private_class_method :uri_for_path
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'addressable/uri'
|
2
|
+
|
3
|
+
module Poms
|
4
|
+
module Api
|
5
|
+
module Uris
|
6
|
+
# URI for the /schedule API
|
7
|
+
module Schedule
|
8
|
+
API_PATH = '/v1/api/schedule'.freeze
|
9
|
+
|
10
|
+
module_function
|
11
|
+
|
12
|
+
def now(base_uri, channel)
|
13
|
+
uri_for_path(base_uri, "/channel/#{channel}/now")
|
14
|
+
end
|
15
|
+
|
16
|
+
def next(base_uri, channel)
|
17
|
+
uri_for_path(base_uri, "/channel/#{channel}/next")
|
18
|
+
end
|
19
|
+
|
20
|
+
def uri_for_path(base_uri, path = nil)
|
21
|
+
base_uri.merge(path: "#{API_PATH}#{path}")
|
22
|
+
end
|
23
|
+
|
24
|
+
private_class_method :uri_for_path
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'poms/errors'
|
2
|
+
|
3
|
+
module Poms
|
4
|
+
# The configuration is a container for configuration values that control the
|
5
|
+
# Poms gem.
|
6
|
+
class Configuration
|
7
|
+
attr_accessor :key, :origin, :secret, :base_uri
|
8
|
+
attr_reader :credentials
|
9
|
+
|
10
|
+
# The fallback base URI in case none is explicitly specified.
|
11
|
+
DEFAULT_BASE_URI = 'https://rs.poms.omroep.nl'.freeze
|
12
|
+
|
13
|
+
# List of special credential keys that need to be present in order to be
|
14
|
+
# able to use the API.
|
15
|
+
REQUIRED_CREDENTIAL_KEYS = [:key, :origin, :secret].freeze
|
16
|
+
|
17
|
+
# Build a new configuration object, including validations and freezing.
|
18
|
+
#
|
19
|
+
# You probably want to use a block to specify the different configuration
|
20
|
+
# options, but when no block is specified, default values will be read from
|
21
|
+
# the environment.
|
22
|
+
def initialize
|
23
|
+
reset
|
24
|
+
yield self if block_given?
|
25
|
+
validate
|
26
|
+
@credentials = OpenStruct.new(key: key, origin: origin, secret: secret)
|
27
|
+
freeze
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def validate
|
33
|
+
assert_credentials
|
34
|
+
assert_base_uri
|
35
|
+
end
|
36
|
+
|
37
|
+
def assert_credentials
|
38
|
+
REQUIRED_CREDENTIAL_KEYS.each do |key|
|
39
|
+
next if send(key).present?
|
40
|
+
raise Errors::AuthenticationError, "#{key} must be supplied"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def assert_base_uri
|
45
|
+
base_uri or
|
46
|
+
raise Errors::MissingConfigurationError, 'base_uri must be supplied'
|
47
|
+
end
|
48
|
+
|
49
|
+
def reset
|
50
|
+
@credentials = nil
|
51
|
+
self.key = ENV['POMS_KEY']
|
52
|
+
self.origin = ENV['POMS_ORIGIN']
|
53
|
+
self.secret = ENV['POMS_SECRET']
|
54
|
+
self.base_uri = Addressable::URI.parse(
|
55
|
+
ENV.fetch('POMS_BASE_URI', DEFAULT_BASE_URI)
|
56
|
+
)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
data/lib/poms/errors.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
module Poms
|
2
|
+
module Errors
|
3
|
+
# Generic Poms error that all other errors inherit from. This allows you to
|
4
|
+
# rescue any exception from this library in your application code.
|
5
|
+
PomsError = Class.new(StandardError)
|
6
|
+
|
7
|
+
# Custom Error class to signal missing authorization attributes
|
8
|
+
AuthenticationError = Class.new(PomsError)
|
9
|
+
|
10
|
+
# Base exception for all Poms-specific HTTP errors.
|
11
|
+
HttpError = Class.new(PomsError)
|
12
|
+
|
13
|
+
# Wrapper exception for dealing with driver-agnostic 404 responses.
|
14
|
+
HttpMissingError = Class.new(HttpError)
|
15
|
+
|
16
|
+
# Wrapper exception for dealing with driver-agnostic 500 responses.
|
17
|
+
HttpServerError = Class.new(HttpError)
|
18
|
+
|
19
|
+
# Custom error than can be used to indicate a required configuration value
|
20
|
+
# is missing.
|
21
|
+
MissingConfigurationError = Class.new(PomsError)
|
22
|
+
|
23
|
+
# Custom error to indicate that the gem has not been configured at all.
|
24
|
+
NotConfigured = Class.new(PomsError)
|
25
|
+
end
|
26
|
+
end
|
data/lib/poms/fields.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
require 'poms/timestamp'
|
2
|
+
|
1
3
|
module Poms
|
2
4
|
# This module contains functions to extract things from a Poms hash that may
|
3
5
|
# be harder to access, or are accessed in multiple places.
|
4
6
|
module Fields
|
5
|
-
|
7
|
+
module_function
|
6
8
|
|
7
9
|
# Returns the title, main by default
|
8
10
|
def title(item, type = 'MAIN')
|
@@ -22,6 +24,7 @@ module Poms
|
|
22
24
|
# Extracts the image id from an image hash
|
23
25
|
# Expects a hash of just an image from POMS
|
24
26
|
def image_id(image)
|
27
|
+
return unless image['imageUri']
|
25
28
|
image['imageUri'].split(':').last
|
26
29
|
end
|
27
30
|
|
@@ -31,6 +34,10 @@ module Poms
|
|
31
34
|
image_id(images(item).first)
|
32
35
|
end
|
33
36
|
|
37
|
+
def mid(item)
|
38
|
+
item['mid']
|
39
|
+
end
|
40
|
+
|
34
41
|
# Returns the revision from a Poms hash.
|
35
42
|
def rev(item)
|
36
43
|
item['_rev'].to_i
|
@@ -55,10 +62,24 @@ module Poms
|
|
55
62
|
internetvod = item['predictions']
|
56
63
|
.find { |p| p['platform'] == 'INTERNETVOD' }
|
57
64
|
return unless internetvod
|
58
|
-
|
65
|
+
Timestamp.to_datetime(internetvod['publishStop'])
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns the position in the parent context if it is present.
|
69
|
+
def position(item)
|
70
|
+
parent = item['memberOf']
|
71
|
+
parent.first['index'] if parent.present?
|
59
72
|
end
|
60
73
|
|
61
|
-
|
74
|
+
def schedule_events(item)
|
75
|
+
events = item.fetch('scheduleEvents', [])
|
76
|
+
events.map do |event|
|
77
|
+
{
|
78
|
+
'starts_at' => Timestamp.to_datetime(event['start']),
|
79
|
+
'ends_at' => Timestamp.to_datetime(event['start'] + event['duration'])
|
80
|
+
}
|
81
|
+
end
|
82
|
+
end
|
62
83
|
|
63
84
|
# Poms has arrays of hashes for some types that have a value and type. This
|
64
85
|
# is a way to access those simply.
|
@@ -76,5 +97,7 @@ module Poms
|
|
76
97
|
return unless res
|
77
98
|
res['value']
|
78
99
|
end
|
100
|
+
|
101
|
+
private_class_method :value_of_type
|
79
102
|
end
|
80
103
|
end
|
data/lib/poms/timestamp.rb
CHANGED
@@ -3,9 +3,16 @@ module Poms
|
|
3
3
|
module Timestamp
|
4
4
|
module_function
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
# Convert unix timestamp in milliseconds to datetime
|
7
|
+
def to_datetime(timestamp)
|
8
|
+
return unless timestamp
|
9
|
+
Time.at(timestamp / 1000).to_datetime
|
10
|
+
end
|
11
|
+
|
12
|
+
# Convert to unix timestamp in milliseconds
|
13
|
+
def to_unix_ms(datetime)
|
14
|
+
return unless datetime
|
15
|
+
datetime.to_i * 1000
|
9
16
|
end
|
10
17
|
end
|
11
18
|
end
|
data/lib/poms/version.rb
CHANGED
data/poms.gemspec
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'poms/version'
|
5
|
-
require 'rake'
|
6
5
|
|
7
6
|
Gem::Specification.new do |spec|
|
8
7
|
spec.name = 'poms'
|
@@ -14,19 +13,19 @@ Gem::Specification.new do |spec|
|
|
14
13
|
spec.homepage = 'https://github.com/brightin/poms'
|
15
14
|
spec.license = 'MIT'
|
16
15
|
|
17
|
-
spec.files =
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
17
|
spec.require_paths = ['lib']
|
20
18
|
|
21
|
-
spec.
|
19
|
+
spec.add_dependency 'activesupport'
|
20
|
+
spec.add_development_dependency 'bundler'
|
21
|
+
spec.add_development_dependency 'guard-rspec'
|
22
|
+
spec.add_development_dependency 'guard'
|
22
23
|
spec.add_development_dependency 'rake'
|
24
|
+
spec.add_development_dependency 'reek'
|
23
25
|
spec.add_development_dependency 'rspec'
|
24
|
-
spec.add_development_dependency '
|
25
|
-
spec.add_development_dependency '
|
26
|
-
spec.add_development_dependency '
|
27
|
-
spec.add_development_dependency 'fabrication'
|
28
|
-
spec.add_development_dependency 'rubocop', '~> 0.34.1'
|
29
|
-
spec.add_development_dependency 'timecop'
|
26
|
+
spec.add_development_dependency 'rubocop-rspec'
|
27
|
+
spec.add_development_dependency 'rubocop'
|
28
|
+
spec.add_development_dependency 'simplecov'
|
30
29
|
spec.add_development_dependency 'vcr'
|
31
|
-
spec.
|
30
|
+
spec.add_development_dependency 'webmock'
|
32
31
|
end
|
metadata
CHANGED
@@ -1,31 +1,45 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.a
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Kruijsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- - "
|
31
|
+
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
33
|
+
version: '0'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- - "
|
38
|
+
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: guard-rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - ">="
|
@@ -39,7 +53,7 @@ dependencies:
|
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: guard
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
@@ -53,7 +67,7 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
@@ -67,7 +81,7 @@ dependencies:
|
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: reek
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - ">="
|
@@ -81,7 +95,7 @@ dependencies:
|
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: rspec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - ">="
|
@@ -95,7 +109,7 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: rubocop-rspec
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
@@ -112,18 +126,18 @@ dependencies:
|
|
112
126
|
name: rubocop
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- - "
|
129
|
+
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0
|
131
|
+
version: '0'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- - "
|
136
|
+
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0
|
138
|
+
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
140
|
+
name: simplecov
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - ">="
|
@@ -151,13 +165,13 @@ dependencies:
|
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
168
|
+
name: webmock
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - ">="
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
|
-
type: :
|
174
|
+
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
@@ -171,79 +185,41 @@ executables: []
|
|
171
185
|
extensions: []
|
172
186
|
extra_rdoc_files: []
|
173
187
|
files:
|
188
|
+
- ".gitignore"
|
189
|
+
- ".rubocop.yml"
|
190
|
+
- ".ruby-version"
|
191
|
+
- ".todo.reek"
|
174
192
|
- CHANGELOG.md
|
175
193
|
- Gemfile
|
176
|
-
- Gemfile.lock
|
177
194
|
- Guardfile
|
178
195
|
- LICENSE.txt
|
179
196
|
- README.md
|
180
197
|
- Rakefile
|
198
|
+
- bin/ci-run
|
199
|
+
- bin/ci-setup
|
200
|
+
- bin/reek
|
201
|
+
- bin/rspec
|
202
|
+
- bin/rubocop
|
203
|
+
- examples/fetch.rb
|
204
|
+
- examples/search.rb
|
181
205
|
- lib/poms.rb
|
182
206
|
- lib/poms/api/auth.rb
|
207
|
+
- lib/poms/api/client.rb
|
208
|
+
- lib/poms/api/drivers/net_http.rb
|
209
|
+
- lib/poms/api/json_client.rb
|
210
|
+
- lib/poms/api/pagination_client.rb
|
183
211
|
- lib/poms/api/request.rb
|
184
|
-
- lib/poms/
|
185
|
-
- lib/poms/
|
186
|
-
- lib/poms/
|
187
|
-
- lib/poms/
|
188
|
-
- lib/poms/
|
189
|
-
- lib/poms/
|
212
|
+
- lib/poms/api/response.rb
|
213
|
+
- lib/poms/api/search.rb
|
214
|
+
- lib/poms/api/uris.rb
|
215
|
+
- lib/poms/api/uris/media.rb
|
216
|
+
- lib/poms/api/uris/schedule.rb
|
217
|
+
- lib/poms/configuration.rb
|
218
|
+
- lib/poms/errors.rb
|
190
219
|
- lib/poms/fields.rb
|
191
|
-
- lib/poms/has_ancestors.rb
|
192
|
-
- lib/poms/has_base_attributes.rb
|
193
|
-
- lib/poms/merged_series.rb
|
194
|
-
- lib/poms/poms_error.rb
|
195
|
-
- lib/poms/schedule_event.rb
|
196
|
-
- lib/poms/season.rb
|
197
|
-
- lib/poms/series.rb
|
198
220
|
- lib/poms/timestamp.rb
|
199
221
|
- lib/poms/version.rb
|
200
|
-
- lib/poms/views.rb
|
201
222
|
- poms.gemspec
|
202
|
-
- spec/fabricators/poms_fabricator.rb
|
203
|
-
- spec/fixtures/poms_broadcast.json
|
204
|
-
- spec/fixtures/poms_broadcast_multiple_schedule_events.json
|
205
|
-
- spec/fixtures/poms_broadcast_pippi.json
|
206
|
-
- spec/fixtures/poms_group.json
|
207
|
-
- spec/fixtures/poms_series.json
|
208
|
-
- spec/fixtures/poms_single_broadcast_by_channel.json
|
209
|
-
- spec/fixtures/poms_zapp.json
|
210
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast_starts_at/returns_a_datetime.yml
|
211
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_position.yml
|
212
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_title.yml
|
213
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_video_url.yml
|
214
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_an_image_id.yml
|
215
|
-
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_current_broadcast_fetches_the_current_broadcast.yml
|
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
|
218
|
-
- spec/fixtures/vcr_cassettes/poms/merged_series/turns_the_json_into_a_hash.yml
|
219
|
-
- spec/fixtures/vcr_cassettes/poms_fetch/a_broadcast_has_scheduled_events_with_last_with_starts_at.yml
|
220
|
-
- spec/fixtures/vcr_cassettes/poms_fetch/a_clip_has_a_title.yml
|
221
|
-
- spec/fixtures/vcr_cassettes/poms_fetch/an_aankeiler_has_images.yml
|
222
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_broadcasts_for_serie/returns_nil_when_a_broadcast_does_not_exist.yml
|
223
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_mid.yml
|
224
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_title.yml
|
225
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_scheduled_events_with_last_with_starts_at.yml
|
226
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_broadcast_with_a_mid.yml
|
227
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_key.yml
|
228
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_descendant_mids/returns_a_list_of_mids.yml
|
229
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_descendants_for_serie/builds_a_list_of_broadcasts.yml
|
230
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_media_type.yml
|
231
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_title.yml
|
232
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_playlist_clips/creates_an_array_of_clips.yml
|
233
|
-
- spec/integration/poms_spec.rb
|
234
|
-
- spec/lib/poms/api/auth_spec.rb
|
235
|
-
- spec/lib/poms/api/request_spec.rb
|
236
|
-
- spec/lib/poms/broadcast_spec.rb
|
237
|
-
- spec/lib/poms/builder_spec.rb
|
238
|
-
- spec/lib/poms/builderless/broadcast_spec.rb
|
239
|
-
- spec/lib/poms/builderless/clip_spec.rb
|
240
|
-
- spec/lib/poms/fields_spec.rb
|
241
|
-
- spec/lib/poms/merged_series_spec.rb
|
242
|
-
- spec/lib/poms/schedule_event_spec.rb
|
243
|
-
- spec/lib/poms/timestamp_spec.rb
|
244
|
-
- spec/lib/poms/views_spec.rb
|
245
|
-
- spec/lib/poms_spec.rb
|
246
|
-
- spec/spec_helper.rb
|
247
223
|
homepage: https://github.com/brightin/poms
|
248
224
|
licenses:
|
249
225
|
- MIT
|
@@ -259,58 +235,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
259
235
|
version: '0'
|
260
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
261
237
|
requirements:
|
262
|
-
- - "
|
238
|
+
- - ">"
|
263
239
|
- !ruby/object:Gem::Version
|
264
|
-
version:
|
240
|
+
version: 1.3.1
|
265
241
|
requirements: []
|
266
242
|
rubyforge_project:
|
267
|
-
rubygems_version: 2.
|
243
|
+
rubygems_version: 2.5.1
|
268
244
|
signing_key:
|
269
245
|
specification_version: 4
|
270
246
|
summary: Interface to POMS CouchDB API
|
271
|
-
test_files:
|
272
|
-
- spec/fabricators/poms_fabricator.rb
|
273
|
-
- spec/fixtures/poms_broadcast.json
|
274
|
-
- spec/fixtures/poms_broadcast_multiple_schedule_events.json
|
275
|
-
- spec/fixtures/poms_broadcast_pippi.json
|
276
|
-
- spec/fixtures/poms_group.json
|
277
|
-
- spec/fixtures/poms_series.json
|
278
|
-
- spec/fixtures/poms_single_broadcast_by_channel.json
|
279
|
-
- spec/fixtures/poms_zapp.json
|
280
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/broadcast_starts_at/returns_a_datetime.yml
|
281
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_position.yml
|
282
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_title.yml
|
283
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_video_url.yml
|
284
|
-
- spec/fixtures/vcr_cassettes/poms/builderless/clip/has_an_image_id.yml
|
285
|
-
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_current_broadcast_fetches_the_current_broadcast.yml
|
286
|
-
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_fetches_the_current_broadcast.yml
|
287
|
-
- spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_returns_the_key.yml
|
288
|
-
- spec/fixtures/vcr_cassettes/poms/merged_series/turns_the_json_into_a_hash.yml
|
289
|
-
- spec/fixtures/vcr_cassettes/poms_fetch/a_broadcast_has_scheduled_events_with_last_with_starts_at.yml
|
290
|
-
- spec/fixtures/vcr_cassettes/poms_fetch/a_clip_has_a_title.yml
|
291
|
-
- spec/fixtures/vcr_cassettes/poms_fetch/an_aankeiler_has_images.yml
|
292
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_broadcasts_for_serie/returns_nil_when_a_broadcast_does_not_exist.yml
|
293
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_mid.yml
|
294
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_title.yml
|
295
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_scheduled_events_with_last_with_starts_at.yml
|
296
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_broadcast_with_a_mid.yml
|
297
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_key.yml
|
298
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_descendant_mids/returns_a_list_of_mids.yml
|
299
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_descendants_for_serie/builds_a_list_of_broadcasts.yml
|
300
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_media_type.yml
|
301
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_title.yml
|
302
|
-
- spec/fixtures/vcr_cassettes/poms_fetch_playlist_clips/creates_an_array_of_clips.yml
|
303
|
-
- spec/integration/poms_spec.rb
|
304
|
-
- spec/lib/poms/api/auth_spec.rb
|
305
|
-
- spec/lib/poms/api/request_spec.rb
|
306
|
-
- spec/lib/poms/broadcast_spec.rb
|
307
|
-
- spec/lib/poms/builder_spec.rb
|
308
|
-
- spec/lib/poms/builderless/broadcast_spec.rb
|
309
|
-
- spec/lib/poms/builderless/clip_spec.rb
|
310
|
-
- spec/lib/poms/fields_spec.rb
|
311
|
-
- spec/lib/poms/merged_series_spec.rb
|
312
|
-
- spec/lib/poms/schedule_event_spec.rb
|
313
|
-
- spec/lib/poms/timestamp_spec.rb
|
314
|
-
- spec/lib/poms/views_spec.rb
|
315
|
-
- spec/lib/poms_spec.rb
|
316
|
-
- spec/spec_helper.rb
|
247
|
+
test_files: []
|