trailer_vote-media_types 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/trailer_vote/media_types/release_push_campaign.rb +50 -0
- data/lib/trailer_vote/media_types/types/local_time.rb +11 -0
- data/lib/trailer_vote/media_types/version.rb +1 -1
- data/lib/trailer_vote/media_types.rb +1 -0
- data/trailer_vote-media_types.gemspec +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c734df203781e4a611b8dd6dcdaf6a53322a21dd78a8cde07270a55d362ac75c
|
4
|
+
data.tar.gz: f591ffe87f12e085df113f026d9f262b4c8ff8bf2e114f776d3115ed4a16553d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b2103ca26f61f77ce748b12b05dd9568b5faf87cfe1f1bac0aabc03a44b2b437e703553c42ca805cd8a1793ef9f14ad14f001abe36a6ad584296ba168e8a1cc
|
7
|
+
data.tar.gz: 8caee29f6e86070ecc20e120ea878e756efefc2d9294a77eb7055b3da41aead3844f271c41884c36e8b6af527c799b86aa3510cfdce1adf0c29ad0d6cc2cb236
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
trailer_vote-media_types (1.
|
4
|
+
trailer_vote-media_types (1.7.0)
|
5
5
|
media_types (>= 0.6.0, < 1)
|
6
6
|
|
7
7
|
GEM
|
@@ -21,7 +21,7 @@ GEM
|
|
21
21
|
builder
|
22
22
|
minitest (>= 5.0)
|
23
23
|
ruby-progressbar
|
24
|
-
oj (3.
|
24
|
+
oj (3.10.0)
|
25
25
|
rake (13.0.1)
|
26
26
|
ruby-progressbar (1.10.1)
|
27
27
|
simplecov (0.17.1)
|
@@ -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.
|
32
|
+
trailer_vote-fixtures (1.12.0)
|
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.
|
47
|
+
trailer_vote-fixtures (~> 1.12.0)
|
48
48
|
trailer_vote-media_types!
|
49
49
|
|
50
50
|
BUNDLED WITH
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'base_text'
|
4
|
+
require_relative 'types/http_url'
|
5
|
+
require_relative 'types/local_time'
|
6
|
+
|
7
|
+
module TrailerVote
|
8
|
+
module MediaTypes
|
9
|
+
##
|
10
|
+
# Media Types for Release Push Campaign
|
11
|
+
#
|
12
|
+
# The release push campaign is used to show a local push notification upon product release.
|
13
|
+
#
|
14
|
+
class ReleasePushCampaign < BaseText
|
15
|
+
media_type 'release_push_campaign', defaults: { suffix: :json, version: 1 }
|
16
|
+
|
17
|
+
validations do
|
18
|
+
version 1 do
|
19
|
+
attribute :release_push_campaign do
|
20
|
+
attribute :message, String
|
21
|
+
attribute :dnd_start, Types::LocalTime
|
22
|
+
attribute :dnd_end, Types::LocalTime
|
23
|
+
|
24
|
+
link :action
|
25
|
+
link :self
|
26
|
+
link :rich_media, optional: true
|
27
|
+
end
|
28
|
+
|
29
|
+
view 'create' do
|
30
|
+
attribute :release_push_campaign do
|
31
|
+
attribute :translations, ::Hash
|
32
|
+
attribute :dnd_start, Types::LocalTime
|
33
|
+
attribute :dnd_end, Types::LocalTime
|
34
|
+
|
35
|
+
link :product
|
36
|
+
link :action
|
37
|
+
link :rich_media, optional: true
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
registrations :release_push_campaign do
|
44
|
+
view 'create', :create_release_push_campaign
|
45
|
+
|
46
|
+
versions 1
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module TrailerVote
|
4
|
+
module MediaTypes
|
5
|
+
module Types
|
6
|
+
# noinspection RubyConstantNamingConvention
|
7
|
+
# |60 seconds notation needed to support leap second
|
8
|
+
LocalTime = /^(0[0-9]|1[0-9]|2[0-3]|[0-9]):([0-5][0-9]):([0-5][0-9]|60)$/ # rubocop:disable Naming/ConstantName, Style/MutableConstant
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -29,6 +29,7 @@ require_relative './media_types/push_consent'
|
|
29
29
|
require_relative './media_types/push_token_index'
|
30
30
|
require_relative './media_types/push_token_android'
|
31
31
|
require_relative './media_types/push_token_ios'
|
32
|
+
require_relative './media_types/release_push_campaign'
|
32
33
|
|
33
34
|
module TrailerVote
|
34
35
|
module MediaTypes
|
@@ -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.
|
42
|
+
spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.12.0'
|
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.
|
4
|
+
version: 1.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: 2019-
|
11
|
+
date: 2019-12-03 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.12.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.12.0
|
159
159
|
description:
|
160
160
|
email:
|
161
161
|
- dj@trailervote.com
|
@@ -200,12 +200,14 @@ files:
|
|
200
200
|
- lib/trailer_vote/media_types/push_token_index.rb
|
201
201
|
- lib/trailer_vote/media_types/push_token_ios.rb
|
202
202
|
- lib/trailer_vote/media_types/push_trivial_campaign.rb
|
203
|
+
- lib/trailer_vote/media_types/release_push_campaign.rb
|
203
204
|
- lib/trailer_vote/media_types/sentiment_feedback.rb
|
204
205
|
- lib/trailer_vote/media_types/types/boolean.rb
|
205
206
|
- lib/trailer_vote/media_types/types/formatted_url.rb
|
206
207
|
- lib/trailer_vote/media_types/types/http_url.rb
|
207
208
|
- lib/trailer_vote/media_types/types/influx_db_connection_url.rb
|
208
209
|
- lib/trailer_vote/media_types/types/iso8601.rb
|
210
|
+
- lib/trailer_vote/media_types/types/local_time.rb
|
209
211
|
- lib/trailer_vote/media_types/types/product_data_type.rb
|
210
212
|
- lib/trailer_vote/media_types/types/product_image_type.rb
|
211
213
|
- lib/trailer_vote/media_types/types/product_movie_handler.rb
|