trailer_vote-media_types 1.2.4 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3597d7fdfdd658a2cd750d5772d1df9adef2ade5d6fe0ea0b3944e0ee55dc2bd
4
- data.tar.gz: b250db8d67b7e0f05f7c93439c68a93fc7f9a9a96f447fc156072aa9398c95fe
3
+ metadata.gz: 62813b871d62e6258a333318510b8a775eb7317f90ca21cb7720fcf613f026df
4
+ data.tar.gz: 0d1d5ec603c5366a7885ac55b1e1839fc6789ec326ab59793bf2b8635948c486
5
5
  SHA512:
6
- metadata.gz: bdf93a5aeb8bad741f3be883ad4edf029fcd4319293dc11b20fd22234de84f66326d6e5320b5530e4bbec56041d3e3dad73433735bef1ec883ac2f2afc4390ef
7
- data.tar.gz: 34d91ada96aa3c2a3054bf60a1ad4847fc1d005d61ddf3b01a799924ff3c4f739edb1e51602b609564d47d5130deed50137479753e917b69c204f5ea91714fe9
6
+ metadata.gz: 06bd41a85854844cc583bafc389fc7a13b77ffbeb2aee8b35f45a2a4b19d26d3fa4a64168a0ea3518db0b8b06db885407d0fb91b9e19d7a902cf142161d61e88
7
+ data.tar.gz: b989e2425f328f6ff7cae09bcc08cb686334bb834253077f91a573fe4ecaae10bbf6a7f9778683cdd8eeb5958a5dce2a5be5d05afde92ac9a5a558ba121b504f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trailer_vote-media_types (1.2.4)
4
+ trailer_vote-media_types (1.3.0)
5
5
  media_types (>= 0.6.0, < 1)
6
6
 
7
7
  GEM
@@ -29,7 +29,7 @@ GEM
29
29
  json (>= 1.8, < 3)
30
30
  simplecov-html (~> 0.10.0)
31
31
  simplecov-html (0.10.2)
32
- trailer_vote-fixtures (1.6.4)
32
+ trailer_vote-fixtures (1.7.2)
33
33
 
34
34
  PLATFORMS
35
35
  ruby
@@ -44,7 +44,7 @@ DEPENDENCIES
44
44
  oj (~> 3.6)
45
45
  rake (~> 13.0)
46
46
  simplecov (~> 0.16)
47
- trailer_vote-fixtures (~> 1.6.4)
47
+ trailer_vote-fixtures (~> 1.7.2)
48
48
  trailer_vote-media_types!
49
49
 
50
50
  BUNDLED WITH
@@ -25,6 +25,10 @@ require_relative './media_types/product_video'
25
25
  require_relative './media_types/push_trivial_campaign'
26
26
  require_relative './media_types/push_manifest'
27
27
  require_relative './media_types/issue'
28
+ require_relative './media_types/push_consent'
29
+ require_relative './media_types/push_token_index'
30
+ require_relative './media_types/push_token_android'
31
+ require_relative './media_types/push_token_ios'
28
32
 
29
33
  module TrailerVote
