trailer_vote-media_types 2.4.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/lib/trailer_vote/media_types/audio_fragment.rb +1 -18
  4. data/lib/trailer_vote/media_types/base_text.rb +2 -6
  5. data/lib/trailer_vote/media_types/carousel.rb +1 -8
  6. data/lib/trailer_vote/media_types/client_configuration.rb +1 -5
  7. data/lib/trailer_vote/media_types/configuration.rb +1 -5
  8. data/lib/trailer_vote/media_types/errors.rb +1 -4
  9. data/lib/trailer_vote/media_types/feedback.rb +1 -6
  10. data/lib/trailer_vote/media_types/feedback_listing.rb +1 -10
  11. data/lib/trailer_vote/media_types/fingerprint_binary.rb +7 -42
  12. data/lib/trailer_vote/media_types/interactive_player.rb +1 -10
  13. data/lib/trailer_vote/media_types/issue.rb +1 -9
  14. data/lib/trailer_vote/media_types/manifest_update.rb +1 -5
  15. data/lib/trailer_vote/media_types/ordered_fragment.rb +4 -10
  16. data/lib/trailer_vote/media_types/persona.rb +1 -7
  17. data/lib/trailer_vote/media_types/place.rb +4 -12
  18. data/lib/trailer_vote/media_types/product.rb +1 -11
  19. data/lib/trailer_vote/media_types/product_image.rb +6 -12
  20. data/lib/trailer_vote/media_types/product_lookup.rb +1 -5
  21. data/lib/trailer_vote/media_types/product_place_link.rb +10 -11
  22. data/lib/trailer_vote/media_types/product_video.rb +1 -10
  23. data/lib/trailer_vote/media_types/products_listing.rb +1 -10
  24. data/lib/trailer_vote/media_types/push_consent.rb +1 -7
  25. data/lib/trailer_vote/media_types/push_manifest.rb +1 -5
  26. data/lib/trailer_vote/media_types/push_recipe_android.rb +1 -5
  27. data/lib/trailer_vote/media_types/push_recipe_ios.rb +1 -5
  28. data/lib/trailer_vote/media_types/push_token_android.rb +1 -8
  29. data/lib/trailer_vote/media_types/push_token_index.rb +1 -7
  30. data/lib/trailer_vote/media_types/push_token_ios.rb +1 -8
  31. data/lib/trailer_vote/media_types/push_trivial_campaign.rb +1 -8
  32. data/lib/trailer_vote/media_types/release_push_campaign.rb +1 -7
  33. data/lib/trailer_vote/media_types/sentiment_feedback.rb +1 -7
  34. data/lib/trailer_vote/media_types/version.rb +1 -1
  35. data/lib/trailer_vote/media_types/vista_config.rb +1 -7
  36. data/trailer_vote-media_types.gemspec +1 -1
  37. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: edefd69a3f17fc2a4e244c402226184187d8ca5cd09d20c6595fc253e31ea2b3
4
- data.tar.gz: b666653bb06d8309fc234c27d33c3405d60ec825971fd6f77d3bc5e57ce745e0
3
+ metadata.gz: 73c8bc5a42b7f8e2c24910049740248efb85ea25b7092de270fe61bd20fdf105
4
+ data.tar.gz: 34d65909fd130d289193579348d7c26933000ad617794d6c2f60cea9d28aaef2
5
5
  SHA512:
