active_storage_validations 0.9.7 → 2.0.2

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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +737 -229
  3. data/config/locales/da.yml +53 -0
  4. data/config/locales/de.yml +50 -19
  5. data/config/locales/en.yml +50 -19
  6. data/config/locales/es.yml +50 -19
  7. data/config/locales/fr.yml +50 -19
  8. data/config/locales/it.yml +50 -19
  9. data/config/locales/ja.yml +50 -19
  10. data/config/locales/nl.yml +50 -19
  11. data/config/locales/pl.yml +50 -19
  12. data/config/locales/pt-BR.yml +50 -19
  13. data/config/locales/ru.yml +50 -19
  14. data/config/locales/sv.yml +53 -0
  15. data/config/locales/tr.yml +50 -19
  16. data/config/locales/uk.yml +50 -19
  17. data/config/locales/vi.yml +50 -19
  18. data/config/locales/zh-CN.yml +53 -0
  19. data/lib/active_storage_validations/analyzer/audio_analyzer.rb +58 -0
  20. data/lib/active_storage_validations/analyzer/content_type_analyzer.rb +60 -0
  21. data/lib/active_storage_validations/analyzer/image_analyzer/image_magick.rb +47 -0
  22. data/lib/active_storage_validations/analyzer/image_analyzer/vips.rb +57 -0
  23. data/lib/active_storage_validations/analyzer/image_analyzer.rb +49 -0
  24. data/lib/active_storage_validations/analyzer/null_analyzer.rb +18 -0
  25. data/lib/active_storage_validations/analyzer/shared/asv_ff_probable.rb +61 -0
  26. data/lib/active_storage_validations/analyzer/video_analyzer.rb +130 -0
  27. data/lib/active_storage_validations/analyzer.rb +87 -0
  28. data/lib/active_storage_validations/aspect_ratio_validator.rb +154 -99
  29. data/lib/active_storage_validations/attached_validator.rb +22 -5
  30. data/lib/active_storage_validations/base_comparison_validator.rb +71 -0
  31. data/lib/active_storage_validations/content_type_validator.rb +206 -25
  32. data/lib/active_storage_validations/dimension_validator.rb +105 -82
  33. data/lib/active_storage_validations/duration_validator.rb +55 -0
  34. data/lib/active_storage_validations/extensors/asv_blob_metadatable.rb +49 -0
  35. data/lib/active_storage_validations/extensors/asv_marcelable.rb +12 -0
  36. data/lib/active_storage_validations/limit_validator.rb +75 -16
  37. data/lib/active_storage_validations/matchers/aspect_ratio_validator_matcher.rb +119 -0
  38. data/lib/active_storage_validations/matchers/attached_validator_matcher.rb +48 -25
  39. data/lib/active_storage_validations/matchers/base_comparison_validator_matcher.rb +140 -0
  40. data/lib/active_storage_validations/matchers/content_type_validator_matcher.rb +94 -59
  41. data/lib/active_storage_validations/matchers/dimension_validator_matcher.rb +97 -55
  42. data/lib/active_storage_validations/matchers/duration_validator_matcher.rb +39 -0
  43. data/lib/active_storage_validations/matchers/limit_validator_matcher.rb +127 -0
  44. data/lib/active_storage_validations/matchers/processable_file_validator_matcher.rb +78 -0
  45. data/lib/active_storage_validations/matchers/shared/asv_active_storageable.rb +19 -0
  46. data/lib/active_storage_validations/matchers/shared/asv_allow_blankable.rb +28 -0
  47. data/lib/active_storage_validations/matchers/shared/asv_attachable.rb +72 -0
  48. data/lib/active_storage_validations/matchers/shared/asv_contextable.rb +49 -0
  49. data/lib/active_storage_validations/matchers/shared/asv_messageable.rb +28 -0
  50. data/lib/active_storage_validations/matchers/shared/asv_rspecable.rb +27 -0
  51. data/lib/active_storage_validations/matchers/shared/asv_validatable.rb +56 -0
  52. data/lib/active_storage_validations/matchers/size_validator_matcher.rb +17 -71
  53. data/lib/active_storage_validations/matchers/total_size_validator_matcher.rb +47 -0
  54. data/lib/active_storage_validations/matchers.rb +11 -16
  55. data/lib/active_storage_validations/processable_file_validator.rb +37 -0
  56. data/lib/active_storage_validations/railtie.rb +11 -0
  57. data/lib/active_storage_validations/shared/asv_active_storageable.rb +30 -0
  58. data/lib/active_storage_validations/shared/asv_analyzable.rb +80 -0
  59. data/lib/active_storage_validations/shared/asv_attachable.rb +204 -0
  60. data/lib/active_storage_validations/shared/asv_errorable.rb +40 -0
  61. data/lib/active_storage_validations/shared/asv_loggable.rb +11 -0
  62. data/lib/active_storage_validations/shared/asv_optionable.rb +29 -0
  63. data/lib/active_storage_validations/shared/asv_symbolizable.rb +14 -0
  64. data/lib/active_storage_validations/size_validator.rb +24 -40
  65. data/lib/active_storage_validations/total_size_validator.rb +51 -0
  66. data/lib/active_storage_validations/version.rb +1 -1
  67. data/lib/active_storage_validations.rb +20 -6
  68. metadata +127 -21
  69. data/lib/active_storage_validations/metadata.rb +0 -123
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveStorageValidations
4
+ module ASVErrorable
5
+ extend ActiveSupport::Concern
6
+
7
+ def initialize_error_options(options, file = nil)
8
+ not_explicitly_written_options = %i(with in)
9
+ curated_options = options.except(*not_explicitly_written_options)
10
+
11
+ active_storage_validations_options = {
12
+ validator_type: self.class.to_sym,
13
+ custom_message: (options[:message] if options[:message].present?),
14
+ filename: (get_filename(file) unless self.class.to_sym == :total_size)
15
+ }.compact
16
+
17
+ curated_options.merge(active_storage_validations_options)
18
+ end
19
+
20
+ def add_error(record, attribute, error_type, **errors_options)
21
+ return if record.errors.added?(attribute, error_type)
22
+
23
+ # You can read https://api.rubyonrails.org/classes/ActiveModel/Errors.html#method-i-add
24
+ # to better understand how Rails model errors work
25
+ record.errors.add(attribute, error_type, **errors_options)
26
+ end
27
+
28
+ private
29
+
30
+ def get_filename(file)
31
+ return nil unless file
32
+
33
+ case file
34
+ when ActiveStorage::Attached, ActiveStorage::Attachment then file.blob&.filename&.to_s
35
+ when ActiveStorage::Blob then file.filename
36
+ when Hash then file[:filename]
37
+ end.to_s
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveStorageValidations
4
+ module ASVLoggable
5
+ extend ActiveSupport::Concern
6
+
7
+ def logger
8
+ Rails.logger
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveStorageValidations
4
+ # ActiveStorageValidations::ASVOptionable
5
+ #
6
+ # Helper method to flatten the validator options.
7
+ module ASVOptionable
8
+ extend ActiveSupport::Concern
9
+
10
+ private
11
+
12
+ def set_flat_options(record)
13
+ flatten_options(record, self.options)
14
+ end
15
+
16
+ def flatten_options(record, options, available_checks = self.class::AVAILABLE_CHECKS)
17
+ case options
18
+ when Hash
19
+ options.merge(options) do |key, value|
20
+ available_checks&.exclude?(key) ? {} : flatten_options(record, value, nil)
21
+ end
22
+ when Array
23
+ options.map { |option| flatten_options(record, option, available_checks) }
24
+ else
25
+ options.is_a?(Proc) ? options.call(record) : options
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ActiveStorageValidations
4
+ module ASVSymbolizable
5
+ extend ActiveSupport::Concern
6
+
7
+ class_methods do
8
+ def to_sym
9
+ validator_class = self.name.split("::").last
10
+ validator_class.sub(/Validator/, '').underscore.to_sym
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,58 +1,42 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module ActiveStorageValidations
4
- class SizeValidator < ActiveModel::EachValidator # :nodoc:
5
- delegate :number_to_human_size, to: ActiveSupport::NumberHelper
6
-
7
- AVAILABLE_CHECKS = %i[less_than less_than_or_equal_to greater_than greater_than_or_equal_to between].freeze
3
+ require_relative 'base_comparison_validator'
8
4
 
9
- def check_validity!
10
- return true if AVAILABLE_CHECKS.any? { |argument| options.key?(argument) }
5
+ module ActiveStorageValidations
6
+ class SizeValidator < BaseComparisonValidator
7
+ ERROR_TYPES = %i[
8
+ file_size_not_less_than
9
+ file_size_not_less_than_or_equal_to
10
+ file_size_not_greater_than
11
+ file_size_not_greater_than_or_equal_to
12
+ file_size_not_between
13
+ ].freeze
11
14
 
12
- raise ArgumentError, 'You must pass either :less_than, :greater_than, or :between to the validator'
13
- end
15
+ delegate :number_to_human_size, to: ActiveSupport::NumberHelper
14
16
 
15
17
  def validate_each(record, attribute, _value)
16
- # only attached
17
- return true unless record.send(attribute).attached?
18
+ return if no_attachments?(record, attribute)
18
19
 
19
- files = Array.wrap(record.send(attribute))
20
+ flat_options = set_flat_options(record)
20
21
 
21
- errors_options = {}
22
- errors_options[:message] = options[:message] if options[:message].present?
22
+ attached_files(record, attribute).each do |file|
23
+ next if is_valid?(file.blob.byte_size, flat_options)
23
24
 
24
- files.each do |file|
25
- next if content_size_valid?(file.blob.byte_size)
25
+ errors_options = initialize_error_options(options, file)
26
+ populate_error_options(errors_options, flat_options)
27
+ errors_options[:file_size] = format_bound_value(file.blob.byte_size)
26
28
 
