cloudinary 2.3.1 → 2.4.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/cloudinary/api.rb +1 -1
- data/lib/cloudinary/carrier_wave/process.rb +17 -0
- data/lib/cloudinary/carrier_wave/storage.rb +4 -0
- data/lib/cloudinary/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: c5d13ba60560d448d8cfb1aaf87d40c7c12fa8879ff417b0e82c88694688a76a
|
4
|
+
data.tar.gz: 4cc35e584e9e347ba23c6b04f2eee8e8fc9249fd8ec399d4aba08af1a38433ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db4eed04971bebb7aff1b06907a953e6c69efcaddc20ef5cd422d3c0970589b40aa33b393aa94e54c841290ac9e6c3ad42311807b1a1f609f5bd2d9fe454b6d7
|
7
|
+
data.tar.gz: f48ef74d17808d6ff4b126f6d0def6400a455641b7b0c6987194d5b9cb24ccd045ac0f1bb89d716dfd760f86ee3ce92d113055794bd76491307d5d044f62628e
|
data/CHANGELOG.md
CHANGED
data/lib/cloudinary/api.rb
CHANGED
@@ -402,7 +402,7 @@ class Cloudinary::Api
|
|
402
402
|
#
|
403
403
|
# @raise [Cloudinary::Api::Error]
|
404
404
|
#
|
405
|
-
# @see https://cloudinary.com/documentation/admin_api
|
405
|
+
# @see https://cloudinary.com/documentation/admin_api#delete_resources
|
406
406
|
def self.delete_derived_resources(derived_resource_ids, options={})
|
407
407
|
uri = "derived_resources"
|
408
408
|
call_api(:delete, uri, { :derived_resource_ids => derived_resource_ids }, options)
|
@@ -48,6 +48,10 @@ module Cloudinary::CarrierWave
|
|
48
48
|
def tags(*tags)
|
49
49
|
process :tags=>tags
|
50
50
|
end
|
51
|
+
|
52
|
+
def upload_params(params={})
|
53
|
+
process :upload_params => params
|
54
|
+
end
|
51
55
|
end
|
52
56
|
|
53
57
|
def set_or_yell(hash, attr, value)
|
@@ -135,6 +139,19 @@ module Cloudinary::CarrierWave
|
|
135
139
|
@tags
|
136
140
|
end
|
137
141
|
|
142
|
+
def upload_params
|
143
|
+
@upload_params ||= begin
|
144
|
+
params_processors = self.all_processors.select{|processor| processor[0] == :upload_params}
|
145
|
+
merged_params = {}
|
146
|
+
params_processors.each do |processor|
|
147
|
+
merged_params.merge!(processor[1] || {})
|
148
|
+
end
|
149
|
+
merged_params
|
150
|
+
end
|
151
|
+
raise CloudinaryException, "upload_params cannot be used in versions." if @upload_params.present? && self.version_name.present?
|
152
|
+
@upload_params
|
153
|
+
end
|
154
|
+
|
138
155
|
def requested_format
|
139
156
|
format_processor = self.all_processors.find{|processor| processor[0] == :convert}
|
140
157
|
if format_processor
|
@@ -35,6 +35,10 @@ class Cloudinary::CarrierWave::Storage < ::CarrierWave::Storage::Abstract
|
|
35
35
|
params[:eager] = eager_versions.map{|version| [version.transformation, version.format]} if eager_versions.length > 0
|
36
36
|
params[:type]=uploader.class.storage_type
|
37
37
|
|
38
|
+
# Merge any custom upload parameters
|
39
|
+
custom_params = uploader.upload_params
|
40
|
+
params.merge!(custom_params) if custom_params.present?
|
41
|
+
|
38
42
|
params[:resource_type] ||= :auto
|
39
43
|
upload_method = uploader.respond_to?(:upload_chunked?) && uploader.upload_chunked? ? "upload_large" : "upload"
|
40
44
|
uploader.metadata = Cloudinary::Uploader.send(upload_method, data, params)
|
data/lib/cloudinary/version.rb
CHANGED
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: 2.
|
4
|
+
version: 2.4.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: 2025-
|
13
|
+
date: 2025-08-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|