trailer_vote-media_types 0.9.3 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +12 -12
  3. data/.rubocop.yml +29 -29
  4. data/.travis.yml +19 -19
  5. data/CHANGELOG.md +82 -82
  6. data/Gemfile +6 -6
  7. data/Gemfile.lock +51 -51
  8. data/README.md +118 -118
  9. data/Rakefile +12 -12
  10. data/bin/console +16 -16
  11. data/bin/setup +8 -8
  12. data/lib/trailer_vote/media_types.rb +35 -33
  13. data/lib/trailer_vote/media_types/audio_fragment.rb +108 -108
  14. data/lib/trailer_vote/media_types/base_text.rb +22 -22
  15. data/lib/trailer_vote/media_types/carousel.rb +42 -42
  16. data/lib/trailer_vote/media_types/client_configuration.rb +35 -35
  17. data/lib/trailer_vote/media_types/configuration.rb +82 -61
  18. data/lib/trailer_vote/media_types/errors.rb +31 -31
  19. data/lib/trailer_vote/media_types/feedback.rb +50 -50
  20. data/lib/trailer_vote/media_types/feedback_listing.rb +49 -49
  21. data/lib/trailer_vote/media_types/fingerprint_binary.rb +67 -67
  22. data/lib/trailer_vote/media_types/interactive_player.rb +33 -33
  23. data/lib/trailer_vote/media_types/issue.rb +64 -64
  24. data/lib/trailer_vote/media_types/partials/image_links.rb +30 -30
  25. data/lib/trailer_vote/media_types/persona.rb +38 -38
  26. data/lib/trailer_vote/media_types/place.rb +106 -106
  27. data/lib/trailer_vote/media_types/product.rb +191 -191
  28. data/lib/trailer_vote/media_types/product_image.rb +96 -96
  29. data/lib/trailer_vote/media_types/product_lookup.rb +37 -37
  30. data/lib/trailer_vote/media_types/product_place_link.rb +36 -36
  31. data/lib/trailer_vote/media_types/product_video.rb +100 -100
  32. data/lib/trailer_vote/media_types/products_listing.rb +43 -43
  33. data/lib/trailer_vote/media_types/push_manifest.rb +33 -0
  34. data/lib/trailer_vote/media_types/push_trivial_campaign.rb +32 -0
  35. data/lib/trailer_vote/media_types/sentiment_feedback.rb +100 -100
  36. data/lib/trailer_vote/media_types/types/boolean.rb +15 -15
  37. data/lib/trailer_vote/media_types/types/formatted_url.rb +51 -51
  38. data/lib/trailer_vote/media_types/types/http_url.rb +23 -23
  39. data/lib/trailer_vote/media_types/types/influx_db_connection_url.rb +10 -10
  40. data/lib/trailer_vote/media_types/types/iso8601.rb +10 -10
  41. data/lib/trailer_vote/media_types/types/product_data_type.rb +15 -15
  42. data/lib/trailer_vote/media_types/types/product_image_type.rb +25 -25
  43. data/lib/trailer_vote/media_types/types/product_movie_handler.rb +16 -16
  44. data/lib/trailer_vote/media_types/types/product_movie_type.rb +17 -17
  45. data/lib/trailer_vote/media_types/types/uuid_v4.rb +10 -10
  46. data/lib/trailer_vote/media_types/types/vote_value.rb +17 -17
  47. data/lib/trailer_vote/media_types/version.rb +7 -7
  48. data/trailer_vote-media_types.gemspec +41 -41
  49. metadata +8 -5