27
- errors_options[:file_size] = number_to_human_size(file.blob.byte_size)
28
- errors_options[:min_size] = number_to_human_size(min_size)
29
- errors_options[:max_size] = number_to_human_size(max_size)
29
+ keys = AVAILABLE_CHECKS & flat_options.keys
30
+ error_type = "file_size_not_#{keys.first}".to_sym
30
31
 
31
- record.errors.add(attribute, :file_size_out_of_range, **errors_options)
32
- break
32
+ add_error(record, attribute, error_type, **errors_options)
33
33
  end
34
34
  end
35
35
 
36
- def content_size_valid?(file_size)
37
- if options[:between].present?
38
- options[:between].include?(file_size)
39
- elsif options[:less_than].present?
40
- file_size < options[:less_than]
41
- elsif options[:less_than_or_equal_to].present?
42
- file_size <= options[:less_than_or_equal_to]
43
- elsif options[:greater_than].present?
44
- file_size > options[:greater_than]
45
- elsif options[:greater_than_or_equal_to].present?
46
- file_size >= options[:greater_than_or_equal_to]
47
- end
48
- end
49
-
50
- def min_size
51
- options[:between]&.min || options[:greater_than] || options[:greater_than_or_equal_to]
52
- end
36
+ private
53
37
 
54
- def max_size
55
- options[:between]&.max || options[:less_than] || options[:less_than_or_equal_to]
38
+ def format_bound_value(value)
39
+ number_to_human_size(value)
56
40
  end
57
41
  end
58
42
  end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base_comparison_validator'
