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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36bfc41c7b685fffb02f2fd8b19295777a0946d3725781baea5a8791adc72309
4
- data.tar.gz: 35e2e50b228839fbb1d04110e4d1dfd85658d2ba1bc97f9a456be8ad03138f5f
3
+ metadata.gz: 1d3f0ad914bff01c4871c39d9de061e6158a7bc28bfbb543037ed06a935d537b
4
+ data.tar.gz: a9e9977b4e0e1c889af326ad27f3a706e5924ed93d6d15ea72ddb2886d6bdc13
5
5
  SHA512:
6
- metadata.gz: f60144f1f2ad43afdffab4ef13fb0e6bce21c605896e894243796652db4317fa2b87c1b58c80269c79e0ab248adea2f4bab1de352d1979564f390ed6611ae482
7
- data.tar.gz: e7e074643ae0d9cbc08b7fd871f11435b1fafab170af7cae3f241e8380a9c1911db4815a8bcdd2c82616d86448473b32de39cbaf4b761dad69ba01e9617d7be1
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} pixel"
477
- dimension_max_not_included_in: "must be less than or equal to %{width} x %{height} pixel"
478
- dimension_width_not_included_in: "width is not included between %{min} and %{max} pixel"
479
- dimension_height_not_included_in: "height is not included between %{min} and %{max} pixel"
480
- dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixel"
481
- dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixel"
482
- dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length} pixel"
483
- dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length} pixel"
484
- dimension_width_not_equal_to: "width must be equal to %{length} pixel"
485
- dimension_height_not_equal_to: "height must be equal to %{length} pixel"
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
 
@@ -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} pixel"
43
- dimension_max_not_included_in: "must be less than or equal to %{width} x %{height} pixel"
44
- dimension_width_not_included_in: "width is not included between %{min} and %{max} pixel"
45
- dimension_height_not_included_in: "height is not included between %{min} and %{max} pixel"
46
- dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixel"
47
- dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixel"
48
- dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length} pixel"
49
- dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length} pixel"
50
- dimension_width_not_equal_to: "width must be equal to %{length} pixel"
51
- dimension_height_not_equal_to: "height must be equal to %{length} pixel"
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)"
@@ -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} pixel"
43
- dimension_max_not_included_in: "must be less than or equal to %{width} x %{height} pixel"
44
- dimension_width_not_included_in: "width is not included between %{min} and %{max} pixel"
45
- dimension_height_not_included_in: "height is not included between %{min} and %{max} pixel"
46
- dimension_width_not_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixel"
47
- dimension_height_not_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixel"
48
- dimension_width_not_less_than_or_equal_to: "width must be less than or equal to %{length} pixel"
49
- dimension_height_not_less_than_or_equal_to: "height must be less than or equal to %{length} pixel"
50
- dimension_width_not_equal_to: "width must be equal to %{length} pixel"
51
- dimension_height_not_equal_to: "height must be equal to %{length} pixel"
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveStorageValidations
4
- VERSION = "3.0.1"
4
+ VERSION = "3.0.2"
5
5
  end
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.1
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-07-09 00:00:00.000000000 Z
11
+ date: 2025-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob