active_storage_validations 3.0.3 → 3.0.5

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: 9722633df97a05e71db94072d8da441d84e47ec8294fbda4d1a46ef3bf358114
4
- data.tar.gz: 9fdbf2bfaf5887c82cc142abdab8b53cfc26ebad1427a0bbbd73e0cd3af3d520
3
+ metadata.gz: 3d55df23fe62535fca12b811b9f1ff5b7ae1c1636899e9674a88b2077ce688dc
4
+ data.tar.gz: a0cafde4518c1ffbd84fcd69a88f1e56239b7845c81b6294cdf96ba394f88883
5
5
  SHA512:
6
- metadata.gz: 0f9791b37f25bff2d20e5d6107c495865733f3510586566e634e8674069aec63dcec842cb29fc096e719d737a4b60b8dd3e498f5d77a51a76f93f6973a968bfe
7
- data.tar.gz: 0e49d25ccede0a43397d107b6ee84d45753e8a68e577e8f630e57d91a85e803a719c68eecf87e48b5cc56dccde3c10f4d75654f3ba1ad85e0672897ec3394f55
6
+ metadata.gz: 70333f40a64146d92428921d0e6adb4ce1c5a3cdb547c3378def688d735f1ecdad0665143c1e3bc5f364b5f5a924dd36403dce618e6937a05594eb09799f8a2c
7
+ data.tar.gz: 966a85f0f4a99283ba24e42a657d9dc8b9cc384161c9a034e4568d90ede2b4710d57f79aea1cee4a2b995350d7fd9a0b431afba0aab8993956284019c1ca7506
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2018-2019 Igor Kasyanchuk
1
+ Copyright 2018-2025 Igor Kasyanchuk
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -44,7 +44,7 @@ module ActiveStorageValidations
44
44
  return to_enum(:attachables_and_blobs, record, attribute) if changes.blank? || !block_given?
45
45
 
46
46
  if changes.is_a?(ActiveStorage::Attached::Changes::CreateMany)
47
- changes.attachables.uniq.zip(changes.blobs.uniq).each do |attachable, blob|
47
+ changes.attachables.zip(changes.blobs).uniq { |_, blob| blob&.id }.each do |attachable, blob|
48
48
  yield attachable, blob
49
49
  end
50
50
  else
@@ -33,6 +33,7 @@ module ActiveStorageValidations
33
33
  case file
34
34
  when ActiveStorage::Attached, ActiveStorage::Attachment then file.blob&.filename&.to_s
35
35
  when ActiveStorage::Blob then file.filename
36
+ when String then ActiveStorage::Blob.find_signed!(file)&.filename
36
37
  when Hash then file[:filename]
37
38
  end.to_s
38
39
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveStorageValidations
4
- VERSION = "3.0.3"
4
+ VERSION = "3.0.5"
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.3
4
+ version: 3.0.5
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-12-13 00:00:00.000000000 Z
11
+ date: 2026-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob