trailer_vote-media_types 1.2.0 → 1.2.1

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: 7175d13a4f214d1468a042ffaf078195c602b5a2109e7fece8da73f14f278eb9
4
- data.tar.gz: 843c9d72c4de0aada676b4aa8c45f0ff9b9c57e8fd2b4f4491318dbc934cb3eb
3
+ metadata.gz: ec23eaa48d5c021225b57e4d7421e3a2d4fae49846affb8e978d0945bb67efce
4
+ data.tar.gz: 4ea417c8eb93ab2772671acade25444230760c3dc8a7446c494e6d2271ed77f0
5
5
  SHA512:
6
- metadata.gz: a00d128ea29f5635812dcc7027e788b468947f037051f79c9b5b24bf96ab5798f37fe02ad78423f9b7b1d69a1beb99714f6d952e23d3fe52aea3e512e8588457
7
- data.tar.gz: 2ec6c0ea8aea100f1ad18d4bdd3c2e14408b486b4db8e6f32a267e06a39d3ba1a970f734a56c9b591403651ecaeb951b4dd5391a8941439418bd79f9016770d4
6
+ metadata.gz: 696f2e870bccf9bf30cdf26c5e0e13275ddf4e9d335624f5afcb39889267203807cf4c56474b670eabf4bf500efdc818be92c43de545afdd5f422a9b4587c0fb
7
+ data.tar.gz: dd5ada82b6968986d47324699d9f640d1f93db21672f19db22a7fd7a81c2df318d05a6102778fcc1c9df6683311ccb30a66b4be90e5b427ce84fb6f3ece42124
data/.rubocop.yml CHANGED
@@ -5,7 +5,7 @@ AllCops:
5
5
  Exclude:
6
6
  - 'Gemfile'
7
7
  - 'bin/**/*'
8
- TargetRubyVersion: 2.4
8
+ TargetRubyVersion: 2.5
9
9
 
10
10
  Layout/EmptyLinesAroundClassBody:
11
11
  Enabled: false
data/.travis.yml CHANGED
@@ -2,7 +2,6 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.4
6
5
  - 2.5
7
6
  - 2.6
8
7
  - rbx-3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trailer_vote-media_types (1.2.0)
4
+ trailer_vote-media_types (1.2.1)
5
5
  media_types (>= 0.6.0, < 1)
6
6
 
7
7
  GEM
@@ -13,7 +13,7 @@ GEM
13
13
  docile (1.3.2)
14
14
  json (2.2.0)
15
15
  media_types (0.6.2)
16
- minitest (5.11.3)
16
+ minitest (5.12.0)
17
17
  minitest-ci (3.4.0)
18
18
  minitest (>= 5.0.6)
19
19
  minitest-reporters (1.3.8)
@@ -21,22 +21,22 @@ GEM
21
21
  builder
22
22
  minitest (>= 5.0)
23
23
  ruby-progressbar
24
- oj (3.9.0)
24
+ oj (3.9.1)
25
25
  rake (12.3.3)
26
26
  ruby-progressbar (1.10.1)
27
- simplecov (0.17.0)
27
+ simplecov (0.17.1)
28
28
  docile (~> 1.1)
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.5.1)
32
+ trailer_vote-fixtures (1.6.1)
33
33
 
34
34
  PLATFORMS
35
35
  ruby
36
36
  x64-mingw32
37
37
 
38
38
  DEPENDENCIES
39
- awesome_print
39
+ awesome_print (~> 1.8)
40
40
  bundler (~> 1.16)
41
41
  minitest (~> 5.0)
42
42
  minitest-ci (~> 3.4)
@@ -44,7 +44,7 @@ DEPENDENCIES
44
44
  oj (~> 3.6)
45
45
  rake (~> 12.3)
46
46
  simplecov (~> 0.16)
47
- trailer_vote-fixtures (~> 1.3)
47
+ trailer_vote-fixtures (~> 1.6.1)
48
48
  trailer_vote-media_types!
49
49
 
50
50
  BUNDLED WITH
@@ -14,24 +14,79 @@ 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: 2 }
17
+ media_type 'push_campaign_trivial', defaults: { suffix: :json, version: 3 }
18
+
19
+ filters = ::MediaTypes::Scheme.new do
20
+ attribute :filter do
21
+ attribute :platform, AllowNil(String)
22
+ attribute :region, AllowNil(String)
23
+ attribute :language, AllowNil(String)
24
+ attribute :timezone, AllowNil(String)
25
+ attribute :vote_source, AllowNil(String)
26
+ attribute :purchased, AllowNil(Types::Boolean)
27
+ attribute :vote_value, AllowNil(Types::VoteValue)
28
+ attribute :vote_from, AllowNil(Types::Iso8601)
29
+ attribute :vote_until, AllowNil(Types::Iso8601)
30
+ end
31
+ end
32
+
33
+ filters_creation = ::MediaTypes::Scheme.new do
34
+ attribute :filter do
35
+ attribute :platform, AllowNil(String), optional: true
36
+ attribute :region, AllowNil(String), optional: true
37
+ attribute :language, AllowNil(String), optional: true
38
+ attribute :timezone, AllowNil(String), optional: true
39
+ attribute :vote_source, AllowNil(String), optional: true
40
+ attribute :purchased, AllowNil(Types::Boolean), optional: true
41
+ attribute :vote_value, AllowNil(Types::VoteValue), optional: true
42
+ attribute :vote_from, AllowNil(Types::Iso8601), optional: true
43
+ attribute :vote_until, AllowNil(Types::Iso8601), optional: true
44
+ end
45
+ end
46
+
47
+ push_creation_base = ::MediaTypes::Scheme.new do
48
+ attribute :_links do
49
+ attribute :product_asset do
50
+ attribute :href, Types::HttpUrl
51
+ end
52
+ attribute :action do
53
+ attribute :href, Types::HttpUrl
54
+ end
55
+ end
56
+ attribute :schedule_at, Types::Iso8601
57
+ attribute :translations, ::Hash
58
+ end
18
59
 