6
- metadata.gz: edc42842c52fc65db82fa84cae0c9dc30a4153721507e237a4ecb58b5d4de647fd6ddcd293a85ff6528c91d5f1b7807da2d1fbcf9149e6861a2ae3efc387ef93
7
- data.tar.gz: 6be402ba06a16203a0c5cfabf31a18708468d471caf08d9bd69d36a85132739d09c490443cd78ba40475ff10be6d6a4f272feafafb23c8e3c7917efd95b3828c
6
+ metadata.gz: 9ff47edc924f6c685b4ceb61b6b839d0d2e39e206247838cc23026711eaf4b9d983a2fef1ba703f62ce8d7ef85ba16b09222f3a30a9c8a81581f1c557dd47b14
7
+ data.tar.gz: 69cf8ad6416f49b369adcfa31b880327610ef41ef954453e58f9b7f2fbb25f23b028b2697d8ec4c9f0447634b959940cf651ac9f732e190da99d898f47e82b9b
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trailer_vote-media_types (2.4.1)
5
- media_types (>= 0.6.0, < 1)
4
+ trailer_vote-media_types (3.0.0)
5
+ media_types (>= 2.0.0, < 3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -11,7 +11,7 @@ GEM
11
11
  awesome_print (1.8.0)
12
12
  builder (3.2.4)
13
13
  docile (1.3.2)
14
- media_types (0.6.2)
14
+ media_types (2.0.0)
15
15
  minitest (5.14.0)
16
16
  minitest-ci (3.4.0)
17
17
  minitest (>= 5.0.6)
@@ -27,7 +27,7 @@ GEM
27
27
  docile (~> 1.1)
28
28
  simplecov-html (~> 0.11)
29
29
  simplecov-html (0.12.2)
30
- trailer_vote-fixtures (1.17.1)
30
+ trailer_vote-fixtures (1.17.4)
31
31
 
32
32
  PLATFORMS
33
33
  ruby
@@ -22,7 +22,7 @@ module TrailerVote
22
22
  # @see https://www.rubydoc.info/gems/media_types/MediaTypes/Constructable ::MediaTypes::Constructable
23
23
  # @return [::MediaTypes::Constructable] a constructable
24
24
  #
25
- media_type 'audio_fragment', defaults: { suffix: :json, version: 1 }
25
+ use_name 'audio_fragment'
26
26
 
27
27
  # @!method valid?(data, constructed_media_type, **opts)
28
28
  # Validates the +data+ against the validation for +constructed_media_type+.
@@ -86,23 +86,6 @@ module TrailerVote
86
86
  end
87
87
  end
88
88
  end
89
-
90
- # @!method register
91
- # Registers all the known permutations of versions, views, suffixes and aliases for this media type via
92
- # {::MediaTypes.register}
93
- #
94
- # @see https://www.rubydoc.info/gems/media_types/MediaTypes#register-class-method ::Mediatypes.register
95
- # @see https://www.rubydoc.info/gems/media_types/MediaTypes/Registerable ::Mediatypes::Registerable
96
- #
97
- # @return [Array<::MediaTypes::Registerable>]
98
- registrations :audio_fragment do
99
- view 'index', :audio_fragment_urls
100
- view 'collection', :audio_fragments
101
-
102
- versions 1
103
-
104
- type_alias 'audio-fragment'
105
- end
106
89
  end
107
90
  end
108
91
  end
@@ -9,12 +9,8 @@ module TrailerVote
9
9
 
10
10
  class << self
11
11
 
12
- protected
13
-
14
- BASE_TEXT_FORMAT = 'application/vnd.trailervote.%<type>s.v%<version>s.%<view>s+%<suffix>s'
15
-
16
- def base_format
17
- BASE_TEXT_FORMAT
12
+ def organisation
13
+ 'trailervote'
18
14
  end
19
15
  end
20
16
  end
@@ -7,12 +7,7 @@ module TrailerVote
7
7
  module MediaTypes
8
8
 
9
9
  class Carousel < BaseText
10
- media_type 'carousel'
11
-
12
- defaults do
13
- suffix :json
14
- version 1
15
- end
10
+ use_name 'carousel'
16
11
 
17
12
  validations do
18
13
  version 1 do
@@ -35,8 +30,6 @@ module TrailerVote
35
30
  end
36
31
  end
37
32
  end
38
-
39
- registrations(:carousel) {}
40
33
  end
41
34
  end
42
35
  end
@@ -15,7 +15,7 @@ module TrailerVote
15
15
  # the values.
16
16
  #
17
17
  class ClientConfiguration < BaseText
18
- media_type 'client_configuration', defaults: { suffix: :json, version: 1 }
18
+ use_name 'client_configuration'
19
19
 
20
20
  validations do
21
21
  version 1 do
@@ -26,10 +26,6 @@ module TrailerVote
26
26
  end
27
27
  end
28
28
 
29
- registrations :client_configuration do
30
- versions 1
31
- type_alias 'client-configuration'
32
- end
33
29
  end
34
30
  end
35
31
  end
@@ -11,7 +11,7 @@ module TrailerVote
11
11
  # Media Types for Configuration
12
12
  #
13
13
  class Configuration < BaseText
14
- media_type 'configuration', defaults: { suffix: :json, version: 5 }
14
+ use_name 'configuration'
15
15
 
16
16
  validations do
17
17
 
@@ -130,10 +130,6 @@ module TrailerVote
130
130
  end
131
131
  end
132
132
  end
133
-
134
- registrations :configuration do
135
- versions 1, 2, 3
136
- end
137
133
  end
138
134
  end
139
135
  end
@@ -12,7 +12,7 @@ module TrailerVote
12
12
  # header of each request. The RECOMMENDED value for q is 0.1.
13
13
  #
14
14
  class Errors < BaseText
15
- media_type 'errors', defaults: { suffix: :json, version: 1 }
15
+ use_name 'errors'
16
16
 
17
17
  validations do
18
18
  version 1 do
@@ -23,9 +23,6 @@ module TrailerVote
23
23
  end
24
24
  end
25
25
 
26
- registrations :errors do
27
- versions 1
28
- end
29
26
  end
30
27
  end
31
28
  end
@@ -8,7 +8,7 @@ require_relative 'types/iso8601'
8
8
  module TrailerVote
9
9
  module MediaTypes
10
10
  class Feedback < BaseText
11
- media_type 'feedback', defaults: { suffix: :json, version: 1 }
11
+ use_name 'feedback'
12
12
 
13
13
  validations do
14
14
  version 1 do
@@ -40,11 +40,6 @@ module TrailerVote
40
40
  end
41
41
  end
42
42
  end
43
-
44
- registrations :feedback do
45
- view 'create', :create_feedback
46
- view 'collection', :feedback_collection
47
- end
48
43
  end
49
44
  end
50
45
  end
@@ -8,12 +8,7 @@ require_relative 'partials/image_links'
8
8
  module TrailerVote
9
9
  module MediaTypes
10
10
  class FeedbackListing < BaseText
11
- media_type 'feedback_listing'
12
-
13
- defaults do
14
- suffix :json
15
- version 1
16
- end
11
+ use_name 'feedback_listing'
17
12
 
18
13
  validations do
19
14
  version 1 do
@@ -40,10 +35,6 @@ module TrailerVote
40
35
  end
41
36
  end
42
37
  end
43
-
44
- registrations :feedback_listing do
45
- type_alias 'feedback-listing'
46
- end
47
38
  end
48
39
  end
49
40
  end
@@ -14,52 +14,17 @@ module TrailerVote
14
14
  class FingerprintBinary
15
15
  include ::MediaTypes::Dsl
16
16
 
17
- def self.base_format
18
- 'application/vnd.trailervote.fingerprint.v%<version>s'
17
+ def self.organisation
18
+ 'trailervote'
19
19
  end
20
20
 
21
- media_type 'fingerprint', defaults: { version: '~' }
21
+ use_name 'fingerprint'
22
22
 
23
- class Current < FingerprintBinary
24
- media_type 'fingerprint', defaults: { version: 'C' }
23
+ validations do
24
+ version 2 do
25
+ suffix nil
25
26
 
26
- class << self
27
- def register(version:, **___)
28
- mime_type = FingerprintBinary.to_constructable.version(version).to_s
29
-
30
- Array(
31
- ::MediaTypes::Registerable.new(
32
- mime_type,
33
- symbol: :fingerprint_bin,
34
- aliases: []
35
- ).tap { |registerable| ::MediaTypes.register(registerable) }
36
- )
37
- end
38
- end
39
- end
40
-
41
- class Deprecated < FingerprintBinary
42
- def self.base_format
43
- 'application/vnd.trailervote.fingerprint.deprecated'
44
- end
45
-
46
- media_type 'fingerprint.deprecated', defaults: { version: nil }
47
-
48
- class << self
49
-
50
- def register(versions:, **___)
51
- aliases = versions.map do |version|
52
- FingerprintBinary.to_constructable.version(version).to_s
53
- end
54
-
55
- Array(
56
- ::MediaTypes::Registerable.new(
57
- base_format,
58
- symbol: :fingerprint_deprecated_bin,
59
- aliases: aliases
60
- ).tap { |registerable| ::MediaTypes.register(registerable) }
61
- )
62
- end
27
+ any
63
28
  end
64
29
  end
65
30
  end
@@ -5,12 +5,7 @@ require_relative 'base_text'
5
5
  module TrailerVote
6
6
  module MediaTypes
7
7
  class InteractivePlayer < BaseText
8
- media_type 'interactive_player'
9
-
10
- defaults do
11
- suffix :json
12
- version 1
13
- end
8
+ use_name 'interactive_player'
14
9
 
15
10
  validations do
16
11
  version 1 do
@@ -24,10 +19,6 @@ module TrailerVote
24
19
  end
25
20
  end
26
21
  end
27
-
28
- registrations :interactive_player do
29
- type_alias 'interactive-player'
30
- end
31
22
  end
32
23
  end
33
24
  end
@@ -6,7 +6,7 @@ require_relative 'types/iso8601'
6
6
  module TrailerVote
7
7
  module MediaTypes
8
8
  class Issue < BaseText
9
- media_type 'issue', defaults: { suffix: :json, version: 1 }
9
+ use_name 'issue'
10
10
 
11
11
  validations do
12
12
  index_scheme = ::MediaTypes::Scheme.new do
@@ -51,14 +51,6 @@ module TrailerVote
51
51
  end
52
52
  end
53
53
  end
54
-
55
- registrations :issue do
56
- view 'create', :create_issue
57
- view 'index', :issue_urls
58
-
59
- versions 1
60
- end
61
-
62
54
  end
63
55
  end
64
56
  end
@@ -12,7 +12,7 @@ module TrailerVote
12
12
  # The manifest update action is used to force clients to update the manifest
13
13
  #
14
14
  class ManifestUpdate < BaseText
15
- media_type 'manifest_update', defaults: { suffix: :json, version: 1 }
15
+ use_name 'manifest_update'
16
16
 
17
17
  validations do
18
18
 
@@ -21,10 +21,6 @@ module TrailerVote
21
21
  end
22
22
  end
23
23
  end
24
-
25
- registrations :manifest_update do
26
- versions 1
27
- end
28
24
  end
29
25
  end
30
26
  end
@@ -7,29 +7,23 @@ module TrailerVote
7
7
  module MediaTypes
8
8
  class OrderedFragment < BaseText
9
9
 
10
- media_type 'ordered_fragment', defaults: { suffix: :json, version: 1, view: :index }
10
+ use_name 'ordered_fragment'
11
11
 
12
12
  validations do
13
13
  version 1 do
14
+ not_strict
15
+
14
16
  view 'index' do
15
17
  attribute :ordered_fragments do
16
18
  collection :_index, allow_empty: true do
17
19
  attribute :href, Types::HttpUrl
18
- attribute :q, Float
20
+ attribute :q, Numeric
19
21
  end
20
22
  not_strict
21
23
  end
22
24
  end
23
25
  end
24
26
  end
25
-
26
- registrations :audio_fragment do
27
- view 'index', :ordered_fragment_urls
28
-
29
- versions 1
30
-
31
- type_alias 'ordered-fragment'
32
- end
33
27
  end
34
28
  end
35
29
  end
@@ -14,7 +14,7 @@ module TrailerVote
14
14
  # as likes/dislikes (interests/disinterests).
15
15
  #
16
16
  class Persona < BaseText
17
- media_type 'persona', defaults: { suffix: :json, version: 2 }
17
+ use_name 'persona'
18
18
 
19
19
  validations do
20
20
  version 1 do
@@ -36,12 +36,6 @@ module TrailerVote
36
36
  end
37
37
  end
38
38
  end
39
-
40
- registrations :persona do
41
- view 'create', :create_persona
42
-
43
- versions 1, 2
44
- end
45
39
  end
46
40
  end
47
41
  end
@@ -15,7 +15,7 @@ module TrailerVote
15
15
  # system are configured to be a tree.
16
16
  #
17
17
  class Place < BaseText
18
- media_type 'place', defaults: { suffix: :json, version: 4 }
18
+ use_name 'place'
19
19
 
20
20
  validations do
21
21
  index_scheme = ::MediaTypes::Scheme.new do
@@ -32,7 +32,7 @@ module TrailerVote
32
32
  version 4 do
33
33
  attribute :place do
34
34
  attribute :name, String
35
- attribute :parent_place, AllowNil(Types::UuidV4)
35
+ attribute :parent_place, AllowNil(String)
36
36
  attribute :expires_at, AllowNil(String)
37
37
  attribute :updated_at, Types::Iso8601
38
38
 
@@ -51,7 +51,7 @@ module TrailerVote
51
51
  version 3 do
52
52
  attribute :place do
53
53
  attribute :name, String
54
- attribute :parent_place, AllowNil(Types::UuidV4)
54
+ attribute :parent_place, AllowNil(String)
55
55
  attribute :expires_at, AllowNil(String)
56
56
  attribute :updated_at, Types::Iso8601
57
57
 
@@ -69,7 +69,7 @@ module TrailerVote
69
69
  version 2 do
70
70
  version_2_base = ::MediaTypes::Scheme.new do
71
71
  attribute :name, String
72
- attribute :parent_place, AllowNil(Types::UuidV4)
72
+ attribute :parent_place, AllowNil(String)
73
73
  attribute :expires_at, AllowNil(String)
74
74
  attribute :updated_at, Types::Iso8601
75
75
 
@@ -130,14 +130,6 @@ module TrailerVote
130
130
  end
131
131
  end
132
132
  end
133
-
134
- registrations :place do
135
- view 'create', :create_place
136
- view 'index', :place_urls
137
- view 'collection', :places
138
-
139
- versions 1, 2, 3, 4
140
- end
141
133
  end
142
134
  end
143
135
  end
@@ -18,7 +18,7 @@ module TrailerVote
18
18
  # A product has attachments, such as data, {ProductImage}, and recognizable {AudioFragment}.
19
19
  #
20
20
  class Product < BaseText
21
- media_type 'product', defaults: { suffix: :json, version: 2 }
21
+ use_name 'product'
22
22
 
23
23
  validations do
24
24
  index_scheme = ::MediaTypes::Scheme.new do
@@ -176,16 +176,6 @@ module TrailerVote
176
176
  end
177
177
  end
178
178
  end
179
-
180
- registrations :product do
181
- view 'index', :product_urls
182
- view 'collection', :products
183
- view 'create', :create_product
184
-
185
- versions 1, 2
186
-
187
- type_alias 'product.movie'
188
- end
189
179
  end
190
180
  end
191
181
  end
@@ -11,7 +11,7 @@ require_relative 'types/http_url'
11
11
  module TrailerVote
12
12
  module MediaTypes
13
13
  class ProductImage < BaseText
14
- media_type 'product.image', defaults: { suffix: :json, version: 1 }
14
+ use_name 'product.image'
15
15
 
16
16
  validations do
17
17
  version_1_creation = ::MediaTypes::Scheme.new do
@@ -21,6 +21,11 @@ module TrailerVote
21
21
 
22
22
  attribute :content_language, AllowNil(String), optional: true
23
23
  attribute :content_region, AllowNil(String), optional: true
24
+ attribute :data do
25
+ attribute :processed, Types::Boolean
26
+ attribute :type, Types::ProductImageType
27
+ not_strict
28
+ end
24
29
  end
25
30
 
26
31
  version_1_base = ::MediaTypes::Scheme.new do
@@ -80,17 +85,6 @@ module TrailerVote
80
85
  end
81
86
  end
82
87
  end
83
-
84
- registrations :product_image do
85
- view 'create', :create_product_image
86
- view 'index', :product_image_urls
87
- view 'collection', :product_images
88
-
89
- versions 1
90
-
91
- type_alias 'product-image'
92
- type_alias 'image'
93
- end
94
88
  end
95
89
  end
96
90
  end
@@ -18,7 +18,7 @@ module TrailerVote
18
18
  # identifier.
19
19
  #
20
20
  class ProductLookup < BaseText
21
- media_type 'product.lookup', defaults: { suffix: :json, version: 1 }
21
+ use_name 'product.lookup'
22
22
 
23
23
  validations do
24
24
  version 1 do
@@ -28,10 +28,6 @@ module TrailerVote
28
28
  end
29
29
  end
30
30
  end
31
-
32
- registrations(:product_lookup) do
33
- type_alias 'product-lookup'
34
- end
35
31
  end
36
32
  end
37
33
  end
@@ -6,7 +6,7 @@ require_relative 'types/http_url'
6
6
  module TrailerVote
7
7
  module MediaTypes
8
8
  class ProductPlaceLink < BaseText
9
- media_type 'product_place_link', defaults: { suffix: :json, version: 1 }
9
+ use_name 'product_place_link'
10
10
 
11
11
  validations do
12
12
  version 1 do
@@ -19,17 +19,16 @@ module TrailerVote
19
19
  view 'create' do
20
20
  attribute :place, Types::HttpUrl
21
21
  end
22
- end
23
- end
24
-
25
- registrations :product_place_link do
26
- view 'collection', :product_place_links
27
- view 'create', :create_product_place_link
28
- view 'index', :product_place_link_urls
29
22
 
30
- type_alias 'place_product_link'
31
- type_alias 'place-product-link'
32
- type_alias 'product-place-link'
23
+ view 'collection' do
24
+ attribute :product_place_links do
25
+ attribute :_embedded, expected_type: Array do
26
+ any
27
+ not_strict
28
+ end
29
+ end
30
+ end
31
+ end
33
32
  end
34
33
  end
35
34
  end
@@ -12,7 +12,7 @@ require_relative 'types/http_url'
12
12
  module TrailerVote
13
13
  module MediaTypes
14
14
  class ProductVideo < BaseText
15
- media_type 'product.video', defaults: { suffix: :json, version: 1 }
15
+ use_name 'product.video'
16
16
 
17
17
  validations do
18
18
  version 1 do
@@ -86,15 +86,6 @@ module TrailerVote
86
86
  end
87
87
  end
88
88
  end
89
-
90
- registrations :product_video do
91
- view 'create', :create_product_video
92
- view 'index', :product_video_urls
93
- view 'collection', :product_videos
94
-
95
- type_alias 'product-video'
96
- type_alias 'video'
97
- end
98
89
  end
99
90
  end
100
91
  end
@@ -7,12 +7,7 @@ require_relative 'types/iso8601'
7
7
  module TrailerVote
8
8
  module MediaTypes
9
9
  class ProductsListing < BaseText
10
- media_type 'products_listing'
11
-
12
- defaults do
13
- suffix :json
14
- version 1
15
- end
10
+ use_name 'products_listing'
16
11
 
17
12
  validations do
18
13
  version 1 do
@@ -34,10 +29,6 @@ module TrailerVote
34
29
  end
35
30
  end
36
31
  end
37
-
38
- registrations :products_listing do
39
- type_alias 'products-listing'
40
- end
41
32
  end
42
33
  end
43
34
  end
@@ -7,7 +7,7 @@ require_relative 'types/iso8601'
7
7
  module TrailerVote
8
8
  module MediaTypes
9
9
  class PushConsent < BaseText
10
- media_type 'push_consent', defaults: { suffix: :json, version: 1 }
10
+ use_name 'push_consent'
11
11
 
12
12
  validations do
13
13
  version 1 do
@@ -33,12 +33,6 @@ module TrailerVote
33
33
  end
34
34
  end
35
35
  end
36
-
37
- registrations :push_consent do
38
- view 'create', :create_push_consent
39
-
40
- versions 1
41
- end
42
36
  end
43
37
  end
44
38
  end
@@ -12,7 +12,7 @@ module TrailerVote
12
12
  # The push manifest is a list of active push campaigns
13
13
  #
14
14
  class PushManifest < BaseText
15
- media_type 'push_manifest', defaults: { suffix: :json, version: 2 }
15
+ use_name 'push_manifest'
16
16
 
17
17
  validations do
18
18
 
@@ -35,10 +35,6 @@ module TrailerVote
35
35
  end
36
36
  end
37
37
  end
38
-
39
- registrations :push_manifest do
40
- versions 1
41
- end
42
38
  end
43
39
  end
44
40
  end
@@ -12,7 +12,7 @@ module TrailerVote
12
12
  # The push recipe is a blueprint for sending mass push notifications
13
13
  #
14
14
  class PushRecipeAndroid < BaseText
15
- media_type 'push_recipe_android', defaults: { suffix: :json, version: 1 }
15
+ use_name 'push_recipe_android'
16
16
 
17
17
  validations do
18
18
 
@@ -27,10 +27,6 @@ module TrailerVote
27
27
  end
28
28
  end
29
29
  end
30
-
31
- registrations :push_recipe_android do
32
- versions 1
33
- end
34
30
  end
35
31
  end
36
32
  end
@@ -12,7 +12,7 @@ module TrailerVote
12
12
  # The push recipe is a blueprint for sending mass push notifications
13
13
  #
14
14
  class PushRecipeIos < BaseText
15
- media_type 'push_recipe_ios', defaults: { suffix: :json, version: 1 }
15
+ use_name 'push_recipe_ios'
16
16
 
17
17
  validations do
18
18
 
@@ -30,10 +30,6 @@ module TrailerVote
30
30
  end
31
31
  end
32
32
  end
33
-
34
- registrations :push_recipe_ios do
35
- versions 1
36
- end
37
33
  end
38
34
  end
39
35
  end
@@ -6,7 +6,7 @@ require_relative 'types/uuid_v4'
6
6
  module TrailerVote
7
7
  module MediaTypes
8
8
  class PushTokenAndroid < BaseText
9
- media_type 'push_token_android', defaults: { suffix: :json, version: 1 }
9
+ use_name 'push_token_android'
10
10
 
11
11
  validations do
12
12
  version 1 do
@@ -29,13 +29,6 @@ module TrailerVote
29
29
  end
30
30
  end
31
31
  end
32
-
33
- registrations :push_token_android do
34
- view 'create', :create_push_token_android
35
-
36
- versions 1
37
- end
38
-
39
32
  end
40
33
  end
41
34
  end
@@ -7,7 +7,7 @@ require_relative 'types/uuid_v4'
7
7
  module TrailerVote
8
8
  module MediaTypes
9
9
  class PushTokenIndex < BaseText
10
- media_type 'push_token_index', defaults: { suffix: :json, version: 1 }
10
+ use_name 'push_token_index'
11
11
 
12
12
  validations do
13
13
  version 1 do
@@ -31,12 +31,6 @@ module TrailerVote
31
31
  end
32
32
  end
33
33
  end
34
-
35
- registrations :push_token_index do
36
- view 'index', :push_token_index
37
-
38
- versions 1
39
- end
40
34
  end
41
35
  end
42
36
  end
@@ -6,7 +6,7 @@ require_relative 'types/uuid_v4'
6
6
  module TrailerVote
7
7
  module MediaTypes
8
8
  class PushTokenIos < BaseText
9
- media_type 'push_token_ios', defaults: { suffix: :json, version: 1 }
9
+ use_name 'push_token_ios'
10
10
 
11
11
  validations do
12
12
  version 1 do
@@ -29,13 +29,6 @@ module TrailerVote
29
29
  end
30
30
  end
31
31
  end
32
-
33
- registrations :push_token_ios do
34
- view 'create', :create_push_token_ios
35
-
36
- versions 1
37
- end
38
-
39
32
  end
40
33
  end
41
34
  end
@@ -14,7 +14,7 @@ module TrailerVote
14
14
  # The trivial push campaign is used to schedule a local push notification at a specified time.
15
15
  #
16
16
  class PushTrivialCampaign < BaseText
17
- media_type 'push_campaign_trivial', defaults: { suffix: :json, version: 5 }
17
+ use_name 'push_campaign_trivial'
18
18
 
19
19
  filters = ::MediaTypes::Scheme.new do
20
20
  attribute :filter do
@@ -207,13 +207,6 @@ module TrailerVote
207
207
  end
208
208
  end
209
209
  end
210
-
211
- registrations :push_campaign_trivial do
212
- view 'create', :create_push_trivial_campaign
213
- view 'raw', :raw_push_trivial_campaign
214
-
215
- versions 1, 2, 3, 4, 5
216
- end
217
210
  end
218
211
  end
219
212
  end
@@ -13,7 +13,7 @@ module TrailerVote
13
13
  # The release push campaign is used to show a local push notification upon product release.
14
14
  #
15
15
  class ReleasePushCampaign < BaseText
16
- media_type 'release_push_campaign', defaults: { suffix: :json, version: 2 }
16
+ use_name 'release_push_campaign'
17
17
 
18
18
  validations do
19
19
  version 2 do
@@ -66,12 +66,6 @@ module TrailerVote
66
66
  end
67
67
  end
68
68
  end
69
-
70
- registrations :release_push_campaign do
71
- view 'create', :create_release_push_campaign
72
-
73
- versions 1,2
74
- end
75
69
  end
76
70
  end
77
71
  end
@@ -8,7 +8,7 @@ require_relative 'types/iso8601'
8
8
  module TrailerVote
9
9
  module MediaTypes
10
10
  class SentimentFeedback < BaseText
11
- media_type 'sentiment_feedback', defaults: { suffix: :json, version: 2 }
11
+ use_name 'sentiment_feedback'
12
12
 
13
13
  validations do
14
14
 
@@ -89,12 +89,6 @@ module TrailerVote
89
89
  end
90
90
  end
91
91
  end
92
-
93
- registrations :sentiment_feedback do
94
- type_alias 'feedback.sentiment'
95
-
96
- versions 1,2
97
- end
98
92
  end
99
93
  end
100
94
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TrailerVote
4
4
  module MediaTypes
5
- VERSION = '2.4.1'
5
+ VERSION = '3.0.0'
6
6
  end
7
7
  end
@@ -6,7 +6,7 @@ require_relative 'types/http_url'
6
6
  module TrailerVote
7
7
  module MediaTypes
8
8
  class VistaConfig < BaseText
9
- media_type 'vista_config', defaults: { suffix: :json, version: 1 }
9
+ use_name 'vista_config'
10
10
 
11
11
  validations do
12
12
  version 1 do
@@ -30,12 +30,6 @@ module TrailerVote
30
30
  end
31
31
  end
32
32
  end
33
-
34
- registrations :vista_config do
35
- view 'index', :vista_config_urls
36
-
37
- versions 1
38
- end
39
33
  end
40
34
  end
41
35
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.require_paths = ['lib']
30
30
  spec.required_ruby_version = '>= 2.5.1'
31
31
 
32
- spec.add_runtime_dependency 'media_types', '>= 0.6.0', '< 1'
32
+ spec.add_runtime_dependency 'media_types', '>= 2.0.0', '< 3'
33
33
 
34
34
  spec.add_development_dependency 'awesome_print', '~> 1.8'
35
35
  spec.add_development_dependency 'bundler', '~> 2.0'
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: 2.4.1
4
+ version: 3.0.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: 2020-03-28 00:00:00.000000000 Z
11
+ date: 2020-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: media_types
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.6.0
19
+ version: 2.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '1'
22
+ version: '3'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.6.0
29
+ version: 2.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '1'
32
+ version: '3'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: awesome_print
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  - !ruby/object:Gem::Version
245
245
  version: '0'
246
246
  requirements: []
247
- rubygems_version: 3.0.3
247
+ rubygems_version: 3.0.6
248
248
  signing_key:
249
249
  specification_version: 4
250
250
  summary: Holds the defined media types for the TrailerVote ecosystem