Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
Version 2.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Tocker committed Dec 11, 2016
1 parent 3101e39 commit 4cb378e
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 24 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudinary-jquery-file-upload",
"version": "2.1.7",
"version": "2.1.8",
"homepage": "http://cloudinary.com",
"authors": [
{
Expand Down
52 changes: 34 additions & 18 deletions cloudinary-jquery-file-upload.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/**
* Cloudinary's JavaScript library - Version 2.1.7
* Cloudinary's JavaScript library - Version 2.1.8
* Copyright Cloudinary
* see https://github.com/cloudinary/cloudinary_js
*
Expand Down Expand Up @@ -342,7 +342,7 @@ var slice = [].slice,
/**
* @class Util
*/
Util = $.extend(BaseUtil, {
Util = jQuery.extend(BaseUtil, {
hasClass: hasClass,
addClass: addClass,
getAttribute: getAttribute,
Expand Down Expand Up @@ -1469,22 +1469,38 @@ var slice = [].slice,
*/

Configuration.prototype.fromEnvironment = function() {
var cloudinary_url, k, ref1, ref2, uri, v;
var cloudinary_url, j, k, len, query, ref1, ref2, ref3, uri, uriRegex, v, value;
cloudinary_url = typeof process !== "undefined" && process !== null ? (ref1 = process.env) != null ? ref1.CLOUDINARY_URL : void 0 : void 0;
if (cloudinary_url != null) {
uri = require('url').parse(cloudinary_url, true);
this.configuration = {
cloud_name: uri.host,
api_key: uri.auth && uri.auth.split(":")[0],
api_secret: uri.auth && uri.auth.split(":")[1],
private_cdn: uri.pathname != null,
secure_distribution: uri.pathname && uri.pathname.substring(1)
};
if (uri.query != null) {
ref2 = uri.query;
for (k in ref2) {
v = ref2[k];
this.configuration[k] = v;
uriRegex = /cloudinary:\/\/(?:(\w+)(?:\:(\w+))?@)?([\w\.-]+)(?:\/([^?]*))?(?:\?(.+))?/;
uri = uriRegex.exec(cloudinary_url);
if (uri) {
if (uri[3] != null) {
this.configuration['cloud_name'] = uri[3];
}
if (uri[1] != null) {
this.configuration['api_key'] = uri[1];
}
if (uri[2] != null) {
this.configuration['api_secret'] = uri[2];
}
if (uri[4] != null) {
this.configuration['private_cdn'] = uri[4] != null;
}
if (uri[4] != null) {
this.configuration['secure_distribution'] = uri[4];
}
query = uri[5];
if (query != null) {
ref2 = query.split('&');
for (j = 0, len = ref2.length; j < len; j++) {
value = ref2[j];
ref3 = value.split('='), k = ref3[0], v = ref3[1];
if (v == null) {
v = true;
}
this.configuration[k] = v;
}
}
}
}
Expand Down Expand Up @@ -2897,7 +2913,7 @@ var slice = [].slice,
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, findContainerWidth, maxWidth, updateDpr;

VERSION = "2.1.7";
VERSION = "2.1.8";

CF_SHARED_CDN = "d3jpl91pxevbkh.cloudfront.net";

Expand Down Expand Up @@ -4132,7 +4148,7 @@ var slice = [].slice,
TextLayer: TextLayer,
SubtitlesLayer: SubtitlesLayer,
Cloudinary: Cloudinary,
VERSION: "2.1.7",
VERSION: "2.1.8",
CloudinaryJQuery: CloudinaryJQuery
};
return cloudinary;
Expand Down
6 changes: 3 additions & 3 deletions cloudinary-jquery-file-upload.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cloudinary-jquery-file-upload.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cloudinary-jquery-file-upload",
"version": "2.1.7",
"version": "2.1.8",
"description": "Cloudinary Client Side JS library. 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 File Upload plugin allows direct uploading from the browser to the cloud and dynamic cloud-based image transformations and effects.",
"main": "cloudinary-jquery-file-upload.js",
"files": ["*.js"],
Expand Down

0 comments on commit 4cb378e

Please sign in to comment.