19
60
  validations do
61
+ version 3 do
62
+ attribute :push_campaign_trivial do
63
+ link :action
64
+ link :self
65
+ attribute :message, String
66
+ attribute :schedule_at, Types::Iso8601
67
+ merge filters
68
+ end
69
+
70
+ view 'create' do
71
+ attribute :push_campaign_trivial do
72
+ merge push_creation_base
73
+ merge filters_creation
74
+ end
75
+ end
76
+ end
77
+
20
78
  version 2 do
21
79
  attribute :push_campaign_trivial do
22
80
  link :action
23
81
  attribute :message, String
24
82
  attribute :schedule_at, Types::Iso8601
25
- attribute :filter do
26
- attribute :platform, AllowNil(String)
27
- attribute :region, AllowNil(String)
28
- attribute :language, AllowNil(String)
29
- attribute :timezone, AllowNil(String)
30
- attribute :vote_source, AllowNil(String)
31
- attribute :purchased, AllowNil(Types::Boolean)
32
- attribute :vote_value, AllowNil(Types::VoteValue)
33
- attribute :vote_from, AllowNil(Types::Iso8601)
34
- attribute :vote_until, AllowNil(Types::Iso8601)
83
+ merge filters
84
+ end
85
+
86
+ view 'create' do
87
+ attribute :push_campaign_trivial do
88
+ merge push_creation_base
89
+ merge filters_creation
35
90
  end
36
91
  end
37
92
  end
@@ -45,11 +100,7 @@ module TrailerVote
45
100
 
46
101
  view 'create' do
47
102
  attribute :push_campaign_trivial do
48
- link :product_asset
49
- link :place
50
- attribute :url, String
51
- attribute :schedule_at, Types::Iso8601
52
- attribute :translations, ::Hash
103
+ merge push_creation_base
53
104
  end
54
105
  end
55
106
  end
@@ -58,7 +109,7 @@ module TrailerVote
58
109
  registrations :push_campaign_trivial do
59
110
  view 'create', :create_push_trivial_campaign
60
111
 
61
- versions 1, 2
112
+ versions 1, 2, 3
62
113
  end
63
114
  end
64
115
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TrailerVote
4
4
  module MediaTypes
5
- VERSION = '1.2.0'
5
+ VERSION = '1.2.1'
6
6
  end
7
7
  end
@@ -10,6 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ['Derk-Jan Karrenbeld']
11
11
  spec.email = ['dj@trailervote.com']
12
12
  spec.summary = 'Holds the defined media types for the TrailerVote ecosystem'
13
+ spec.homepage = 'https://github.com/TrailerVote/trailervote-media-types'
13
14
 
14
15
  # noinspection RubyStringKeysInHashInspection
15
16
  spec.metadata = {
@@ -26,10 +27,11 @@ Gem::Specification.new do |spec|
26
27
  spec.bindir = 'exe'
27
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
29
  spec.require_paths = ['lib']
30
+ spec.required_ruby_version = '>= 2.5.1'
29
31
 
30
32
  spec.add_runtime_dependency 'media_types', '>= 0.6.0', '< 1'
31
33
 
32
- spec.add_development_dependency 'awesome_print'
34
+ spec.add_development_dependency 'awesome_print', '~> 1.8'
33
35
  spec.add_development_dependency 'bundler', '~> 1.16'
34
36
  spec.add_development_dependency 'minitest', '~> 5.0'
35
37
  spec.add_development_dependency 'minitest-ci', '~> 3.4'
@@ -37,5 +39,5 @@ Gem::Specification.new do |spec|
37
39
  spec.add_development_dependency 'oj', '~> 3.6'
38
40
  spec.add_development_dependency 'rake', '~> 12.3'
39
41
  spec.add_development_dependency 'simplecov', '~> 0.16'
40
- spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.3'
42
+ spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.6.1'
41
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.0
4
+ version: 1.2.1
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-09-18 00:00:00.000000000 Z
11
+ date: 2019-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: media_types
@@ -34,16 +34,16 @@ dependencies:
34
34
  name: awesome_print
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0'
39
+ version: '1.8'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0'
46
+ version: '1.8'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '1.3'
151
+ version: 1.6.1
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.3'
158
+ version: 1.6.1
159
159
  description:
160
160
  email:
161
161
  - dj@trailervote.com
@@ -210,7 +210,7 @@ files:
210
210
  - lib/trailer_vote/media_types/types/vote_value.rb
211
211
  - lib/trailer_vote/media_types/version.rb
212
212
  - trailer_vote-media_types.gemspec
213
- homepage:
213
+ homepage: https://github.com/TrailerVote/trailervote-media-types
214
214
  licenses: []
215
215
  metadata:
216
216
  bug_tracker_uri: https://github.com/TrailerVote/trailervote-media-types/issues
@@ -226,15 +226,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: '0'
229
+ version: 2.5.1
230
230
  required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  requirements:
232
232
  - - ">="
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  requirements: []
236
- rubyforge_project:
237
- rubygems_version: 2.7.6.2
236
+ rubygems_version: 3.0.2
238
237
  signing_key:
239
238
  specification_version: 4
240
239
  summary: Holds the defined media types for the TrailerVote ecosystem