trailer_vote-media_types 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e9d1cea79471659f0cfa1566130f307f05f7967
4
- data.tar.gz: 25537d64992601748182f51577d7401466bf037f
3
+ metadata.gz: 7e8e2073ca8254fce69f86721825790bacbc4cae
4
+ data.tar.gz: f0f8376d78577824342d3e0aff69ea7121a740e3
5
5
  SHA512:
6
- metadata.gz: 5918627d64a7e36bbf11aac52acd6bce93975377cd92bc864047d94fe8085178ae112c880c67aef2f4234b852ebf5d56ccd111357a768712ea65434352783623
7
- data.tar.gz: ef8199ce81dd683fc3705d57420aadd2294c669327fce34febf914fbb51ad191c131cd1dab40ea7ae3081d1937183641669c40114e7d29c5467aa9534ba3133c
6
+ metadata.gz: a3d9082e0d738790e4fd315e3261151b672793937e21cd899b0f0c31e185f5f34efbaf9835ae5357cf765872965c8bdb0aec1e6fe5456583fce1614794a5b064
7
+ data.tar.gz: fb5a281bad3c51f23108698f4fabb3d948b1491aa4ba0b1bbd7b3ea03b07188309991f1ec3afa9bb91ff8c44f8c08014f19896248eb280e1c6ce8b545558ca82
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.7.0
2
+
3
+ - Add `products` link to configuration v1
4
+ - Add scheme validation for `data` property of products
5
+
1
6
  # 0.6.3
2
7
 
3
8
  - Fix `product_video` create root key
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trailer_vote-media_types (0.6.3)
4
+ trailer_vote-media_types (0.7.0)
5
5
  media_types (>= 0.6.0, < 1)
6
6
 
7
7
  GEM
@@ -36,6 +36,7 @@ module TrailerVote
36
36
  version 1 do
37
37
  attribute :configuration do
38
38
  link :place
39
+ link :products
39
40
  link :feedback do
40
41
  attribute :href, Types.makeFormattedUrl(:uuid)
41
42
  attribute :templated, TrueClass
@@ -3,6 +3,7 @@
3
3
  require_relative 'base_text'
4
4
  require_relative 'types/product_data_type'
5
5
  require_relative 'types/iso8601'
6
+ require_relative 'types/http_url'
6
7
 
7
8
  module TrailerVote
8
9
  module MediaTypes
@@ -23,7 +24,7 @@ module TrailerVote
23
24
  index_scheme = ::MediaTypes::Scheme.new do
24
25
  attribute :products do
25
26
  collection :_index, allow_empty: true do
26
- attribute :href, String
27
+ attribute :href, Types::HttpUrl
27
28
  not_strict
28
29
  end
29
30
 
@@ -48,11 +49,18 @@ module TrailerVote
48
49
 
49
50
  attribute :translations do
50
51
  any do
51
- attribute :name, AllowNil(String)
52
- attribute :description, AllowNil(String)
52
+ attribute :name, AllowNil(String), optional: true
53
+ attribute :description, AllowNil(String), optional: true
53
54
  end
54
55
  end
55
56
 
57
+ # Movie type properties
58
+ collection :genres, String, optional: true, allow_empty: true
59
+ attribute :mpaa_rating, AnyOf('G', 'PG', 'PG-13', 'R', 'NC-17', 'NR', NilClass), optional: true
60
+ attribute :run_time, AllowNil(Numeric), optional: true
61
+ attribute :release_date, AllowNil(Types::Iso8601), optional: true
62
+ attribute :default_image_url, AllowNil(String), optional: true
63
+
56
64
  not_strict
57
65
  end
58
66
  end
@@ -116,6 +124,13 @@ module TrailerVote
116
124
  attribute :name, AllowNil(String)
117
125
  attribute :description, AllowNil(String)
118
126
 
127
+ # Movie type properties
128
+ collection :genres, String, optional: true, allow_empty: true
129
+ attribute :mpaa_rating, AnyOf('G', 'PG', 'PG-13', 'R', 'NC-17', 'NR', NilClass), optional: true
130
+ attribute :run_time, AllowNil(Numeric), optional: true
131
+ attribute :release_date, AllowNil(Types::Iso8601), optional: true
132
+ attribute :default_image_url, AllowNil(String), optional: true
133
+
119
134
  not_strict
120
135
  end
121
136
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TrailerVote
4
4
  module MediaTypes
5
- VERSION = '0.6.3'
5
+ VERSION = '0.7.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailer_vote-media_types
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-08 00:00:00.000000000 Z
11
+ date: 2018-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: media_types