4
+
5
+ module ActiveStorageValidations
6
+ class TotalSizeValidator < BaseComparisonValidator
7
+ ERROR_TYPES = %i[
8
+ total_file_size_not_less_than
9
+ total_file_size_not_less_than_or_equal_to
10
+ total_file_size_not_greater_than
11
+ total_file_size_not_greater_than_or_equal_to
12
+ total_file_size_not_between
13
+ ].freeze
14
+
15
+ delegate :number_to_human_size, to: ActiveSupport::NumberHelper
16
+
17
+ def validate_each(record, attribute, _value)
18
+ custom_check_validity!(record, attribute)
19
+
20
+ return if no_attachments?(record, attribute)
21
+
22
+ total_file_size = attached_files(record, attribute).sum { |file| file.blob.byte_size }
23
+ flat_options = set_flat_options(record)
24
+
25
+ return if is_valid?(total_file_size, flat_options)
26
+
27
+ errors_options = initialize_error_options(options, nil)
28
+ populate_error_options(errors_options, flat_options)
29
+ errors_options[:total_file_size] = format_bound_value(total_file_size)
30
+
31
+ keys = AVAILABLE_CHECKS & flat_options.keys
32
+ error_type = "total_file_size_not_#{keys.first}".to_sym
33
+
34
+ add_error(record, attribute, error_type, **errors_options)
35
+ end
36
+
37
+ private
38
+
39
+ def custom_check_validity!(record, attribute)
40
+ # We can't perform this check in the #check_validity! hook because we do not
41
+ # have enough data (only options & attributes are accessible)
42
+ unless record.send(attribute).is_a?(ActiveStorage::Attached::Many)
43
+ raise ArgumentError, 'This validator is only available for has_many_attached relations'
44
+ end
45
+ end
46
+
47
+ def format_bound_value(value)
48
+ number_to_human_size(value)
49
+ end
50
+ end
51
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveStorageValidations
4
- VERSION = '0.9.7'
4
+ VERSION = '2.0.2'
5
5
  end
@@ -1,14 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_storage_validations/railtie'
4
- require 'active_storage_validations/engine'
3
+ require 'active_model'
4
+ require 'active_support/concern'
5
+
6
+ require 'active_storage_validations/analyzer'
7
+ require 'active_storage_validations/analyzer/image_analyzer'
8
+ require 'active_storage_validations/analyzer/image_analyzer/image_magick'
9
+ require 'active_storage_validations/analyzer/image_analyzer/vips'
10
+ require 'active_storage_validations/analyzer/null_analyzer'
11
+ require 'active_storage_validations/analyzer/video_analyzer'
12
+ require 'active_storage_validations/analyzer/audio_analyzer'
13
+
14
+ require 'active_storage_validations/extensors/asv_blob_metadatable'
15
+ require 'active_storage_validations/extensors/asv_marcelable'
16
+
5
17
  require 'active_storage_validations/attached_validator'
6
18
  require 'active_storage_validations/content_type_validator'
7
- require 'active_storage_validations/size_validator'
8
19
  require 'active_storage_validations/limit_validator'
9
20
  require 'active_storage_validations/dimension_validator'
21
+ require 'active_storage_validations/duration_validator'
10
22
  require 'active_storage_validations/aspect_ratio_validator'
23
+ require 'active_storage_validations/processable_file_validator'
24
+ require 'active_storage_validations/size_validator'
25
+ require 'active_storage_validations/total_size_validator'
11
26
 
12
- ActiveSupport.on_load(:active_record) do
13
- send :include, ActiveStorageValidations
14
- end
27
+ require 'active_storage_validations/engine'
28
+ require 'active_storage_validations/railtie'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_storage_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-05 00:00:00.000000000 Z
11
+ date: 2025-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -16,56 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.0
19
+ version: 6.1.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 5.2.0
26
+ version: 6.1.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 5.2.0
33
+ version: 6.1.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 5.2.0
40
+ version: 6.1.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: activestorage
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 5.2.0
47
+ version: 6.1.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 5.2.0
54
+ version: 6.1.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 5.2.0
61
+ version: 6.1.4
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 5.2.0
68
+ version: 6.1.4
69
+ - !ruby/object:Gem::Dependency
70
+ name: marcel
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.3
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.3
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: combustion
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -95,19 +109,59 @@ dependencies:
95
109
  - !ruby/object:Gem::Version
96
110
  version: 4.9.5
97
111
  - !ruby/object:Gem::Dependency