30
34
  module MediaTypes
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_text'
4
+ require_relative 'types/boolean'
5
+ require_relative 'types/iso8601'
6
+
7
+ module TrailerVote
8
+ module MediaTypes
9
+ class PushConsent < BaseText
10
+ media_type 'push_consent', defaults: { suffix: :json, version: 1 }
11
+
12
+ validations do
13
+ version 1 do
14
+ version_1_base = ::MediaTypes::Scheme.new do
15
+ attribute :region, String
16
+ attribute :opt_in, Types::Boolean
17
+ attribute :signed_at, Types::Iso8601
18
+ end
19
+
20
+ attribute :push_consent do
21
+ merge version_1_base
22
+
23
+ link :tos
24
+ link :tokens
25
+ end
26
+
27
+ view 'create' do
28
+ attribute :push_consent do
29
+ merge version_1_base
30
+
31
+ link :tos
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ registrations :push_consent do
38
+ view 'create', :create_push_consent
39
+
40
+ versions 1
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_text'
4
+ require_relative 'types/iso8601'
5
+ require_relative 'types/uuid_v4'
6
+
7
+ module TrailerVote
8
+ module MediaTypes
9
+ class PushTokenAndroid < BaseText
10
+ media_type 'push_token_android', defaults: { suffix: :json, version: 1 }
11
+
12
+ validations do
13
+ version 1 do
14
+ version_1_base = ::MediaTypes::Scheme.new do
15
+ attribute :token, String
16
+ attribute :app_id, String
17
+ attribute :device_id, Types::UuidV4
18
+ end
19
+
20
+ attribute :push_token_android do
21
+ merge version_1_base
22
+ end
23
+
24
+ view 'create' do
25
+ attribute :push_token_android do
26
+ merge version_1_base
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ registrations :push_token_android do
33
+ view 'create', :create_push_token_android
34
+
35
+ versions 1
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_text'
4
+ require_relative 'types/http_url'
5
+ require_relative 'types/uuid_v4'
6
+
7
+ module TrailerVote
8
+ module MediaTypes
9
+ class PushTokenIndex < BaseText
10
+ media_type 'push_token_index', defaults: { suffix: :json, version: 1 }
11
+
12
+ validations do
13
+ version 1 do
14
+ attribute :push_token_index do
15
+ collection :push_tokens, allow_empty: true do
16
+ attribute :device_id, Types::UuidV4
17
+
18
+ link :push_token
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ registrations :push_token_index do
25
+ versions 1
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_text'
4
+ require_relative 'types/iso8601'
5
+ require_relative 'types/uuid_v4'
6
+
7
+ module TrailerVote
8
+ module MediaTypes
9
+ class PushTokenIos < BaseText
10
+ media_type 'push_token_ios', defaults: { suffix: :json, version: 1 }
11
+
12
+ validations do
13
+ version 1 do
14
+ version_1_base = ::MediaTypes::Scheme.new do
15
+ attribute :token, String
16
+ attribute :app_id, String
17
+ attribute :device_id, Types::UuidV4
18
+ end
19
+
20
+ attribute :push_token_ios do
21
+ merge version_1_base
22
+ end
23
+
24
+ view 'create' do
25
+ attribute :push_token_ios do
26
+ merge version_1_base
27
+ end
28
+ end
29
+ end
30
+ end
31
+
32
+ registrations :push_token_ios do
33
+ view 'create', :create_push_token_ios
34
+
35
+ versions 1
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TrailerVote
4
4
  module MediaTypes
5
- VERSION = '1.2.4'
5
+ VERSION = '1.3.0'
6
6
  end
7
7
  end
@@ -39,5 +39,5 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency 'oj', '~> 3.6'
40
40
  spec.add_development_dependency 'rake', '~> 13.0'
41
41
  spec.add_development_dependency 'simplecov', '~> 0.16'
42
- spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.6.4'
42
+ spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.7.2'
43
43
  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: 1.2.4
4
+ version: 1.3.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: 2019-10-15 00:00:00.000000000 Z
11
+ date: 2019-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: media_types
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: 1.6.4
151
+ version: 1.7.2
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: 1.6.4
158
+ version: 1.7.2
159
159
  description:
160
160
  email:
161
161
  - dj@trailervote.com
@@ -194,7 +194,11 @@ files:
194
194
  - lib/trailer_vote/media_types/product_place_link.rb
195
195
  - lib/trailer_vote/media_types/product_video.rb
196
196
  - lib/trailer_vote/media_types/products_listing.rb
197
+ - lib/trailer_vote/media_types/push_consent.rb
197
198
  - lib/trailer_vote/media_types/push_manifest.rb
199
+ - lib/trailer_vote/media_types/push_token_android.rb
200
+ - lib/trailer_vote/media_types/push_token_index.rb
201
+ - lib/trailer_vote/media_types/push_token_ios.rb
198
202
  - lib/trailer_vote/media_types/push_trivial_campaign.rb
199
203
  - lib/trailer_vote/media_types/sentiment_feedback.rb
200
204
  - lib/trailer_vote/media_types/types/boolean.rb
@@ -233,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
237
  - !ruby/object:Gem::Version
234
238
  version: '0'
235
239
  requirements: []
236
- rubygems_version: 3.0.2
240
+ rubygems_version: 3.0.3
237
241
  signing_key:
238
242
  specification_version: 4
239
243
  summary: Holds the defined media types for the TrailerVote ecosystem