cloudinary
Advanced tools
Comparing version 1.4.6 to 1.5.0
1.5.0 / 2016-12-29 | ||
================== | ||
New functionality | ||
----------------- | ||
* `add_context` & `remove_all_context` API | ||
* Add `data-max-chunk-size` to input created by `image_upload_tag` | ||
* Add `moderation` and `phash` parameters to explicit API | ||
Other changes | ||
------------- | ||
* Modify Travis configuration to test NodeJS v4 and v6 only. | ||
* Modify `TEST_TAG` | ||
* Use Sinon spy in `start_at` test | ||
* Support context as hash argument in context API | ||
* Delete streaming profiles after tests | ||
* Fix signing URL tests, Fixes #89 | ||
* Add timeout to delete streaming profile test | ||
* add tests for add_context & remove_all_context | ||
* add add_context & remove_all_context methods | ||
* fix test description | ||
* add test to phash in an explicit call | ||
* add test to moderation parameter in an explicit call | ||
* Add test to accepts {effect: art:incognito} | ||
* support phash in explicit call | ||
* Fix missing moderation parameter in an explicit call | ||
* Fix `nil` to `null`. Call `config()` with parameter name. | ||
1.4.6 / 2016-11-25 | ||
@@ -3,0 +34,0 @@ ================== |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -27,6 +27,6 @@ var Q, _, api, call_api, config, https, publishResource, querystring, transformation_string, utils, | ||
deferred = Q.defer(); | ||
cloudinary = (ref = (ref1 = options["upload_prefix"]) != null ? ref1 : config().upload_prefix) != null ? ref : "https://api.cloudinary.com"; | ||
cloudinary = (ref = (ref1 = options["upload_prefix"]) != null ? ref1 : config("upload_prefix")) != null ? ref : "https://api.cloudinary.com"; | ||
cloud_name = (function() { | ||
var ref3; | ||
if ((ref2 = (ref3 = options["cloud_name"]) != null ? ref3 : config().cloud_name) != null) { | ||
if ((ref2 = (ref3 = options["cloud_name"]) != null ? ref3 : config("cloud_name")) != null) { | ||
return ref2; | ||
@@ -39,3 +39,3 @@ } else { | ||
var ref4; | ||
if ((ref3 = (ref4 = options["api_key"]) != null ? ref4 : config().api_key) != null) { | ||
if ((ref3 = (ref4 = options["api_key"]) != null ? ref4 : config("api_key")) != null) { | ||
return ref3; | ||
@@ -48,3 +48,3 @@ } else { | ||
var ref5; | ||
if ((ref4 = (ref5 = options["api_secret"]) != null ? ref5 : config().api_secret) != null) { | ||
if ((ref4 = (ref5 = options["api_secret"]) != null ? ref5 : config("api_secret")) != null) { | ||
return ref4; | ||
@@ -84,3 +84,3 @@ } else { | ||
res.on("end", function() { | ||
var e, error1, result; | ||
var e, result; | ||
if (error) { | ||
@@ -461,3 +461,3 @@ return; | ||
if (name == null) { | ||
name = nil; | ||
name = null; | ||
} | ||
@@ -464,0 +464,0 @@ if (options == null) { |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var _, cloudinary_config; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -58,6 +58,7 @@ var PRELOADED_CLOUDINARY_PATH, PreloadedFile, config, utils; | ||
PreloadedFile.prototype.toJSON = function() { | ||
var key, result, val; | ||
var key, ref, result, val; | ||
result = {}; | ||
for (key in this) { | ||
val = this[key]; | ||
ref = this; | ||
for (key in ref) { | ||
val = ref[key]; | ||
if (typeof val !== 'function') { | ||
@@ -64,0 +65,0 @@ result[key] = val; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var UploadStream, stream, util; |
@@ -1,4 +0,4 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
var Chunkable, EncodeFieldPart, EncodeFilePart, Q, TEXT_PARAMS, UploadStream, Writable, _, build_upload_params, call_api, call_tags_api, config, fs, https, path, post, util, utils, | ||
var Chunkable, EncodeFieldPart, EncodeFilePart, Q, TEXT_PARAMS, UploadStream, Writable, _, build_upload_params, call_api, call_context_api, call_tags_api, config, fs, https, path, post, util, utils, | ||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
@@ -405,2 +405,44 @@ hasProp = {}.hasOwnProperty; | ||
exports.add_context = function(context, public_ids, callback, options) { | ||
if (public_ids == null) { | ||
public_ids = []; | ||
} | ||
if (options == null) { | ||
options = {}; | ||
} | ||
return call_context_api(context, 'add', public_ids, callback, options); | ||
}; | ||
exports.remove_all_context = function(public_ids, callback, options) { | ||
if (public_ids == null) { | ||
public_ids = []; | ||
} | ||
if (options == null) { | ||
options = {}; | ||
} | ||
return call_context_api(null, 'remove_all', public_ids, callback, options); | ||
}; | ||
call_context_api = function(context, command, public_ids, callback, options) { | ||
if (public_ids == null) { | ||
public_ids = []; | ||
} | ||
if (options == null) { | ||
options = {}; | ||
} | ||
return call_api('context', callback, options, function() { | ||
var params; | ||
params = { | ||
timestamp: utils.timestamp(), | ||
public_ids: utils.build_array(public_ids), | ||
command: command, | ||
type: options.type | ||
}; | ||
if (context != null) { | ||
params.context = utils.encode_key_value(context); | ||
} | ||
return [params]; | ||
}); | ||
}; | ||
call_api = function(action, callback, options, get_params) { | ||
@@ -432,3 +474,3 @@ var api_url, boundary, deferred, error, file, handle_response, j, key, len, params, post_data, ref, result, unsigned_params, v, value; | ||
res.on("end", function() { | ||
var e, error1, result; | ||
var e, result; | ||
if (error) { | ||
@@ -633,2 +675,3 @@ return; | ||
"data-cloudinary-field": field, | ||
"data-max-chunk-size": options.chunk_size, | ||
"class": [html_options["class"], "cloudinary-fileupload"].join(" ") | ||
@@ -635,0 +678,0 @@ }, html_options); |
@@ -1,4 +0,4 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
var CLOUDINARY_JS_CONFIG_PARAMS, CONDITIONAL_OPERATORS, CONDITIONAL_PARAMETERS, DEFAULT_RESPONSIVE_WIDTH_TRANSFORMATION, LAYER_KEYWORD_PARAMS, _, build_custom_headers, build_eager, config, crc32, crypto, error, finalize_resource_type, finalize_source, hashToQuery, join_pair, norm_range_value, number_pattern, offset_any_pattern, offset_any_pattern_re, process_if, process_layer, process_video_params, querystring, smart_escape, split_range, textStyle, unsigned_url_prefix, utf8_encode, utils, v1_adapter, v1_result_adapter, | ||
var CLOUDINARY_JS_CONFIG_PARAMS, CONDITIONAL_OPERATORS, CONDITIONAL_PARAMETERS, DEFAULT_RESPONSIVE_WIDTH_TRANSFORMATION, LAYER_KEYWORD_PARAMS, _, build_custom_headers, build_eager, config, crc32, crypto, finalize_resource_type, finalize_source, hashToQuery, join_pair, norm_range_value, number_pattern, offset_any_pattern, offset_any_pattern_re, process_if, process_layer, process_video_params, querystring, smart_escape, split_range, textStyle, unsigned_url_prefix, utf8_encode, utils, v1_adapter, v1_result_adapter, | ||
slice = [].slice; | ||
@@ -1209,2 +1209,4 @@ | ||
invalidate: utils.as_safe_bool(options.invalidate), | ||
moderation: options.moderation, | ||
phash: utils.as_safe_bool(options.phash), | ||
public_id: public_id, | ||
@@ -1211,0 +1213,0 @@ responsive_breakpoints: utils.generate_responsive_breakpoints_string(options.responsive_breakpoints), |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var api, utils; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var _, v1, v2; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.10.0 | ||
// Generated by CoffeeScript 1.12.2 | ||
(function() { | ||
@@ -28,2 +28,4 @@ var uploader, utils; | ||
remove_all_tags: 1, | ||
add_context: 2, | ||
remove_all_context: 1, | ||
replace_tag: 2, | ||
@@ -30,0 +32,0 @@ create_archive: 0, |
@@ -5,3 +5,3 @@ { | ||
"description": "Cloudinary NPM for node.js integration", | ||
"version": "1.4.6", | ||
"version": "1.5.0", | ||
"homepage": "http://cloudinary.com", | ||
@@ -22,2 +22,4 @@ "license": "MIT", | ||
"expect.js": "0.3.x", | ||
"jsdom": "^9.5.0", | ||
"jsdom-global": "^2.1.0", | ||
"mocha": "2.3.x", | ||
@@ -24,0 +26,0 @@ "sinon": "^1.17.2" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
719234
68
10927
7