Skip to content

Commit 2230669

Browse files
committed
merged with origin develop
2 parents 00f3950 + 640091c commit 2230669

File tree

9 files changed

+37
-68
lines changed

9 files changed

+37
-68
lines changed

LICENSE

100644100755
Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
The MIT License (MIT)
1+
Copyright (c) 2015, QuickBlox
2+
All rights reserved.
23

3-
Copyright (c) 2013 QuickBlox
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
46

5-
Permission is hereby granted, free of charge, to any person obtaining a copy of
6-
this software and associated documentation files (the "Software"), to deal in
7-
the Software without restriction, including without limitation the rights to
8-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software is furnished to do so,
10-
subject to the following conditions:
7+
* Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
119

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
10+
* Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1424

15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "quickblox",
33
"description": "QuickBlox JavaScript SDK",
4-
"version": "1.16.1",
4+
"version": "1.17.0",
55
"homepage": "http://quickblox.com/developers/Javascript",
66
"main": "quickblox.js",
7-
"license": "MIT",
7+
"license": "BSD",
88
"keywords": [
99
"quickblox",
1010
"javascript",

js/modules/qbData.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,6 @@ DataProxy.prototype = {
8181
});
8282
},
8383

84-
updateFile: function(className, params, callback) {
85-
Utils.QBLog('[DataProxy]', 'updateFile', className, params);
86-
87-
var formData;
88-
formData = new FormData();
89-
formData.append('field_name', params.field_name);
90-
formData.append('file', params.file);
91-
this.service.ajax({url: Utils.getUrl(config.urls.data, className + '/' + params.id + '/file'), data: formData,
92-
contentType: false, processData: false, type: 'POST'}, function(err, result) {
93-
if (err) { callback (err, null); }
94-
else { callback (err, result); }
95-
});
96-
},
97-
9884
downloadFile: function(className, params, callback) {
9985
Utils.QBLog('[DataProxy]', 'downloadFile', className, params);
10086

js/modules/qbUsers.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*/
77

88
var config = require('../qbConfig'),
9-
Utils = require('../qbUtils');
9+
Utils = require('../qbUtils'),
10+
util = require('util');
1011

1112
var DATE_FIELDS = ['created_at', 'updated_at', 'last_request_at'];
1213
var NUMBER_FIELDS = ['id', 'external_user_id'];
@@ -139,7 +140,7 @@ module.exports = UsersProxy;
139140
function generateFilter(obj) {
140141
var type = obj.field in DATE_FIELDS ? 'date' : typeof obj.value;
141142

142-
if (obj.value instanceof Array) {
143+
if (obj.value instanceof Array || util.isArray(obj.value)) {
143144
if (type == 'object') {
144145
type = typeof obj.value[0];
145146
}

js/qbConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
var config = {
9-
version: '1.16.1',
9+
version: '1.17.0',
1010
creds: {
1111
appId: '',
1212
authKey: '',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "quickblox",
33
"description": "QuickBlox JavaScript SDK",
4-
"version": "1.16.1",
4+
"version": "1.17.0",
55
"homepage": "http://quickblox.com/developers/Javascript",
66
"main": "js/qbMain.js",
77
"license": [
88
{
9-
"type": "MIT",
9+
"type": "BSD",
1010
"url": "https://github.com/QuickBlox/quickblox-javascript-sdk/blob/master/LICENSE"
1111
}
1212
],

quickblox.min.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/QB-ChatSpec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ describe('Chat API', function() {
197197
if(error){
198198
done.fail("Create or update list error: " + JSON.stringify(error));
199199
}else{
200-
expect(error).toBe(null);
201-
202200
console.info("can create new list with items");
203201
done();
204202
}
@@ -218,8 +216,6 @@ describe('Chat API', function() {
218216
if(error){
219217
done.fail("Update list error: " + JSON.stringify(error));
220218
}else{
221-
expect(error).toBe(null);
222-
223219
console.info("can update list by name");
224220
done();
225221
}

spec/QB-DataSpec.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,6 @@ describe('Сustom Objects API', function() {
115115
});
116116
});
117117

118-
it ('can update a file in existing record', function(done){
119-
paramsFile.file = new File(["Hello QuickBlox cars"], "volvo.txt", {type: "text/plain",
120-
lastModified: new Date(2015, 10, 19, 17, 00, 00, 600)});
121-
122-
QB.data.updateFile('cars', paramsFile, function(err, res) {
123-
if (err) {
124-
done.fail("Upload a file to an existing record error: " + JSON.stringify(err));
125-
} else {
126-
expect(res).not.toBeNull();
127-
expect(res.name).toBe("volvo.txt");
128-
console.info('can update a file in existing record');
129-
done();
130-
}
131-
});
132-
});
133-
134118
it ('can dawnload a file from existing record', function(done){
135119
paramsFor = {
136120
id: paramsFile.id,
@@ -203,5 +187,3 @@ describe('Сustom Objects API', function() {
203187
});
204188

205189
});
206-
207-

0 commit comments

Comments
 (0)