@@ -1,23 +1,23 @@
1
- # frozen_string_literal: true
2
-
3
- module TrailerVote
4
- module MediaTypes
5
- module Types
6
- # noinspection RubyConstantNamingConvention
7
- #
8
- # https://mathiasbynens.be/demo/url-regex
9
- #
10
- # RFC compliant for http, https and ftp:
11
- # _^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})
12
- # (?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})
13
- # (?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.
14
- # (?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.
15
- # (?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?
16
- # (?:/[^\s]*)?$_iuS
17
- #
18
- # The one used here actually passes all valid urls, but just doesn't reject ALL invalid ones
19
- #
20
- HttpUrl = %r{^https?:\/\/[^\s\/$.?#].[^\s]*$} # rubocop:disable Naming/ConstantName
21
- end
22
- end
23
- end
1
+ # frozen_string_literal: true
2
+
3
+ module TrailerVote
4
+ module MediaTypes
5
+ module Types
6
+ # noinspection RubyConstantNamingConvention
7
+ #
8
+ # https://mathiasbynens.be/demo/url-regex
9
+ #
10
+ # RFC compliant for http, https and ftp:
11
+ # _^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})
12
+ # (?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})
13
+ # (?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.
14
+ # (?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.
15
+ # (?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?
16
+ # (?:/[^\s]*)?$_iuS
17
+ #
18
+ # The one used here actually passes all valid urls, but just doesn't reject ALL invalid ones
19
+ #
20
+ HttpUrl = %r{^https?:\/\/[^\s\/$.?#].[^\s]*$} # rubocop:disable Naming/ConstantName
21
+ end
22
+ end
23
+ end
@@ -1,10 +1,10 @@
1
- # frozen_string_literal: true
2
-
3
- module TrailerVote
4
- module MediaTypes
5
- module Types
6
- # noinspection RubyConstantNamingConvention
7
- InfluxDbConnectionUrl = %r{^https?:\/\/[^\s\/$.?#].[^\s]*$} # rubocop:disable Naming/ConstantName
8
- end
9
- end
10
- end
1
+ # frozen_string_literal: true
2
+
3
+ module TrailerVote
4
+ module MediaTypes
5
+ module Types
6
+ # noinspection RubyConstantNamingConvention
7
+ InfluxDbConnectionUrl = %r{^https?:\/\/[^\s\/$.?#].[^\s]*$} # rubocop:disable Naming/ConstantName
8
+ end
9
+ end
10
+ end
@@ -1,10 +1,10 @@
1
- # frozen_string_literal: true
2
-
3
- module TrailerVote
4
- module MediaTypes
5
- module Types
6
- # noinspection RubyConstantNamingConvention
7
- Iso8601 = /^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/ # rubocop:disable Naming/ConstantName
8
- end
9
- end
10
- end
1
+ # frozen_string_literal: true
2
+
3
+ module TrailerVote
4
+ module MediaTypes
5
+ module Types
6
+ # noinspection RubyConstantNamingConvention
7
+ Iso8601 = /^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/ # rubocop:disable Naming/ConstantName
8
+ end
9
+ end
10
+ end
@@ -1,15 +1,15 @@
1
- # frozen_string_literal: true
2
-
3
- require 'media_types'
4
-
5
- module TrailerVote
6
- module MediaTypes
7
- module Types
8
- # noinspection RubyConstantNamingConvention
9
- ProductDataType = ::MediaTypes::Scheme.AnyOf(
10
- 'movie',
11
- 'book'
12
- )
13
- end
14
- end
15
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'media_types'
4
+
5
+ module TrailerVote
6
+ module MediaTypes
7
+ module Types
8
+ # noinspection RubyConstantNamingConvention
9
+ ProductDataType = ::MediaTypes::Scheme.AnyOf(
10
+ 'movie',
11
+ 'book'
12
+ )
13
+ end
14
+ end
15
+ end
@@ -1,25 +1,25 @@
1
- # frozen_string_literal: true
2
-
3
- require 'media_types'
4
-
5
- module TrailerVote
6
- module MediaTypes
7
- module Types
8
- # noinspection RubyConstantNamingConvention
9
- ProductImageType = ::MediaTypes::Scheme.AnyOf(
10
- 'backdrop',
11
- 'poster'
12
- )
13
-
14
- # noinspection RubyConstantNamingConvention
15
- ProductImageTypeV1 = ::MediaTypes::Scheme.AnyOf(
16
- 'backdrop',
17
- 'poster',
18
- 'Poster',
19
- 'HeroMobileDynamic',
20
- 'PosterDynamic',
21
- 'HeroDesktopDynamic'
22
- )
23
- end
24
- end
25
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'media_types'
4
+
5
+ module TrailerVote
6
+ module MediaTypes
7
+ module Types
8
+ # noinspection RubyConstantNamingConvention
9
+ ProductImageType = ::MediaTypes::Scheme.AnyOf(
10
+ 'backdrop',
11
+ 'poster'
12
+ )
13
+
14
+ # noinspection RubyConstantNamingConvention
15
+ ProductImageTypeV1 = ::MediaTypes::Scheme.AnyOf(
16
+ 'backdrop',
17
+ 'poster',
18
+ 'Poster',
19
+ 'HeroMobileDynamic',
20
+ 'PosterDynamic',
21
+ 'HeroDesktopDynamic'
22
+ )
23
+ end
24
+ end
25
+ end
@@ -1,16 +1,16 @@
1
- # frozen_string_literal: true
2
-
3
- require 'media_types'
4
-
5
- module TrailerVote
6
- module MediaTypes
7
- module Types
8
- # noinspection RubyConstantNamingConvention
9
- ProductMovieHandler = ::MediaTypes::Scheme.AnyOf(
10
- 'youtube',
11
- 'vimeo',
12
- 'url'
13
- )
14
- end
15
- end
16
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'media_types'
4
+
5
+ module TrailerVote
6
+ module MediaTypes
7
+ module Types
8
+ # noinspection RubyConstantNamingConvention
9
+ ProductMovieHandler = ::MediaTypes::Scheme.AnyOf(
10
+ 'youtube',
11
+ 'vimeo',
12
+ 'url'
13
+ )
14
+ end
15
+ end
16
+ end
@@ -1,17 +1,17 @@
1
- # frozen_string_literal: true
2
-
3
- require 'media_types'
4
-
5
- module TrailerVote
6
- module MediaTypes
7
- module Types
8
- # noinspection RubyConstantNamingConvention
9
- ProductMovieType = ::MediaTypes::Scheme.AnyOf(
10
- 'Trailer',
11
- 'Teaser',
12
- 'Rewards',
13
- 'Advert'
14
- )
15
- end
16
- end
17
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'media_types'
4
+
5
+ module TrailerVote
6
+ module MediaTypes
7
+ module Types
8
+ # noinspection RubyConstantNamingConvention
9
+ ProductMovieType = ::MediaTypes::Scheme.AnyOf(
10
+ 'Trailer',
11
+ 'Teaser',
12
+ 'Rewards',
13
+ 'Advert'
14
+ )
15
+ end
16
+ end
17
+ end
@@ -1,10 +1,10 @@
1
- # frozen_string_literal: true
2
-
3
- module TrailerVote
4
- module MediaTypes
5
- module Types
6
- # noinspection RubyConstantNamingConvention
7
- UuidV4 = /[A-z0-9]{8}-[A-z0-9]{4}-4[A-z0-9]{3}-[A-z0-9]{4}-[A-z0-9]{12}/ # rubocop:disable Naming/ConstantName
8
- end
9
- end
10
- end
1
+ # frozen_string_literal: true
2
+
3
+ module TrailerVote
4
+ module MediaTypes
5
+ module Types
6
+ # noinspection RubyConstantNamingConvention
7
+ UuidV4 = /[A-z0-9]{8}-[A-z0-9]{4}-4[A-z0-9]{3}-[A-z0-9]{4}-[A-z0-9]{12}/ # rubocop:disable Naming/ConstantName
8
+ end
9
+ end
10
+ end
@@ -1,17 +1,17 @@
1
- # frozen_string_literal: true
2
-
3
- require 'media_types'
4
-
5
- module TrailerVote
6
- module MediaTypes
7
- module Types
8
- # noinspection RubyConstantNamingConvention
9
- VoteValue = ::MediaTypes::Scheme.AnyOf(
10
- 'positive',
11
- 'negative',
12
- 'neutral',
13
- 'skip'
14
- )
15
- end
16
- end
17
- end
1
+ # frozen_string_literal: true
2
+
3
+ require 'media_types'
4
+
5
+ module TrailerVote
6
+ module MediaTypes
7
+ module Types
8
+ # noinspection RubyConstantNamingConvention
9
+ VoteValue = ::MediaTypes::Scheme.AnyOf(
10
+ 'positive',
11
+ 'negative',
12
+ 'neutral',
13
+ 'skip'
14
+ )
15
+ end
16
+ end
17
+ end
@@ -1,7 +1,7 @@
1
- # frozen_string_literal: true
2
-
3
- module TrailerVote
4
- module MediaTypes
5
- VERSION = '0.9.3'
6
- end
7
- end
1
+ # frozen_string_literal: true
2
+
3
+ module TrailerVote
4
+ module MediaTypes
5
+ VERSION = '0.10.0'
6
+ end
7
+ end
@@ -1,41 +1,41 @@
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
-
14
- # noinspection RubyStringKeysInHashInspection
15
- spec.metadata = {
16
- 'bug_tracker_uri' => 'https://github.com/TrailerVote/trailervote-media-types/issues',
17
- 'changelog_uri' => 'https://github.com/TrailerVote/trailervote-media-types/blob/master/ruby/CHANGELOG.md',
18
- 'documentation_uri' => 'https://www.rubydoc.info/gems/trailer_vote-media_types',
19
- 'homepage_uri' => 'https://github.com/TrailerVote/trailervote-media-types',
20
- 'source_code_uri' => 'https://github.com/TrailerVote/trailervote-media-types/blob/master/ruby',
21
- }
22
-
23
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
- f.match(%r{^(test|spec|features)/})
25
- end
26
- spec.bindir = 'exe'
27
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
- spec.require_paths = ['lib']
29
-
30
- spec.add_runtime_dependency 'media_types', '>= 0.6.0', '< 1'
31
-
32
- spec.add_development_dependency 'awesome_print'
33
- spec.add_development_dependency 'bundler', '~> 1.16'
34
- spec.add_development_dependency 'minitest', '~> 5.0'
35
- spec.add_development_dependency 'minitest-ci', '~> 3.4'
36
- spec.add_development_dependency 'minitest-reporters', '~> 1.3'
37
- spec.add_development_dependency 'oj', '~> 3.6'
38
- spec.add_development_dependency 'rake', '~> 10.0'
39
- spec.add_development_dependency 'simplecov', '~> 0.16'
40
- spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.2'
41
- 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
+
14
+ # noinspection RubyStringKeysInHashInspection
15
+ spec.metadata = {
16
+ 'bug_tracker_uri' => 'https://github.com/TrailerVote/trailervote-media-types/issues',
17
+ 'changelog_uri' => 'https://github.com/TrailerVote/trailervote-media-types/blob/master/ruby/CHANGELOG.md',
18
+ 'documentation_uri' => 'https://www.rubydoc.info/gems/trailer_vote-media_types',
19
+ 'homepage_uri' => 'https://github.com/TrailerVote/trailervote-media-types',
20
+ 'source_code_uri' => 'https://github.com/TrailerVote/trailervote-media-types/blob/master/ruby',
21
+ }
22
+
23
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
+ f.match(%r{^(test|spec|features)/})
25
+ end
26
+ spec.bindir = 'exe'
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ['lib']
29
+
30
+ spec.add_runtime_dependency 'media_types', '>= 0.6.0', '< 1'
31
+
32
+ spec.add_development_dependency 'awesome_print'
33
+ spec.add_development_dependency 'bundler', '~> 1.16'
34
+ spec.add_development_dependency 'minitest', '~> 5.0'
35
+ spec.add_development_dependency 'minitest-ci', '~> 3.4'
36
+ spec.add_development_dependency 'minitest-reporters', '~> 1.3'
37
+ spec.add_development_dependency 'oj', '~> 3.6'
38
+ spec.add_development_dependency 'rake', '~> 10.0'
39
+ spec.add_development_dependency 'simplecov', '~> 0.16'
40
+ spec.add_development_dependency 'trailer_vote-fixtures', '~> 1.3'
41
+ 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: 0.9.3
4
+ version: 0.10.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-01-21 00:00:00.000000000 Z
11
+ date: 2019-03-05 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.2'
151
+ version: '1.3'
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.2'
158
+ version: '1.3'
159
159
  description:
160
160
  email:
161
161
  - dj@trailervote.com
@@ -194,6 +194,8 @@ 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_manifest.rb
198
+ - lib/trailer_vote/media_types/push_trivial_campaign.rb
197
199
  - lib/trailer_vote/media_types/sentiment_feedback.rb
198
200
  - lib/trailer_vote/media_types/types/boolean.rb
199
201
  - lib/trailer_vote/media_types/types/formatted_url.rb
@@ -231,7 +233,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
233
  - !ruby/object:Gem::Version
232
234
  version: '0'
233
235
  requirements: []
234
- rubygems_version: 3.0.1
236
+ rubyforge_project:
237
+ rubygems_version: 2.7.6
235
238
  signing_key:
236
239
  specification_version: 4
237
240
  summary: Holds the defined media types for the TrailerVote ecosystem