trailer_vote-media_types 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/trailer_vote/media_types/product_image.rb +28 -23
- data/lib/trailer_vote/media_types/product_video.rb +3 -0
- data/lib/trailer_vote/media_types/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c3ec0a377a90a1b13a2988b34d20bb89ce8d33c
|
4
|
+
data.tar.gz: 722b7f9ebfc0e9b069ca8a1479513bf40550c757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 832f468b54a653765acffda907007fbbfe4b3789d9f7a9318f1dba3b59229a12375b7c894c72f23db71bd4ab1effc6af3d5ec701a185ea416a50926cba51bc13
|
7
|
+
data.tar.gz: c6063d87b3f0e000ddc2656a5680b7c107a7b3b94fa8ae48a75b75918ca3cb75891614f969ac3c2a078a0ac20403b957af6d6b57d7f99cffdca2b60f8e4d7b93
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -14,38 +14,41 @@ module TrailerVote
|
|
14
14
|
media_type 'product.image', defaults: { suffix: :json, version: 1 }
|
15
15
|
|
16
16
|
validations do
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
attribute :expires_at, AllowNil(Types::Iso8601), optional: true
|
22
|
-
end
|
17
|
+
version_1_creation = ::MediaTypes::Scheme.new do
|
18
|
+
attribute :identifier, String
|
19
|
+
attribute :source_url, AnyOf(Types::HttpUrl, String)
|
20
|
+
attribute :expires_at, AllowNil(Types::Iso8601), optional: true
|
23
21
|
|
24
|
-
|
25
|
-
|
22
|
+
attribute :content_language, String, optional: true
|
23
|
+
attribute :content_region, String, optional: true
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
version_1_base = ::MediaTypes::Scheme.new do
|
27
|
+
attribute :updated_at, Types::Iso8601
|
28
28
|
|
29
|
-
|
30
|
-
attribute :processed, Types::Boolean
|
31
|
-
attribute :type, Types::ProductImageType
|
29
|
+
merge version_1_creation
|
32
30
|
|
33
|
-
|
34
|
-
|
31
|
+
attribute :data do
|
32
|
+
attribute :processed, Types::Boolean
|
33
|
+
attribute :type, Types::ProductImageType
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
end
|
35
|
+
not_strict
|
36
|
+
end
|
39
37
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
38
|
+
link :self do
|
39
|
+
attribute :type, Types::ProductImageType
|
40
|
+
end
|
41
|
+
|
42
|
+
%i[original thumbnail xlarge large medium small xsmall].each do |size|
|
43
|
+
link size, allow_nil: true, optional: true do
|
44
|
+
attribute :content_digest, String
|
45
|
+
attribute :width, Numeric
|
46
|
+
attribute :height, Numeric
|
46
47
|
end
|
47
48
|
end
|
49
|
+
end
|
48
50
|
|
51
|
+
version 1 do
|
49
52
|
attribute :product_image do
|
50
53
|
merge version_1_base
|
51
54
|
end
|
@@ -83,6 +86,8 @@ module TrailerVote
|
|
83
86
|
view 'index', :product_image_urls
|
84
87
|
view 'collection', :product_images
|
85
88
|
|
89
|
+
versions 1
|
90
|
+
|
86
91
|
type_alias 'product-image'
|
87
92
|
type_alias 'image'
|
88
93
|
end
|
@@ -20,6 +20,9 @@ module TrailerVote
|
|
20
20
|
attribute :identifier, String
|
21
21
|
attribute :source_url, AnyOf(Types::HttpUrl, String)
|
22
22
|
attribute :expires_at, AllowNil(Types::Iso8601), optional: true
|
23
|
+
|
24
|
+
attribute :content_language, String, optional: true
|
25
|
+
attribute :content_region, String, optional: true
|
23
26
|
end
|
24
27
|
|
25
28
|
version_1_base = ::MediaTypes::Scheme.new do
|
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.7.
|
4
|
+
version: 0.7.5
|
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: 2018-10-
|
11
|
+
date: 2018-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: media_types
|