cloudinary 1.24.0 → 1.25.0

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: 4dfd5beeebb091b480f5b9e43dec47fea57c876c62499c8a93356d4b9318051f
4
- data.tar.gz: 588c68c6ccd722bdfd9d303ca76b34aee2eab30d64cbedfb57d1411160d60ff5
3
+ metadata.gz: 27739f4540fd5b75d22128cc2bb0d885160c4d00163e658048ef770e72ab2d33
4
+ data.tar.gz: e4f02a3ce402b625a1323f6e0cc14d8f55436de953127090491266377d9576e9
5
5
  SHA512:
6
- metadata.gz: eb8daa2242a6ad57553aeb65f9bef53440a075518922510e4901eef1c29d952e15c75456a1b4cdfbc35aaced3ac3adcbca18f3b307e72521bebad48138139095
7
- data.tar.gz: 67fb1cb9c9e299fd0a914b49a7083afdd076b064690afc25faa4250a04bed0a1e9077cac72cb102fe70c8da23399e1e62066395c53ba2c34d9e1e5d6b8dfa9fa
6
+ metadata.gz: 15e356e735c9c9e7a2cf0df6269e553bff2e4416386cfdff9a3d5edc81d6fbd4213c73d4c6e907e6a42e8d3680dcbf74e4d90ded012d7ed1c8167a2271ab251f
7
+ data.tar.gz: 2720b423770f63dbb7369233c12096846fa157ba2f0f4f465da94128bd574bdc2992bfba8a89ee81877e571a26fbd33a86b6150cfccb78923bd9d2267c9f0b08
data/.travis.yml CHANGED
@@ -16,7 +16,7 @@ matrix:
16
16
  dist: xenial
17
17
  rvm: ruby-2.5.9
18
18
  before_install:
19
- - gem install bundler
19
+ - gem install bundler -v 2.3.26
20
20
 
21
21
  before_script: >
22
22
  export CLOUDINARY_URL=$(bash tools/get_test_cloud.sh);
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.25.0 / 2023-01-04
2
+ ==================
3
+
4
+ * Add support for `mount_uploaders` in `CarrierWave`
5
+
1
6
  1.24.0 / 2022-12-06
2
7
  ==================
3
8
 
@@ -163,7 +163,11 @@ module Cloudinary::CarrierWave
163
163
  super
164
164
 
165
165
  column = model.send(:_mounter, mounted_as).send(:serialization_column)
166
- identifier = model.read_attribute(column)
167
- retrieve_from_store!(identifier) unless identifier.nil?
166
+ original_value = model.read_attribute(column)
167
+ identifiers = original_value.is_a?(Array) ? original_value : [original_value]
168
+
169
+ identifiers.each do |identifier|
170
+ retrieve_from_store!(identifier) unless identifier.nil?
171
+ end
168
172
  end
169
173
  end
@@ -71,6 +71,16 @@ class Cloudinary::CarrierWave::Storage < ::CarrierWave::Storage::Abstract
71
71
  end
72
72
  model_class = uploader.model.class
73
73
  column = uploader.model.send(:_mounter, uploader.mounted_as).send(:serialization_column)
74
+ original_value = uploader.model.read_attribute(column)
75
+ return if original_value == name
76
+
77
+ if original_value.is_a?(Array)
78
+ if index = original_value.index(identifier)
79
+ original_value[index] = name
80
+ end
81
+ name = original_value
82
+ end
83
+
74
84
  if defined?(ActiveRecord::Base) && uploader.model.is_a?(ActiveRecord::Base)
75
85
  primary_key = model_class.primary_key.to_sym
76
86
  if defined?(::ActiveRecord::VERSION::MAJOR) && ::ActiveRecord::VERSION::MAJOR > 2
@@ -1,4 +1,4 @@
1
1
  # Copyright Cloudinary
2
2
  module Cloudinary
3
- VERSION = "1.24.0"
3
+ VERSION = "1.25.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudinary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.0
4
+ version: 1.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nadav Soferman
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-12-06 00:00:00.000000000 Z
13
+ date: 2023-01-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws_cf_signer