kt-paperclip 6.4.1 → 6.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paperclip/validators/attachment_content_type_validator.rb +1 -1
- data/lib/paperclip/validators/attachment_file_name_validator.rb +1 -1
- data/lib/paperclip/validators/attachment_presence_validator.rb +1 -1
- data/lib/paperclip/validators/attachment_size_validator.rb +1 -1
- data/lib/paperclip/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: 7cff96583dd89dcd0254140d27f4b8043137acd917c804d7710367d719342119
|
4
|
+
data.tar.gz: 27c6a63b58e72a52ec6ea87e82267d0a3ddb87815333295618d8d179c5c52d45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c37f46113c6c74e4e862b287174873f58d467adcfaee18766738c87eaa1757deac8363810883b3b0ae604d4cfa8b1223ec7edbe3af9687972c7ba53cc62578ab
|
7
|
+
data.tar.gz: 8cc931814748df871550746bb8798cc06bc018285659f4ddf07632d24d72fa374f867b840a7aa776da957821755cbe869a130abd77ce75636b71a6f5a9df14ed
|
@@ -47,7 +47,7 @@ module Paperclip
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def mark_invalid(record, attribute, types)
|
50
|
-
record.errors.add attribute, :invalid, options.merge(types: types.join(", "))
|
50
|
+
record.errors.add attribute, :invalid, **options.merge(types: types.join(", "))
|
51
51
|
end
|
52
52
|
|
53
53
|
def allowed_types
|
@@ -43,7 +43,7 @@ module Paperclip
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def mark_invalid(record, attribute, patterns)
|
46
|
-
record.errors.add attribute, :invalid, options.merge(names: patterns.join(", "))
|
46
|
+
record.errors.add attribute, :invalid, **options.merge(names: patterns.join(", "))
|
47
47
|
end
|
48
48
|
|
49
49
|
def allowed
|
@@ -4,7 +4,7 @@ module Paperclip
|
|
4
4
|
module Validators
|
5
5
|
class AttachmentPresenceValidator < ActiveModel::EachValidator
|
6
6
|
def validate_each(record, attribute, _value)
|
7
|
-
record.errors.add(attribute, :blank, options) if record.send("#{attribute}_file_name").blank?
|
7
|
+
record.errors.add(attribute, :blank, **options) if record.send("#{attribute}_file_name").blank?
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.helper_method_name
|
@@ -39,7 +39,7 @@ module Paperclip
|
|
39
39
|
unless value.send(CHECKS[option], option_value)
|
40
40
|
error_message_key = options[:in] ? :in_between : option
|
41
41
|
error_attrs.each do |error_attr_name|
|
42
|
-
record.errors.add(error_attr_name, error_message_key, filtered_options(value).merge(
|
42
|
+
record.errors.add(error_attr_name, error_message_key, **filtered_options(value).merge(
|
43
43
|
min: min_value_in_human_size(record),
|
44
44
|
max: max_value_in_human_size(record),
|
45
45
|
count: human_size(option_value)
|
data/lib/paperclip/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kt-paperclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.4.
|
4
|
+
version: 6.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Surendra Singhi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -584,7 +584,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
584
584
|
version: '0'
|
585
585
|
requirements:
|
586
586
|
- ImageMagick
|
587
|
-
rubygems_version: 3.
|
587
|
+
rubygems_version: 3.1.6
|
588
588
|
signing_key:
|
589
589
|
specification_version: 4
|
590
590
|
summary: File attachments as attributes for ActiveRecord
|