From 3e716e586e6a8b300279225890921448b807e75c Mon Sep 17 00:00:00 2001 From: Amir Tocker Date: Tue, 22 Mar 2016 16:09:29 +0200 Subject: [PATCH] Version 2.0.8 --- CHANGELOG.md | 11 ++++++++++ bower.json | 2 +- js/jquery.cloudinary.js | 47 ++++++++++++++++------------------------- package.json | 2 +- src/cloudinary.coffee | 2 +- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d4e4f5b..33df3c3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,15 @@ +2.0.8 / 2016-03-22 +================== + + * Create local variables for `lodash` and `_` for the shrinkwrap version. + * Add `face_count` and `page_count` to Condition. Use replace with callback to process condition. + * Add `transformation-spec.js` to karma configuration + * Add translation of parameter names in conditional transformation + * Fix responsive tests + * Update tests + * Set default `responsive_use_breakpoints` instead of `responsive_use_stoppoints`. + 2.0.7 / 2016-03-08 ================== diff --git a/bower.json b/bower.json index bfe4a349..1ded3bc3 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "cloudinary", - "version": "2.0.7", + "version": "2.0.8", "title": "Cloudinary jQuery Plugin", "authors": [ { diff --git a/js/jquery.cloudinary.js b/js/jquery.cloudinary.js index 7e3400a1..fc182db6 100644 --- a/js/jquery.cloudinary.js +++ b/js/jquery.cloudinary.js @@ -1,6 +1,6 @@ /** - * Cloudinary's JavaScript library - Version 2.0.7 + * Cloudinary's JavaScript library - Version 2.0.8 * Copyright Cloudinary * see https://github.com/cloudinary/cloudinary_js * @@ -782,7 +782,11 @@ var extend = function(child, parent) { for (var key in parent) { if (hasProp.cal "width": "w", "height": "h", "aspect_ratio": "ar", - "aspectRatio": "ar" + "aspectRatio": "ar", + "page_count": "pc", + "pageCount": "pc", + "face_count": "fc", + "faceCount": "fc" }; Condition.BOUNDRY = "[ _]+"; @@ -838,27 +842,12 @@ var extend = function(child, parent) { for (var key in parent) { if (hasProp.cal */ Condition.prototype.normalize = function(value) { - var list, longName, ref, shortName, v; - ref = Condition.PARAMETERS; - for (longName in ref) { - shortName = ref[longName]; - value = value.replace(new RegExp(longName, "g"), shortName); - } - list = value.split(/[ _]+/); - list = (function() { - var j, len, results; - results = []; - for (j = 0, len = list.length; j < len; j++) { - v = list[j]; - if (Condition.OPERATORS[v] != null) { - results.push(Condition.OPERATORS[v]); - } else { - results.push(v); - } - } - return results; - })(); - return list.join('_'); + var replaceRE; + replaceRE = new RegExp("(" + Object.keys(Condition.PARAMETERS).join("|") + "|[=<>&|!]+)", "g"); + value = value.replace(replaceRE, function(match) { + return Condition.OPERATORS[match] || Condition.PARAMETERS[match]; + }); + return value.replace(/[ _]+/g, '_'); }; @@ -983,8 +972,8 @@ var extend = function(child, parent) { for (var key in parent) { if (hasProp.cal * @return {Condition} this condition */ - Condition.prototype.pages = function(operator, value) { - return this.predicate("pg", operator, value); + Condition.prototype.pageCount = function(operator, value) { + return this.predicate("pc", operator, value); }; @@ -995,8 +984,8 @@ var extend = function(child, parent) { for (var key in parent) { if (hasProp.cal * @return {Condition} this condition */ - Condition.prototype.faces = function(operator, value) { - return this.predicate("faces", operator, value); + Condition.prototype.faceCount = function(operator, value) { + return this.predicate("fc", operator, value); }; return Condition; @@ -2485,7 +2474,7 @@ var extend = function(child, parent) { for (var key in parent) { if (hasProp.cal Cloudinary = (function() { var AKAMAI_SHARED_CDN, CF_SHARED_CDN, DEFAULT_POSTER_OPTIONS, DEFAULT_VIDEO_SOURCE_TYPES, OLD_AKAMAI_SHARED_CDN, SHARED_CDN, VERSION, absolutize, applyBreakpoints, cdnSubdomainNumber, closestAbove, cloudinaryUrlPrefix, defaultBreakpoints, finalizeResourceType, parentWidth; - VERSION = "2.0.7"; + VERSION = "2.0.8"; CF_SHARED_CDN = "d3jpl91pxevbkh.cloudfront.net"; @@ -3665,7 +3654,7 @@ var extend = function(child, parent) { for (var key in parent) { if (hasProp.cal ImageTag: ImageTag, VideoTag: VideoTag, Cloudinary: Cloudinary, - VERSION: "2.0.7", + VERSION: "2.0.8", CloudinaryJQuery: CloudinaryJQuery }; return cloudinary; diff --git a/package.json b/package.json index 331a08f9..5109cb07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudinary_js", - "version": "2.0.7", + "version": "2.0.8", "description": "Cloudinary streamlines your web application’s image manipulation needs. Cloudinary's cloud-based servers automate image uploading, resizing, cropping, optimizing, sprite generation and more. Cloudinary's jQuery plugin allows direct uploading from the browser to the cloud and dynamic cloud-based image transformations and effects.", "main": "js/jquery.cloudinary.js", "directories": { diff --git a/src/cloudinary.coffee b/src/cloudinary.coffee index a40537d1..9d6ab140 100644 --- a/src/cloudinary.coffee +++ b/src/cloudinary.coffee @@ -1,5 +1,5 @@ class Cloudinary - VERSION = "2.0.7" + VERSION = "2.0.8" CF_SHARED_CDN = "d3jpl91pxevbkh.cloudfront.net" OLD_AKAMAI_SHARED_CDN = "cloudinary-a.akamaihd.net" AKAMAI_SHARED_CDN = "res.cloudinary.com"