active_storage_validations 3.0.1 → 3.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.
- checksums.yaml +4 -4
- data/README.md +10 -10
- data/config/locales/en-GB.yml +10 -10
- data/config/locales/en.yml +10 -10
- data/lib/active_storage_validations/shared/asv_analyzable.rb +3 -0
- data/lib/active_storage_validations/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d3f0ad914bff01c4871c39d9de061e6158a7bc28bfbb543037ed06a935d537b
|
4
|
+
data.tar.gz: a9e9977b4e0e1c889af326ad27f3a706e5924ed93d6d15ea72ddb2886d6bdc13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f23ecd4398c4a0573ef8ea0119bebfa0a497405ba4b9f76deb983d94188ccca36e99cea8c5d5e4fdf2bd4f5069884795cfe80fdb33ce96667d0707b45f670804
|
7
|
+
data.tar.gz: 6febcac482f4efc30b02515a5420a2300eb153653b7c0355da0eebdd2dc83f5ff202a6aa8abbdb6515e31ccc09e6cc9168523b74b8e2b9509b5405278134d0f5
|
data/README.md
CHANGED
@@ -473,16 +473,16 @@ end
|
|
473
473
|
en:
|
474
474
|
errors:
|
475
475
|
messages:
|
476
|
-
dimension_min_not_included_in: "must be greater than or equal to %{width} x %{height}
|
477
|
-
dimension_max_not_included_in: "must be less than or equal to %{width} x %{height}
|
478
|
-
dimension_width_not_included_in: "width is not included between %{min} and %{max}
|
479
|
-
dimension_height_not_included_in: "height is not included between %{min} and %{max}
|
480
|
-
dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length}
|
481
|
-
dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length}
|
482
|
-
dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length}
|
483
|
-
dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length}
|
484
|
-
dimension_width_not_equal_to: "width must be equal to %{length}
|
485
|
-
dimension_height_not_equal_to: "height must be equal to %{length}
|
476
|
+
dimension_min_not_included_in: "must be greater than or equal to %{width} x %{height} pixels"
|
477
|
+
dimension_max_not_included_in: "must be less than or equal to %{width} x %{height} pixels"
|
478
|
+
dimension_width_not_included_in: "width is not included between %{min} and %{max} pixels"
|
479
|
+
dimension_height_not_included_in: "height is not included between %{min} and %{max} pixels"
|
480
|
+
dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixels"
|
481
|
+
dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixels"
|
482
|
+
dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length} pixels"
|
483
|
+
dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length} pixels"
|
484
|
+
dimension_width_not_equal_to: "width must be equal to %{length} pixels"
|
485
|
+
dimension_height_not_equal_to: "height must be equal to %{length} pixels"
|
486
486
|
media_metadata_missing: "is not a valid media file"
|
487
487
|
```
|
488
488
|
|
data/config/locales/en-GB.yml
CHANGED
@@ -39,16 +39,16 @@ en-GB:
|
|
39
39
|
other: "too many files attached (maximum is %{max} files, got %{count})"
|
40
40
|
attachment_missing: "is missing its attachment"
|
41
41
|
media_metadata_missing: "is not a valid media file"
|
42
|
-
dimension_min_not_included_in: "must be greater than or equal to %{width} x %{height}
|
43
|
-
dimension_max_not_included_in: "must be less than or equal to %{width} x %{height}
|
44
|
-
dimension_width_not_included_in: "width is not included between %{min} and %{max}
|
45
|
-
dimension_height_not_included_in: "height is not included between %{min} and %{max}
|
46
|
-
dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length}
|
47
|
-
dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length}
|
48
|
-
dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length}
|
49
|
-
dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length}
|
50
|
-
dimension_width_not_equal_to: "width must be equal to %{length}
|
51
|
-
dimension_height_not_equal_to: "height must be equal to %{length}
|
42
|
+
dimension_min_not_included_in: "must be greater than or equal to %{width} x %{height} pixels"
|
43
|
+
dimension_max_not_included_in: "must be less than or equal to %{width} x %{height} pixels"
|
44
|
+
dimension_width_not_included_in: "width is not included between %{min} and %{max} pixels"
|
45
|
+
dimension_height_not_included_in: "height is not included between %{min} and %{max} pixels"
|
46
|
+
dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixels"
|
47
|
+
dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixels"
|
48
|
+
dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length} pixels"
|
49
|
+
dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length} pixels"
|
50
|
+
dimension_width_not_equal_to: "width must be equal to %{length} pixels"
|
51
|
+
dimension_height_not_equal_to: "height must be equal to %{length} pixels"
|
52
52
|
aspect_ratio_not_square: "must be square (current file is %{width}x%{height}px)"
|
53
53
|
aspect_ratio_not_portrait: "must be portrait (current file is %{width}x%{height}px)"
|
54
54
|
aspect_ratio_not_landscape: "must be landscape (current file is %{width}x%{height}px)"
|
data/config/locales/en.yml
CHANGED
@@ -39,16 +39,16 @@ en:
|
|
39
39
|
other: "too many files attached (maximum is %{max} files, got %{count})"
|
40
40
|
attachment_missing: "is missing its attachment"
|
41
41
|
media_metadata_missing: "is not a valid media file"
|
42
|
-
dimension_min_not_included_in: "must be greater than or equal to %{width} x %{height}
|
43
|
-
dimension_max_not_included_in: "must be less than or equal to %{width} x %{height}
|
44
|
-
dimension_width_not_included_in: "width is not included between %{min} and %{max}
|
45
|
-
dimension_height_not_included_in: "height is not included between %{min} and %{max}
|
46
|
-
dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length}
|
47
|
-
dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length}
|
48
|
-
dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length}
|
49
|
-
dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length}
|
50
|
-
dimension_width_not_equal_to: "width must be equal to %{length}
|
51
|
-
dimension_height_not_equal_to: "height must be equal to %{length}
|
42
|
+
dimension_min_not_included_in: "must be greater than or equal to %{width} x %{height} pixels"
|
43
|
+
dimension_max_not_included_in: "must be less than or equal to %{width} x %{height} pixels"
|
44
|
+
dimension_width_not_included_in: "width is not included between %{min} and %{max} pixels"
|
45
|
+
dimension_height_not_included_in: "height is not included between %{min} and %{max} pixels"
|
46
|
+
dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixels"
|
47
|
+
dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixels"
|
48
|
+
dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length} pixels"
|
49
|
+
dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length} pixels"
|
50
|
+
dimension_width_not_equal_to: "width must be equal to %{length} pixels"
|
51
|
+
dimension_height_not_equal_to: "height must be equal to %{length} pixels"
|
52
52
|
aspect_ratio_not_square: "must be square (current file is %{width}x%{height}px)"
|
53
53
|
aspect_ratio_not_portrait: "must be portrait (current file is %{width}x%{height}px)"
|
54
54
|
aspect_ratio_not_landscape: "must be landscape (current file is %{width}x%{height}px)"
|
@@ -21,6 +21,9 @@ module ActiveStorageValidations
|
|
21
21
|
|
22
22
|
new_metadata = generate_metadata_for(attachable, metadata_keys)
|
23
23
|
blob.merge_into_active_storage_validations_metadata(new_metadata)
|
24
|
+
blob.save!
|
25
|
+
|
26
|
+
blob.active_storage_validations_metadata
|
24
27
|
end
|
25
28
|
|
26
29
|
def blob_has_asv_metadata?(blob, metadata_keys)
|
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: 3.0.
|
4
|
+
version: 3.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: 2025-
|
11
|
+
date: 2025-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|