eivid 1.1.2 → 1.1.3
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/app/controllers/eivid/concerns/video_validations.rb +3 -9
- data/lib/eivid/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44d8733cec02c2d822a758903661c03b348ec6797a8cdcb817ffa4790094aeb1
|
|
4
|
+
data.tar.gz: b1c1b3ac06bb695ce76b72db220e18b74db69960f4ce0131d4f00289e3fc5e34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a83022e2807549aeaee50017ece932101a8d973a9a4e878b702afb762b5939a45f72479f30f6300cb38e89223f69bb2fc51a7619bc3662f7ea98c3ef6504b980
|
|
7
|
+
data.tar.gz: 141aa446b58902cb6c4106b3489abeaad47ac68d492651b112fa9e3463fc38082201d174b38b6161ec8e0807b8b09e51be0c5f71eb9fbfe1aefa7920c4d0f3cb
|
|
@@ -14,27 +14,21 @@ module Eivid::Concerns::VideoValidations
|
|
|
14
14
|
|
|
15
15
|
def validate_video_file_presence
|
|
16
16
|
unless params["video_file"]
|
|
17
|
-
|
|
18
|
-
"you forgot to add a required 'video_file' to your request"
|
|
19
|
-
)
|
|
17
|
+
raise_controller_error "you forgot to add a required 'video_file' to your request"
|
|
20
18
|
end
|
|
21
19
|
end
|
|
22
20
|
|
|
23
21
|
def validate_video_file_format
|
|
24
22
|
mime = params["video_file"]&.original_filename&.split('.')&.last&.downcase
|
|
25
23
|
unless Eivid::VideoMimeDump::DATA.include?(mime)
|
|
26
|
-
|
|
27
|
-
"the 'video_file' you tried to upload, is of an invalid mime type"
|
|
28
|
-
)
|
|
24
|
+
raise_controller_error "the 'video_file' you tried to upload, is of an invalid mime type"
|
|
29
25
|
end
|
|
30
26
|
end
|
|
31
27
|
|
|
32
28
|
def validate_video_file_size
|
|
33
29
|
megabytes = params["video_file"].tempfile.size / 1.0.megabyte
|
|
34
30
|
unless MAX_MB_VIDEO >= megabytes
|
|
35
|
-
|
|
36
|
-
"the 'video_file' size (#{megabytes.round(2)} mb) you tried to upload exceeds the maximum file size (#{MAX_MB_VIDEO} mb)"
|
|
37
|
-
)
|
|
31
|
+
raise_controller_error "the 'video_file' size (#{megabytes.round(2)} mb) you tried to upload exceeds the maximum file size (#{MAX_MB_VIDEO} mb)"
|
|
38
32
|
end
|
|
39
33
|
end
|
|
40
34
|
|
data/lib/eivid/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eivid
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jurriaan Schrofer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
143
143
|
- !ruby/object:Gem::Version
|
|
144
144
|
version: '0'
|
|
145
145
|
requirements: []
|
|
146
|
-
rubygems_version: 3.
|
|
146
|
+
rubygems_version: 3.0.9
|
|
147
147
|
signing_key:
|
|
148
148
|
specification_version: 4
|
|
149
149
|
summary: Eivid because we can.
|