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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae4d464f1263ccf29c39f58a8e4f4a370aaed588fbb830d90d8548b472f84d64
4
- data.tar.gz: ee70e8757bb94225a72e0760a5235a5d9e91b5dc70401e98d8326df8fc0973f5
3
+ metadata.gz: 44d8733cec02c2d822a758903661c03b348ec6797a8cdcb817ffa4790094aeb1
4
+ data.tar.gz: b1c1b3ac06bb695ce76b72db220e18b74db69960f4ce0131d4f00289e3fc5e34
5
5
  SHA512:
6
- metadata.gz: 60d76f2ad070118d374c6c223ffa6beb259c7fbb7120836ff6db75558559e4826090a6e15dd1b63406f7f0a50642f2fb44878b52d1860c9d4d7b3c0a35e6c8e5
7
- data.tar.gz: 4cf1c5431039260a574e66c6b68dfc521742740ab6252c8f6025befd48bfd784d2a69e2eb3fcd0e621da2c551fa82c4f385c814836631142572904750862e5db
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
- raise Eivid::VideoFileNotPresentError.new(
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
- raise Eivid::IncorrectVideoMimeTypeError.new(
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
- raise VideoFileSizeTooBigError.new(
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
@@ -1,3 +1,3 @@
1
1
  module Eivid
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
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.2
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-09-25 00:00:00.000000000 Z
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.1.2
146
+ rubygems_version: 3.0.9
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Eivid because we can.