cloudinary 1.18.0 → 1.21.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.
@@ -1,4 +1,4 @@
1
1
  # Copyright Cloudinary
2
2
  module Cloudinary
3
- VERSION = "1.18.0"
3
+ VERSION = "1.21.0"
4
4
  end
@@ -1490,12 +1490,16 @@ var slice = [].slice,
1490
1490
  // operators
1491
1491
  operatorsPattern = "((" + operators + ")(?=[ _]))";
1492
1492
  operatorsReplaceRE = new RegExp(operatorsPattern, "g");
1493
- expression = expression.replace(operatorsReplaceRE, match => Expression.OPERATORS[match]);
1493
+ expression = expression.replace(operatorsReplaceRE, function (match) {
1494
+ return Expression.OPERATORS[match];
1495
+ });
1494
1496
 
1495
1497
  // predefined variables
1496
1498
  predefinedVarsPattern = "(" + Object.keys(Expression.PREDEFINED_VARS).join("|") + ")";
1497
1499
  predefinedVarsReplaceRE = new RegExp(predefinedVarsPattern, "g");
1498
- expression = expression.replace(predefinedVarsReplaceRE, (match, p1, offset) => (expression[offset - 1] === '$' ? match : Expression.PREDEFINED_VARS[match]));
1500
+ expression = expression.replace(predefinedVarsReplaceRE, function(match, p1, offset){
1501
+ return (expression[offset - 1] === '$' ? match : Expression.PREDEFINED_VARS[match]);
1502
+ });
1499
1503
 
1500
1504
  return expression.replace(/[ _]+/g, '_');
1501
1505
  };
@@ -4298,12 +4302,20 @@ var slice = [].slice,
4298
4302
  switch (false) {
4299
4303
  case !/w_auto:breakpoints/.test(dataSrc):
4300
4304
  requiredWidth = maxWidth(containerWidth, tag);
4301
- dataSrc = dataSrc.replace(/w_auto:breakpoints([_0-9]*)(:[0-9]+)?/, "w_auto:breakpoints$1:" + requiredWidth);
4305
+ if (requiredWidth) {
4306
+ dataSrc = dataSrc.replace(/w_auto:breakpoints([_0-9]*)(:[0-9]+)?/, "w_auto:breakpoints$1:" + requiredWidth);
4307
+ } else {
4308
+ setUrl = false;
4309
+ }
4302
4310
  break;
4303
4311
  case !(match = /w_auto(:(\d+))?/.exec(dataSrc)):
4304
4312
  requiredWidth = applyBreakpoints.call(this, tag, containerWidth, match[2], options);
4305
4313
  requiredWidth = maxWidth(requiredWidth, tag);
4306
- dataSrc = dataSrc.replace(/w_auto[^,\/]*/g, "w_" + requiredWidth);
4314
+ if (requiredWidth) {
4315
+ dataSrc = dataSrc.replace(/w_auto[^,\/]*/g, "w_" + requiredWidth);
4316
+ } else {
4317
+ setUrl = false;
4318
+ }
4307
4319
  }
4308
4320
  Util.removeAttribute(tag, 'width');
4309
4321
  if (!options.responsive_preserve_height) {
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudinary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nadav Soferman
8
8
  - Itai Lahan
9
9
  - Tal Lev-Ami
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-27 00:00:00.000000000 Z
13
+ date: 2021-08-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws_cf_signer
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: '0'
35
+ version: 2.0.0
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: '0'
42
+ version: 2.0.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: actionpack
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -156,16 +156,16 @@ dependencies:
156
156
  name: rubyzip
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - "<="
159
+ - - ">="
160
160
  - !ruby/object:Gem::Version
161
- version: 1.2.0
161
+ version: '0'
162
162
  type: :development
163
163
  prerelease: false
164
164
  version_requirements: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - "<="
166
+ - - ">="
167
167
  - !ruby/object:Gem::Version
168
- version: 1.2.0
168
+ version: '0'
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: simplecov
171
171
  requirement: !ruby/object:Gem::Requirement
@@ -204,8 +204,12 @@ files:
204
204
  - lib/active_storage/blob_key.rb
205
205
  - lib/active_storage/service/cloudinary_service.rb
206
206
  - lib/cloudinary.rb
207
+ - lib/cloudinary/account_api.rb
208
+ - lib/cloudinary/account_config.rb
207
209
  - lib/cloudinary/api.rb
208
210
  - lib/cloudinary/auth_token.rb
211
+ - lib/cloudinary/base_api.rb
212
+ - lib/cloudinary/base_config.rb
209
213
  - lib/cloudinary/blob.rb
210
214
  - lib/cloudinary/cache.rb
211
215
  - lib/cloudinary/cache/breakpoints_cache.rb
@@ -219,6 +223,7 @@ files:
219
223
  - lib/cloudinary/carrier_wave/remote.rb
220
224
  - lib/cloudinary/carrier_wave/storage.rb
221
225
  - lib/cloudinary/cloudinary_controller.rb
226
+ - lib/cloudinary/config.rb
222
227
  - lib/cloudinary/downloader.rb
223
228
  - lib/cloudinary/engine.rb
224
229
  - lib/cloudinary/exceptions.rb
@@ -256,7 +261,7 @@ homepage: http://cloudinary.com
256
261
  licenses:
257
262
  - MIT
258
263
  metadata: {}
259
- post_install_message:
264
+ post_install_message:
260
265
  rdoc_options: []
261
266
  require_paths:
262
267
  - lib
@@ -271,8 +276,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
276
  - !ruby/object:Gem::Version
272
277
  version: '0'
273
278
  requirements: []
274
- rubygems_version: 3.1.4
275
- signing_key:
279
+ rubygems_version: 3.1.2
280
+ signing_key:
276
281
  specification_version: 4
277
282
  summary: Client library for easily using the Cloudinary service
278
283
  test_files: []