98
- name: ruby-vips
112
+ name: minitest-focus
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.4'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '1.4'
125
+ - !ruby/object:Gem::Dependency
126
+ name: minitest-mock_expectations
99
127
  requirement: !ruby/object:Gem::Requirement
100
128
  requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.2'
101
132
  - - ">="
102
133
  - !ruby/object:Gem::Version
103
- version: 2.1.0
134
+ version: 1.2.0
104
135
  type: :development
105
136
  prerelease: false
106
137
  version_requirements: !ruby/object:Gem::Requirement
107
138
  requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: '1.2'
108
142
  - - ">="
109
143
  - !ruby/object:Gem::Version
110
- version: 2.1.0
144
+ version: 1.2.0
145
+ - !ruby/object:Gem::Dependency
146
+ name: minitest-stub_any_instance
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '1.0'
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: 1.0.3
155
+ type: :development
156
+ prerelease: false
157
+ version_requirements: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: '1.0'
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: 1.0.3
111
165
  - !ruby/object:Gem::Dependency
112
166
  name: pry
113
167
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +177,21 @@ dependencies:
123
177
  - !ruby/object:Gem::Version
124
178
  version: '0'
125
179
  - !ruby/object:Gem::Dependency
126
- name: rubocop
180
+ name: ruby-vips
181
+ requirement: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ version: 2.1.0
186
+ type: :development
187
+ prerelease: false
188
+ version_requirements: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: 2.1.0
193
+ - !ruby/object:Gem::Dependency
194
+ name: simplecov
127
195
  requirement: !ruby/object:Gem::Requirement
128
196
  requirements:
129
197
  - - ">="
@@ -151,19 +219,19 @@ dependencies:
151
219
  - !ruby/object:Gem::Version
152
220
  version: '0'
153
221
  - !ruby/object:Gem::Dependency
154
- name: marcel
222
+ name: webmock
155
223
  requirement: !ruby/object:Gem::Requirement
156
224
  requirements:
157
225
  - - ">="
158
226
  - !ruby/object:Gem::Version
159
- version: '0'
227
+ version: '3'
160
228
  type: :development
161
229
  prerelease: false
162
230
  version_requirements: !ruby/object:Gem::Requirement
163
231
  requirements:
164
232
  - - ">="
165
233
  - !ruby/object:Gem::Version
166
- version: '0'
234
+ version: '3'
167
235
  description: Validations for Active Storage (presence)
168
236
  email:
169
237
  - igorkasyanchuk@gmail.com
@@ -174,6 +242,7 @@ files:
174
242
  - MIT-LICENSE
175
243
  - README.md
176
244
  - Rakefile
245
+ - config/locales/da.yml
177
246
  - config/locales/de.yml
178
247
  - config/locales/en.yml
179
248
  - config/locales/es.yml
@@ -184,30 +253,67 @@ files:
184
253
  - config/locales/pl.yml
185
254
  - config/locales/pt-BR.yml
186
255
  - config/locales/ru.yml
256
+ - config/locales/sv.yml
187
257
  - config/locales/tr.yml
188
258
  - config/locales/uk.yml
189
259
  - config/locales/vi.yml
260
+ - config/locales/zh-CN.yml
190
261
  - lib/active_storage_validations.rb
262
+ - lib/active_storage_validations/analyzer.rb
263
+ - lib/active_storage_validations/analyzer/audio_analyzer.rb
264
+ - lib/active_storage_validations/analyzer/content_type_analyzer.rb
265
+ - lib/active_storage_validations/analyzer/image_analyzer.rb
266
+ - lib/active_storage_validations/analyzer/image_analyzer/image_magick.rb
267
+ - lib/active_storage_validations/analyzer/image_analyzer/vips.rb
268
+ - lib/active_storage_validations/analyzer/null_analyzer.rb
269
+ - lib/active_storage_validations/analyzer/shared/asv_ff_probable.rb
270
+ - lib/active_storage_validations/analyzer/video_analyzer.rb
191
271
  - lib/active_storage_validations/aspect_ratio_validator.rb
