cloudinary 1.16.0 → 1.16.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38bfe3ef22f15b588b0cc8d80a433eb76d31b899eed350a8722547eeeee86643
4
- data.tar.gz: f00c4f2e455a3ef278a5169df4fd40f982e65f774ccd444095053663dc531c15
3
+ metadata.gz: eeda4318322d6304cf37a68c621387dc7d4382cd45d6665eddea154ce30adac3
4
+ data.tar.gz: ef675318a0c25a7e729d91ad014a8b36bad2756cafb73c20f69693b230747537
5
5
  SHA512:
6
- metadata.gz: 560784ae8664c5d3425599cb40cd72f69010223a22ae8d62dbb0c16033ce25dc28ae5810f39adb859436209d767dbfbe097974f7f8018add701eb072556e5bb3
7
- data.tar.gz: 551b473e18bb1774a724da52201c8a8d463cb7dcaaa3926de8f980b150fb18e69c03d50d39fa6e9d11d2d8f29d1413759953d714166252c6390e08ad5811c668
6
+ metadata.gz: c1ad5eee4b1b5eca7467e134cba0fc9516c0fe5af018637c1c0dbabc0a707a30e1cb115892de48f2acd2f8d339159842599edb7e0a1be15ea4ef391cbe569b78
7
+ data.tar.gz: 19235e8274a35ed46c302a57056c45ff885b1a59a8ad852b057bce384729b108105b9b6d53638adefc2b317cccbc3fae48f4dbae962937e3e682da962f817b86
@@ -1,4 +1,10 @@
1
1
 
2
+ 1.16.1 / 2020-07-06
3
+ ===================
4
+
5
+ * Detect data URLs with suffix in mime type
6
+ * Fix `Invalid regular expression` error in Safari
7
+
2
8
  1.16.0 / 2020-06-29
3
9
  ===================
4
10
 
@@ -139,7 +139,7 @@ class Cloudinary::Utils
139
139
  zoom
140
140
  ].map(&:to_sym)
141
141
 
142
- REMOTE_URL_REGEX = %r(^ftp:|^https?:|^s3:|^gs:|^data:([\w-]+\/[\w-]+)?(;[\w-]+=[\w-]+)*;base64,([a-zA-Z0-9\/+\n=]+)$)
142
+ REMOTE_URL_REGEX = %r(^ftp:|^https?:|^s3:|^gs:|^data:([\w-]+\/[\w-]+(\+[\w-]+)?)?(;[\w-]+=[\w-]+)*;base64,([a-zA-Z0-9\/+\n=]+)$)
143
143
 
144
144
  def self.extract_config_params(options)
145
145
  options.select{|k,v| URL_KEYS.include?(k)}
@@ -1,4 +1,4 @@
1
1
  # Copyright Cloudinary
2
2
  module Cloudinary
3
- VERSION = "1.16.0"
3
+ VERSION = "1.16.1"
4
4
  end
@@ -1473,30 +1473,33 @@ var slice = [].slice,
1473
1473
  return new this(expressionStr);
1474
1474
  };
1475
1475
 
1476
-
1477
1476
  /**
1478
1477
  * Normalize a string expression
1479
1478
  * @function Cloudinary#normalize
1480
1479
  * @param {string} expression a expression, e.g. "w gt 100", "width_gt_100", "width > 100"
1481
1480
  * @return {string} the normalized form of the value expression, e.g. "w_gt_100"
1482
1481
  */
1483
-
1484
1482
  Expression.normalize = function(expression) {
1485
- var operators, pattern, replaceRE;
1483
+ var operators, operatorsPattern, operatorsReplaceRE, predefinedVarsPattern, predefinedVarsReplaceRE;
1486
1484
  if (expression == null) {
1487
1485
  return expression;
1488
1486
  }
1489
1487
  expression = String(expression);
1490
1488
  operators = "\\|\\||>=|<=|&&|!=|>|=|<|/|-|\\+|\\*|\\^";
1491
- pattern = "((" + operators + ")(?=[ _])|(?<!\$)(" + Object.keys(Expression.PREDEFINED_VARS).join("|") + "))";
1492
- replaceRE = new RegExp(pattern, "g");
1493
- expression = expression.replace(replaceRE, function(match) {
1494
- return Expression.OPERATORS[match] || Expression.PREDEFINED_VARS[match];
1495
- });
1489
+
1490
+ // operators
1491
+ operatorsPattern = "((" + operators + ")(?=[ _]))";
1492
+ operatorsReplaceRE = new RegExp(operatorsPattern, "g");
1493
+ expression = expression.replace(operatorsReplaceRE, match => Expression.OPERATORS[match]);
1494
+
1495
+ // predefined variables
1496
+ predefinedVarsPattern = "(" + Object.keys(Expression.PREDEFINED_VARS).join("|") + ")";
1497
+ predefinedVarsReplaceRE = new RegExp(predefinedVarsPattern, "g");
1498
+ expression = expression.replace(predefinedVarsReplaceRE, (match, p1, offset) => (expression[offset - 1] === '$' ? match : Expression.PREDEFINED_VARS[match]));
1499
+
1496
1500
  return expression.replace(/[ _]+/g, '_');
1497
1501
  };
1498
1502
 
1499
-
1500
1503
  /**
1501
1504
  * Serialize the expression
1502
1505
  * @return {string} the expression as a string
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.16.0
4
+ version: 1.16.1
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: 2020-06-29 00:00:00.000000000 Z
13
+ date: 2020-07-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws_cf_signer