zernio-sdk 0.0.611 → 0.0.612
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 68cbc1db308c31f1fc6f334eae3247f3464671bf9d95f0424ba794d5bcc11922
|
|
4
|
+
data.tar.gz: 4c6e314ff406f2036030870fb7c1b96db00a8b6a59ecc63e43200cb40544be3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0700505ea409e1bd3186310df1b47f057c62740602d5959c99fe9940aaa52ade0d4abb942f17bc5dee54b9d075b2569206f0e39f83a031c24364edb936c25d2
|
|
7
|
+
data.tar.gz: aa781af4b307235a2c0c06a22ee0ec38317d3fe8e520cd0174ef74c86752133685ef567dc1dd6013f8571943e6d113524d30fbc73e1b45f4daf0784d3a7ab5a1
|
|
@@ -135,7 +135,7 @@ module Zernio
|
|
|
135
135
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
136
136
|
return false if @filename.nil?
|
|
137
137
|
return false if @content_type.nil?
|
|
138
|
-
content_type_validator = EnumAttributeValidator.new('String', ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/gif", "video/mp4", "video/mpeg", "video/quicktime", "video/avi", "video/x-msvideo", "video/webm", "video/x-m4v", "application/pdf"])
|
|
138
|
+
content_type_validator = EnumAttributeValidator.new('String', ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/gif", "video/mp4", "video/mpeg", "video/quicktime", "video/avi", "video/x-msvideo", "video/webm", "video/x-m4v", "application/pdf", "audio/mpeg", "audio/mp4", "audio/aac", "audio/ogg", "audio/wav", "audio/webm", "audio/x-m4a"])
|
|
139
139
|
return false unless content_type_validator.valid?(@content_type)
|
|
140
140
|
true
|
|
141
141
|
end
|
|
@@ -153,7 +153,7 @@ module Zernio
|
|
|
153
153
|
# Custom attribute writer method checking allowed values (enum).
|
|
154
154
|
# @param [Object] content_type Object to be assigned
|
|
155
155
|
def content_type=(content_type)
|
|
156
|
-
validator = EnumAttributeValidator.new('String', ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/gif", "video/mp4", "video/mpeg", "video/quicktime", "video/avi", "video/x-msvideo", "video/webm", "video/x-m4v", "application/pdf"])
|
|
156
|
+
validator = EnumAttributeValidator.new('String', ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/gif", "video/mp4", "video/mpeg", "video/quicktime", "video/avi", "video/x-msvideo", "video/webm", "video/x-m4v", "application/pdf", "audio/mpeg", "audio/mp4", "audio/aac", "audio/ogg", "audio/wav", "audio/webm", "audio/x-m4a"])
|
|
157
157
|
unless validator.valid?(content_type)
|
|
158
158
|
fail ArgumentError, "invalid value for \"content_type\", must be one of #{validator.allowable_values}."
|
|
159
159
|
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -11417,6 +11417,13 @@ paths:
|
|
|
11417
11417
|
- video/webm
|
|
11418
11418
|
- video/x-m4v
|
|
11419
11419
|
- application/pdf
|
|
11420
|
+
- audio/mpeg
|
|
11421
|
+
- audio/mp4
|
|
11422
|
+
- audio/aac
|
|
11423
|
+
- audio/ogg
|
|
11424
|
+
- audio/wav
|
|
11425
|
+
- audio/webm
|
|
11426
|
+
- audio/x-m4a
|
|
11420
11427
|
example: "video/mp4"
|
|
11421
11428
|
size:
|
|
11422
11429
|
type: integer
|
|
@@ -36,7 +36,7 @@ describe Zernio::GetMediaPresignedUrlRequest do
|
|
|
36
36
|
describe 'test attribute "content_type"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/gif", "video/mp4", "video/mpeg", "video/quicktime", "video/avi", "video/x-msvideo", "video/webm", "video/x-m4v", "application/pdf"])
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/gif", "video/mp4", "video/mpeg", "video/quicktime", "video/avi", "video/x-msvideo", "video/webm", "video/x-m4v", "application/pdf", "audio/mpeg", "audio/mp4", "audio/aac", "audio/ogg", "audio/wav", "audio/webm", "audio/x-m4a"])
|
|
40
40
|
# validator.allowable_values.each do |value|
|
|
41
41
|
# expect { instance.content_type = value }.not_to raise_error
|
|
42
42
|
# end
|