192
272
  - lib/active_storage_validations/attached_validator.rb
273
+ - lib/active_storage_validations/base_comparison_validator.rb
193
274
  - lib/active_storage_validations/content_type_validator.rb
194
275
  - lib/active_storage_validations/dimension_validator.rb
276
+ - lib/active_storage_validations/duration_validator.rb
195
277
  - lib/active_storage_validations/engine.rb
278
+ - lib/active_storage_validations/extensors/asv_blob_metadatable.rb
279
+ - lib/active_storage_validations/extensors/asv_marcelable.rb
196
280
  - lib/active_storage_validations/limit_validator.rb
197
281
  - lib/active_storage_validations/matchers.rb
282
+ - lib/active_storage_validations/matchers/aspect_ratio_validator_matcher.rb
198
283
  - lib/active_storage_validations/matchers/attached_validator_matcher.rb
284
+ - lib/active_storage_validations/matchers/base_comparison_validator_matcher.rb
199
285
  - lib/active_storage_validations/matchers/content_type_validator_matcher.rb
200
286
  - lib/active_storage_validations/matchers/dimension_validator_matcher.rb
287
+ - lib/active_storage_validations/matchers/duration_validator_matcher.rb
288
+ - lib/active_storage_validations/matchers/limit_validator_matcher.rb
289
+ - lib/active_storage_validations/matchers/processable_file_validator_matcher.rb
290
+ - lib/active_storage_validations/matchers/shared/asv_active_storageable.rb
291
+ - lib/active_storage_validations/matchers/shared/asv_allow_blankable.rb
292
+ - lib/active_storage_validations/matchers/shared/asv_attachable.rb
293
+ - lib/active_storage_validations/matchers/shared/asv_contextable.rb
294
+ - lib/active_storage_validations/matchers/shared/asv_messageable.rb
295
+ - lib/active_storage_validations/matchers/shared/asv_rspecable.rb
296
+ - lib/active_storage_validations/matchers/shared/asv_validatable.rb
201
297
  - lib/active_storage_validations/matchers/size_validator_matcher.rb
202
- - lib/active_storage_validations/metadata.rb
298
+ - lib/active_storage_validations/matchers/total_size_validator_matcher.rb
299
+ - lib/active_storage_validations/processable_file_validator.rb
203
300
  - lib/active_storage_validations/railtie.rb
301
+ - lib/active_storage_validations/shared/asv_active_storageable.rb
302
+ - lib/active_storage_validations/shared/asv_analyzable.rb
303
+ - lib/active_storage_validations/shared/asv_attachable.rb
304
+ - lib/active_storage_validations/shared/asv_errorable.rb
305
+ - lib/active_storage_validations/shared/asv_loggable.rb
306
+ - lib/active_storage_validations/shared/asv_optionable.rb
307
+ - lib/active_storage_validations/shared/asv_symbolizable.rb
204
308
  - lib/active_storage_validations/size_validator.rb
309
+ - lib/active_storage_validations/total_size_validator.rb
205
310
  - lib/active_storage_validations/version.rb
206
311
  - lib/tasks/active_storage_validations_tasks.rake
207
312
  homepage: https://github.com/igorkasyanchuk/active_storage_validations
208
313
  licenses:
209
314
  - MIT
210
- metadata: {}
315
+ metadata:
316
+ rubygems_mfa_required: 'true'
211
317
  post_install_message:
212
318
  rdoc_options: []
213
319
  require_paths:
@@ -216,14 +322,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
322
  requirements:
217
323
  - - ">="
218
324
  - !ruby/object:Gem::Version
219
- version: '0'
325
+ version: 2.5.0
220
326
  required_rubygems_version: !ruby/object:Gem::Requirement
221
327
  requirements:
222
328
  - - ">="
223
329
  - !ruby/object:Gem::Version
224
330
  version: '0'
225
331
  requirements: []
226
- rubygems_version: 3.2.3
332
+ rubygems_version: 3.5.16
227
333
  signing_key:
228
334
  specification_version: 4
229
335
  summary: Validations for Active Storage