trailer_vote-media_types 2.2.0 → 2.3.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 +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +51 -51
- data/lib/trailer_vote/media_types/push_trivial_campaign.rb +219 -160
- data/lib/trailer_vote/media_types/release_push_campaign.rb +77 -77
- data/lib/trailer_vote/media_types/version.rb +7 -7
- data/trailer_vote-media_types.gemspec +43 -43
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7ca31bc160325f98ea1813dbe49cb992977819eba3501f7b153eaa5ec1de23be
|
|
4
|
+
data.tar.gz: 3a9c7ebc6d63078cd97d777e24bbf216adfae82d5fd4a9ea7a9d2be00e030711
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cfbeb7c6c7731ce18fc714ea6f96c77d159558bbc7767c273bbd65fd25edd176e9069d045a207514759b301efa3e40aa52a6d0d5cfb80c4c71ac28aaba99d96f
|
|
7
|
+
data.tar.gz: 2fb24373eaaf8c12dd44892c7de38b1b5ff6ef0009fea309e5ae36bac827cb4bb5d5cc2d6190f589c2f8c0d5c32f28eff3257697688b8b9fae5dfef1fbb187ad
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
trailer_vote-media_types (2.
|
|
5
|
-
media_types (>= 0.6.0, < 1)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
ansi (1.5.0)
|
|
11
|
-
awesome_print (1.8.0)
|
|
12
|
-
builder (3.2.4)
|
|
13
|
-
docile (1.3.2)
|
|
14
|
-
json (2.3.0)
|
|
15
|
-
media_types (0.6.2)
|
|
16
|
-
minitest (5.
|
|
17
|
-
minitest-ci (3.4.0)
|
|
18
|
-
minitest (>= 5.0.6)
|
|
19
|
-
minitest-reporters (1.4.2)
|
|
20
|
-
ansi
|
|
21
|
-
builder
|
|
22
|
-
minitest (>= 5.0)
|
|
23
|
-
ruby-progressbar
|
|
24
|
-
oj (3.10.0)
|
|
25
|
-
rake (13.0.1)
|
|
26
|
-
ruby-progressbar (1.10.1)
|
|
27
|
-
simplecov (0.17.1)
|
|
28
|
-
docile (~> 1.1)
|
|
29
|
-
json (>= 1.8, < 3)
|
|
30
|
-
simplecov-html (~> 0.10.0)
|
|
31
|
-
simplecov-html (0.10.2)
|
|
32
|
-
trailer_vote-fixtures (1.
|
|
33
|
-
|
|
34
|
-
PLATFORMS
|
|
35
|
-
ruby
|
|
36
|
-
x64-mingw32
|
|
37
|
-
|
|
38
|
-
DEPENDENCIES
|
|
39
|
-
awesome_print (~> 1.8)
|
|
40
|
-
bundler (~> 2.0)
|
|
41
|
-
minitest (~> 5.0)
|
|
42
|
-
minitest-ci (~> 3.4)
|
|
43
|
-
minitest-reporters (~> 1.3)
|
|
44
|
-
oj (~> 3.6)
|
|
45
|
-
rake (~> 13.0)
|
|
46
|
-
simplecov (~> 0.16)
|
|
47
|
-
trailer_vote-fixtures (~> 1.
|
|
48
|
-
trailer_vote-media_types!
|
|
49
|
-
|
|
50
|
-
BUNDLED WITH
|
|
51
|
-
2.1.0
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
trailer_vote-media_types (2.3.0)
|
|
5
|
+
media_types (>= 0.6.0, < 1)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
ansi (1.5.0)
|
|
11
|
+
awesome_print (1.8.0)
|
|
12
|
+
builder (3.2.4)
|
|
13
|
+
docile (1.3.2)
|
|
14
|
+
json (2.3.0)
|
|
15
|
+
media_types (0.6.2)
|
|
16
|
+
minitest (5.14.0)
|
|
17
|
+
minitest-ci (3.4.0)
|
|
18
|
+
minitest (>= 5.0.6)
|
|
19
|
+
minitest-reporters (1.4.2)
|
|
20
|
+
ansi
|
|
21
|
+
builder
|
|
22
|
+
minitest (>= 5.0)
|
|
23
|
+
ruby-progressbar
|
|
24
|
+
oj (3.10.0)
|
|
25
|
+
rake (13.0.1)
|
|
26
|
+
ruby-progressbar (1.10.1)
|
|
27
|
+
simplecov (0.17.1)
|
|
28
|
+
docile (~> 1.1)
|
|
29
|
+
json (>= 1.8, < 3)
|
|
30
|
+
simplecov-html (~> 0.10.0)
|
|
31
|
+
simplecov-html (0.10.2)
|
|
32
|
+
trailer_vote-fixtures (1.16.0)
|
|
33
|
+
|
|
34
|
+
PLATFORMS
|
|
35
|
+
ruby
|
|
36
|
+
x64-mingw32
|
|
37
|
+
|
|
38
|
+
DEPENDENCIES
|
|
39
|
+
awesome_print (~> 1.8)
|
|
40
|
+
bundler (~> 2.0)
|
|
41
|
+
minitest (~> 5.0)
|
|
42
|
+
minitest-ci (~> 3.4)
|
|
43
|
+
minitest-reporters (~> 1.3)
|
|
44
|
+
oj (~> 3.6)
|
|
45
|
+
rake (~> 13.0)
|
|
46
|
+
simplecov (~> 0.16)
|
|
47
|
+
trailer_vote-fixtures (~> 1.16.0)
|
|
48
|
+
trailer_vote-media_types!
|
|
49
|
+
|
|
50
|
+
BUNDLED WITH
|
|
51
|
+
2.1.0
|
|
@@ -1,160 +1,219 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative 'base_text'
|
|
4
|
-
require_relative 'types/http_url'
|
|
5
|
-
require_relative 'types/iso8601'
|
|
6
|
-
require_relative 'types/boolean'
|
|
7
|
-
require_relative 'types/vote_value'
|
|
8
|
-
|
|
9
|
-
module TrailerVote
|
|
10
|
-
module MediaTypes
|
|
11
|
-
##
|
|
12
|
-
# Media Types for Trivial Push Campaign
|
|
13
|
-
#
|
|
14
|
-
# The trivial push campaign is used to schedule a local push notification at a specified time.
|
|
15
|
-
#
|
|
16
|
-
class PushTrivialCampaign < BaseText
|
|
17
|
-
media_type 'push_campaign_trivial', defaults: { suffix: :json, version: 5 }
|
|
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
|
-
link :product_asset
|
|
49
|
-
link :action
|
|
50
|
-
attribute :schedule_at, Types::Iso8601
|
|
51
|
-
attribute :translations, ::Hash
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
push_creation_base_v4 = ::MediaTypes::Scheme.new do
|
|
55
|
-
link :product, optional: true
|
|
56
|
-
link :product_asset, optional: true
|
|
57
|
-
link :action
|
|
58
|
-
link :rich_media, optional: true
|
|
59
|
-
attribute :schedule_at, Types::Iso8601
|
|
60
|
-
attribute :translations, ::Hash
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
validations do
|
|
64
|
-
|
|
65
|
-
version 5 do
|
|
66
|
-
attribute :push_campaign_trivial do
|
|
67
|
-
link :action
|
|
68
|
-
link :self
|
|
69
|
-
link :rich_media, optional: true
|
|
70
|
-
attribute :message, String
|
|
71
|
-
attribute :schedule_at, Types::Iso8601
|
|
72
|
-
attribute :published_at, Types::Iso8601
|
|
73
|
-
attribute :archived_at, Types::Iso8601
|
|
74
|
-
merge filters
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
view 'create' do
|
|
78
|
-
attribute :push_campaign_trivial do
|
|
79
|
-
merge push_creation_base_v4
|
|
80
|
-
attribute :published_at, Types::Iso8601
|
|
81
|
-
attribute :archived_at, Types::Iso8601
|
|
82
|
-
merge filters_creation
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'base_text'
|
|
4
|
+
require_relative 'types/http_url'
|
|
5
|
+
require_relative 'types/iso8601'
|
|
6
|
+
require_relative 'types/boolean'
|
|
7
|
+
require_relative 'types/vote_value'
|
|
8
|
+
|
|
9
|
+
module TrailerVote
|
|
10
|
+
module MediaTypes
|
|
11
|
+
##
|
|
12
|
+
# Media Types for Trivial Push Campaign
|
|
13
|
+
#
|
|
14
|
+
# The trivial push campaign is used to schedule a local push notification at a specified time.
|
|
15
|
+
#
|
|
16
|
+
class PushTrivialCampaign < BaseText
|
|
17
|
+
media_type 'push_campaign_trivial', defaults: { suffix: :json, version: 5 }
|
|
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
|
+
link :product_asset
|
|
49
|
+
link :action
|
|
50
|
+
attribute :schedule_at, Types::Iso8601
|
|
51
|
+
attribute :translations, ::Hash
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
push_creation_base_v4 = ::MediaTypes::Scheme.new do
|
|
55
|
+
link :product, optional: true
|
|
56
|
+
link :product_asset, optional: true
|
|
57
|
+
link :action
|
|
58
|
+
link :rich_media, optional: true
|
|
59
|
+
attribute :schedule_at, Types::Iso8601
|
|
60
|
+
attribute :translations, ::Hash
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
validations do
|
|
64
|
+
|
|
65
|
+
version 5 do
|
|
66
|
+
attribute :push_campaign_trivial do
|
|
67
|
+
link :action
|
|
68
|
+
link :self
|
|
69
|
+
link :rich_media, optional: true
|
|
70
|
+
attribute :message, String
|
|
71
|
+
attribute :schedule_at, Types::Iso8601
|
|
72
|
+
attribute :published_at, AllowNil(Types::Iso8601)
|
|
73
|
+
attribute :archived_at, AllowNil(Types::Iso8601)
|
|
74
|
+
merge filters
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
view 'create' do
|
|
78
|
+
attribute :push_campaign_trivial do
|
|
79
|
+
merge push_creation_base_v4
|
|
80
|
+
attribute :published_at, AllowNil(Types::Iso8601)
|
|
81
|
+
attribute :archived_at, AllowNil(Types::Iso8601)
|
|
82
|
+
merge filters_creation
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
view 'raw' do
|
|
87
|
+
attribute :push_campaign_trivial do
|
|
88
|
+
link :action
|
|
89
|
+
link :self
|
|
90
|
+
link :rich_media, optional: true
|
|
91
|
+
link :product, optional: true
|
|
92
|
+
link :product_asset, optional: true
|
|
93
|
+
attribute :translations, ::Hash
|
|
94
|
+
attribute :schedule_at, Types::Iso8601
|
|
95
|
+
attribute :published_at, AllowNil(Types::Iso8601)
|
|
96
|
+
attribute :archived_at, AllowNil(Types::Iso8601)
|
|
97
|
+
merge filters
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
version 4 do
|
|
103
|
+
attribute :push_campaign_trivial do
|
|
104
|
+
link :action
|
|
105
|
+
link :self
|
|
106
|
+
link :rich_media, optional: true
|
|
107
|
+
attribute :message, String
|
|
108
|
+
attribute :schedule_at, Types::Iso8601
|
|
109
|
+
merge filters
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
view 'create' do
|
|
113
|
+
attribute :push_campaign_trivial do
|
|
114
|
+
merge push_creation_base_v4
|
|
115
|
+
merge filters_creation
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
view 'raw' do
|
|
120
|
+
attribute :push_campaign_trivial do
|
|
121
|
+
link :action
|
|
122
|
+
link :self
|
|
123
|
+
link :rich_media, optional: true
|
|
124
|
+
link :product, optional: true
|
|
125
|
+
link :product_asset, optional: true
|
|
126
|
+
attribute :translations, ::Hash
|
|
127
|
+
attribute :schedule_at, Types::Iso8601
|
|
128
|
+
merge filters
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
version 3 do
|
|
134
|
+
attribute :push_campaign_trivial do
|
|
135
|
+
link :action
|
|
136
|
+
link :self
|
|
137
|
+
attribute :message, String
|
|
138
|
+
attribute :schedule_at, Types::Iso8601
|
|
139
|
+
merge filters
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
view 'create' do
|
|
143
|
+
attribute :push_campaign_trivial do
|
|
144
|
+
merge push_creation_base
|
|
145
|
+
merge filters_creation
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
view 'raw' do
|
|
150
|
+
attribute :push_campaign_trivial do
|
|
151
|
+
link :action
|
|
152
|
+
link :self
|
|
153
|
+
link :product_asset, optional: true
|
|
154
|
+
attribute :translations, ::Hash
|
|
155
|
+
attribute :schedule_at, Types::Iso8601
|
|
156
|
+
merge filters
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
version 2 do
|
|
162
|
+
attribute :push_campaign_trivial do
|
|
163
|
+
link :action
|
|
164
|
+
attribute :message, String
|
|
165
|
+
attribute :schedule_at, Types::Iso8601
|
|
166
|
+
merge filters
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
view 'create' do
|
|
170
|
+
attribute :push_campaign_trivial do
|
|
171
|
+
merge push_creation_base
|
|
172
|
+
merge filters_creation
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
view 'raw' do
|
|
177
|
+
attribute :push_campaign_trivial do
|
|
178
|
+
link :action
|
|
179
|
+
link :product_asset, optional: true
|
|
180
|
+
attribute :translations, ::Hash
|
|
181
|
+
attribute :schedule_at, Types::Iso8601
|
|
182
|
+
merge filters
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
version 1 do
|
|
188
|
+
attribute :push_campaign_trivial do
|
|
189
|
+
link :action
|
|
190
|
+
attribute :message, String
|
|
191
|
+
attribute :schedule_at, Types::Iso8601
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
view 'create' do
|
|
195
|
+
attribute :push_campaign_trivial do
|
|
196
|
+
merge push_creation_base
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
view 'raw' do
|
|
201
|
+
attribute :push_campaign_trivial do
|
|
202
|
+
link :action
|
|
203
|
+
link :product_asset, optional: true
|
|
204
|
+
attribute :translations, ::Hash
|
|
205
|
+
attribute :schedule_at, Types::Iso8601
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|
|
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
|
+
end
|
|
218
|
+
end
|
|
219
|
+
end
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative 'base_text'
|
|
4
|
-
require_relative 'types/http_url'
|
|
5
|
-
require_relative 'types/local_time'
|
|
6
|
-
require_relative 'types/iso8601'
|
|
7
|
-
|
|
8
|
-
module TrailerVote
|
|
9
|
-
module MediaTypes
|
|
10
|
-
##
|
|
11
|
-
# Media Types for Release Push Campaign
|
|
12
|
-
#
|
|
13
|
-
# The release push campaign is used to show a local push notification upon product release.
|
|
14
|
-
#
|
|
15
|
-
class ReleasePushCampaign < BaseText
|
|
16
|
-
media_type 'release_push_campaign', defaults: { suffix: :json, version: 2 }
|
|
17
|
-
|
|
18
|
-
validations do
|
|
19
|
-
version 2 do
|
|
20
|
-
attribute :release_push_campaign do
|
|
21
|
-
attribute :message, String
|
|
22
|
-
attribute :dnd_start, Types::LocalTime
|
|
23
|
-
attribute :dnd_end, Types::LocalTime
|
|
24
|
-
attribute :published_at, Types::Iso8601
|
|
25
|
-
attribute :archived_at, Types::Iso8601
|
|
26
|
-
|
|
27
|
-
link :action
|
|
28
|
-
link :self
|
|
29
|
-
link :rich_media, optional: true
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
view 'create' do
|
|
33
|
-
attribute :release_push_campaign do
|
|
34
|
-
attribute :translations, ::Hash
|
|
35
|
-
attribute :dnd_start, Types::LocalTime
|
|
36
|
-
attribute :dnd_end, Types::LocalTime
|
|
37
|
-
|
|
38
|
-
link :product
|
|
39
|
-
link :action
|
|
40
|
-
link :rich_media, optional: true
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
version 1 do
|
|
46
|
-
attribute :release_push_campaign do
|
|
47
|
-
attribute :message, String
|
|
48
|
-
attribute :dnd_start, Types::LocalTime
|
|
49
|
-
attribute :dnd_end, Types::LocalTime
|
|
50
|
-
|
|
51
|
-
link :action
|
|
52
|
-
link :self
|
|
53
|
-
link :rich_media, optional: true
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
view 'create' do
|
|
57
|
-
attribute :release_push_campaign do
|
|
58
|
-
attribute :translations, ::Hash
|
|
59
|
-
attribute :dnd_start, Types::LocalTime
|
|
60
|
-
attribute :dnd_end, Types::LocalTime
|
|
61
|
-
|
|
62
|
-
link :product
|
|
63
|
-
link :action
|
|
64
|
-
link :rich_media, optional: true
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
registrations :release_push_campaign do
|
|
71
|
-
view 'create', :create_release_push_campaign
|
|
72
|
-
|
|
73
|
-
versions 1,2
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'base_text'
|
|
4
|
+
require_relative 'types/http_url'
|
|
5
|
+
require_relative 'types/local_time'
|
|
6
|
+
require_relative 'types/iso8601'
|
|
7
|
+
|
|
8
|
+
module TrailerVote
|
|
9
|
+
module MediaTypes
|
|
10
|
+
##
|
|
11
|
+
# Media Types for Release Push Campaign
|
|
12
|
+
#
|
|
13
|
+
# The release push campaign is used to show a local push notification upon product release.
|
|
14
|
+
#
|
|
15
|
+
class ReleasePushCampaign < BaseText
|
|
16
|
+
media_type 'release_push_campaign', defaults: { suffix: :json, version: 2 }
|
|
17
|
+
|
|
18
|
+
validations do
|
|
19
|
+
version 2 do
|
|
20
|
+
attribute :release_push_campaign do
|
|
21
|
+
attribute :message, String
|
|
22
|
+
attribute :dnd_start, Types::LocalTime
|
|
23
|
+
attribute :dnd_end, Types::LocalTime
|
|
24
|
+
attribute :published_at, AllowNil(Types::Iso8601)
|
|
25
|
+
attribute :archived_at, AllowNil(Types::Iso8601)
|
|
26
|
+
|
|
27
|
+
link :action
|
|
28
|
+
link :self
|
|
29
|
+
link :rich_media, optional: true
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
view 'create' do
|
|
33
|
+
attribute :release_push_campaign do
|
|
34
|
+
attribute :translations, ::Hash
|
|
35
|
+
attribute :dnd_start, Types::LocalTime
|
|
36
|
+
attribute :dnd_end, Types::LocalTime
|
|
37
|
+
|
|
38
|
+
link :product
|
|
39
|
+
link :action
|
|
40
|
+
link :rich_media, optional: true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
version 1 do
|
|
46
|
+
attribute :release_push_campaign do
|
|
47
|
+
attribute :message, String
|
|
48
|
+
attribute :dnd_start, Types::LocalTime
|
|
49
|
+
attribute :dnd_end, Types::LocalTime
|
|
50
|
+
|
|
51
|
+
link :action
|
|
52
|
+
link :self
|
|
53
|
+
link :rich_media, optional: true
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
view 'create' do
|
|
57
|
+
attribute :release_push_campaign do
|
|
58
|
+
attribute :translations, ::Hash
|
|
59
|
+
attribute :dnd_start, Types::LocalTime
|
|
60
|
+
attribute :dnd_end, Types::LocalTime
|
|
61
|
+
|
|
62
|
+
link :product
|
|
63
|
+
link :action
|
|
64
|
+
link :rich_media, optional: true
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
registrations :release_push_campaign do
|
|
71
|
+
view 'create', :create_release_push_campaign
|
|
72
|
+
|
|
73
|
+
versions 1,2
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module TrailerVote
|
|
4
|
-
module MediaTypes
|
|
5
|
-
VERSION = '2.
|
|
6
|
-
end
|
|
7
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module TrailerVote
|
|
4
|
+
module MediaTypes
|
|
5
|
+
VERSION = '2.3.0'
|
|
6
|
+
end
|
|
7
|
+
end
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
lib = File.expand_path('lib', __dir__)
|
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
-
require 'trailer_vote/media_types/version'
|
|
6
|
-
|
|
7
|
-
Gem::Specification.new do |spec|
|
|
8
|
-
spec.name = 'trailer_vote-media_types'
|
|
9
|
-
spec.version = TrailerVote::MediaTypes::VERSION
|
|
10
|
-
spec.authors = ['Derk-Jan Karrenbeld']
|
|
11
|
-
spec.email = ['dj@trailervote.com']
|
|
12
|
-
spec.summary = 'Holds the defined media types for the TrailerVote ecosystem'
|
|
13
|
-
spec.homepage = 'https://github.com/TrailerVote/trailervote-media-types'
|
|
14
|
-
|
|
15
|
-
# noinspection RubyStringKeysInHashInspection
|
|
16
|
-
spec.metadata = {
|
|
17
|
-
'bug_tracker_uri' => 'https://github.com/TrailerVote/trailervote-media-types/issues',
|
|
18
|
-
'changelog_uri' => 'https://github.com/TrailerVote/trailervote-media-types/blob/master/ruby/CHANGELOG.md',
|
|
19
|
-
'documentation_uri' => 'https://www.rubydoc.info/gems/trailer_vote-media_types',
|
|
20
|
-
'homepage_uri' => 'https://github.com/TrailerVote/trailervote-media-types',
|
|
21
|
-
'source_code_uri' => 'https://github.com/TrailerVote/trailervote-media-types/blob/master/ruby',
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
25
|
-
f.match(%r{^(test|spec|features)/})
|
|
26
|
-
end
|
|
27
|
-
spec.bindir = 'exe'
|
|
28
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
29
|
-
spec.require_paths = ['lib']
|
|
30
|
-
spec.required_ruby_version = '>= 2.5.1'
|
|
31
|
-
|
|
32
|
-
spec.add_runtime_dependency 'media_types', '>= 0.6.0', '< 1'
|
|
33
|
-
|
|
34
|
-
spec.add_development_dependency 'awesome_print', '~> 1.8'
|
|
35
|
-
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
36
|
-
spec.add_development_dependency 'minitest', '~> 5.0'
|
|
37
|
-
spec.add_development_dependency 'minitest-ci', '~> 3.4'
|
|
38
|
-
spec.add_development_dependency 'minitest-reporters', '~> 1.3'
|
|
39
|
-
spec.add_development_dependency 'oj', '~> 3.6'
|
|
40
|
-
spec.add_development_dependency 'rake', '~> 13.0'
|
|
41
|
-
spec.add_development_dependency 'simplecov', '~> 0.16'
|
|
42
|
-
spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.
|
|
43
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
+
require 'trailer_vote/media_types/version'
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = 'trailer_vote-media_types'
|
|
9
|
+
spec.version = TrailerVote::MediaTypes::VERSION
|
|
10
|
+
spec.authors = ['Derk-Jan Karrenbeld']
|
|
11
|
+
spec.email = ['dj@trailervote.com']
|
|
12
|
+
spec.summary = 'Holds the defined media types for the TrailerVote ecosystem'
|
|
13
|
+
spec.homepage = 'https://github.com/TrailerVote/trailervote-media-types'
|
|
14
|
+
|
|
15
|
+
# noinspection RubyStringKeysInHashInspection
|
|
16
|
+
spec.metadata = {
|
|
17
|
+
'bug_tracker_uri' => 'https://github.com/TrailerVote/trailervote-media-types/issues',
|
|
18
|
+
'changelog_uri' => 'https://github.com/TrailerVote/trailervote-media-types/blob/master/ruby/CHANGELOG.md',
|
|
19
|
+
'documentation_uri' => 'https://www.rubydoc.info/gems/trailer_vote-media_types',
|
|
20
|
+
'homepage_uri' => 'https://github.com/TrailerVote/trailervote-media-types',
|
|
21
|
+
'source_code_uri' => 'https://github.com/TrailerVote/trailervote-media-types/blob/master/ruby',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
25
|
+
f.match(%r{^(test|spec|features)/})
|
|
26
|
+
end
|
|
27
|
+
spec.bindir = 'exe'
|
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
29
|
+
spec.require_paths = ['lib']
|
|
30
|
+
spec.required_ruby_version = '>= 2.5.1'
|
|
31
|
+
|
|
32
|
+
spec.add_runtime_dependency 'media_types', '>= 0.6.0', '< 1'
|
|
33
|
+
|
|
34
|
+
spec.add_development_dependency 'awesome_print', '~> 1.8'
|
|
35
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
|
36
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
|
37
|
+
spec.add_development_dependency 'minitest-ci', '~> 3.4'
|
|
38
|
+
spec.add_development_dependency 'minitest-reporters', '~> 1.3'
|
|
39
|
+
spec.add_development_dependency 'oj', '~> 3.6'
|
|
40
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
41
|
+
spec.add_development_dependency 'simplecov', '~> 0.16'
|
|
42
|
+
spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.16.0'
|
|
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: 2.
|
|
4
|
+
version: 2.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: 2020-01-
|
|
11
|
+
date: 2020-01-13 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.
|
|
151
|
+
version: 1.16.0
|
|
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.
|
|
158
|
+
version: 1.16.0
|
|
159
159
|
description:
|
|
160
160
|
email:
|
|
161
161
|
- dj@trailervote.com
|