From 0968f339e03c9d3bccccb27ff9afa9b48bcad53e Mon Sep 17 00:00:00 2001 From: Andrea Agili Date: Tue, 17 Jun 2014 16:44:44 +0200 Subject: [PATCH] fixed #6 superagent dependency set to 0.17.0 --- README.md | 13 ++++++------- bower.json | 7 +++---- package.json | 4 ++-- test/spec.js | 28 ++++++++++++++-------------- 4 files changed, 25 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 9624f04..02dee88 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,12 @@ A CMIS javascript library for node and browser ### browser -You can download minified version (with dependencies) from https://github.com/agea/CmisJS/releases/download/v0.1.1/cmis.0.1.1.min-all.js +You can download minified version (with dependencies) from https://github.com/agea/CmisJS/releases/download/v0.1.1/cmis.0.1.6.min-all.js - + *Note:* -You have to include [superagent](http://visionmedia.github.io/) if you want to use [cmis-0.1.1.js](https://github.com/agea/CmisJS/releases/download/v0.1.1/cmis.0.1.1.js) or [cmis-0.1.1.min.js](https://github.com/agea/CmisJS/releases/download/v0.1.1/cmis.0.1.1.min.js) +You have to include [superagent](http://visionmedia.github.io/) if you want to use [cmis-0.1.6.js](https://github.com/agea/CmisJS/releases/download/v0.1.1/cmis.0.1.1.js) or [cmis-0.1.6.min.js](https://github.com/agea/CmisJS/releases/download/v0.1.1/cmis.0.1.6.min.js) ## Usage @@ -55,7 +55,7 @@ Install grunt: Clone the repo: $ git clone https://github.com/agea/CmisJS/ - + Install dependencies: $ cd CmisJS @@ -63,12 +63,12 @@ Install dependencies: $ npm install ### Running tests on node - + (http://cmis.alfresco.com will be used as test repository) $ grunt test -You can specify different url, username and password +You can specify different url, username and password $ grunt test --url http://localhost:8080/alfresco/cmisbrowser --user admin --password secret @@ -89,4 +89,3 @@ To change username and password you can specify them in the url ##License MIT license - [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php) - diff --git a/bower.json b/bower.json index 0fd1a03..6d331af 100644 --- a/bower.json +++ b/bower.json @@ -1,11 +1,10 @@ { "name": "cmis", - "version": "0.1.5", + "version": "0.1.6", "dependencies": { - "superagent":"" + "superagent":"~0.17.0" }, "devDependencies": { - + } } - diff --git a/package.json b/package.json index 7728fae..92dffcc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "title": "CmisJS", "name": "cmis", - "version": "0.1.5", + "version": "0.1.6", "homepage": "http://github.com/agea/CmisJS", "description": "a CMIS client library written in Javascript for node and the browser", "author": { @@ -14,7 +14,7 @@ "url": "git://github.com/agea/cmisjs.git" }, "dependencies": { - "superagent": "" + "superagent": "~0.17.0" }, "devDependencies": { "grunt-cli": "", diff --git a/test/spec.js b/test/spec.js index 629e56c..54f00b4 100644 --- a/test/spec.js +++ b/test/spec.js @@ -48,7 +48,7 @@ session.setGlobalHandlers(console.log, console.log); var rootId; describe('CmisJS library test', function () { - + it('should connect to a repository', function (done) { session.setCredentials(username, password).loadRepositories() .ok(function (data) { @@ -123,7 +123,7 @@ describe('CmisJS library test', function () { queryName:'test:testDoc', fileable:true, includedInSupertypeQuery:true, - creatable:true, + creatable:true, fulltextIndexed:false, queryable:false, controllableACL:true, @@ -144,7 +144,7 @@ describe('CmisJS library test', function () { cardinality:'single', queryable:true, orderable:true, - } + } } } @@ -267,7 +267,7 @@ describe('CmisJS library test', function () { it('should return folder parent', function (done) { session.getFolderParent(randomFolderId).ok(function (data) { assert( - data.succinctProperties['cmis:objectId']==rootId, + data.succinctProperties['cmis:objectId']==rootId, "should return root folder"); done(); }); @@ -276,7 +276,7 @@ describe('CmisJS library test', function () { it('should return object parents', function (done) { session.getParents(randomFolderId).ok(function (data) { assert( - data[0].object.succinctProperties['cmis:objectId']==rootId, + data[0].object.succinctProperties['cmis:objectId']==rootId, "should return root folder"); done(); }); @@ -285,7 +285,7 @@ describe('CmisJS library test', function () { it('should return allowable actions', function (done) { session.getAllowableActions(randomFolderId).ok(function (data) { assert( - data.canCreateDocument!==undefined, + data.canCreateDocument!==undefined, "create document action should be defined"); done(); }); @@ -294,7 +294,7 @@ describe('CmisJS library test', function () { it('should return object properties', function (done) { session.getProperties(randomFolderId).ok(function (data) { assert( - data['cmis:name']==randomFolder, + data['cmis:name']==randomFolder, "folder name should be " + randomFolder); done(); }); @@ -304,11 +304,11 @@ describe('CmisJS library test', function () { session.updateProperties(firstChildId, {'cmis:name':'First Level Renamed'}).ok(function (data) { assert( - data.succinctProperties['cmis:name']=='First Level Renamed', + data.succinctProperties['cmis:name']=='First Level Renamed', "folder name should be 'First Level Renamed'"); done(); }); - }); + }); it('should move specified object', function (done) { session.moveObject(secondChildId, firstChildId, randomFolderId).ok(function (data) { @@ -316,14 +316,14 @@ describe('CmisJS library test', function () { "Parent folder id should be " + randomFolderId); done(); }); - }); + }); var docId var txt = 'this is the document content'; it('should create a document', function (done) { var aces = {} aces[username] = ['cmis:read']; - session.createDocument(randomFolderId, txt, 'test.txt', + session.createDocument(randomFolderId, txt, 'test.txt', 'text/plain', undefined, undefined, aces).ok(function (data) { docId = data.succinctProperties['cmis:objectId']; done(); @@ -331,7 +331,7 @@ describe('CmisJS library test', function () { }); it('should update properties of documents', function (done) { - session.bulkUpdateProperties([docId], + session.bulkUpdateProperties([docId], {'cmis:name':'mod-test.txt'}).ok(function (data) { assert(data,'OK'); done(); @@ -404,7 +404,7 @@ describe('CmisJS library test', function () { done(); return; } - session.checkIn(checkOutId, true, 'test-checkedin.txt', + session.checkIn(checkOutId, true, 'test-checkedin.txt', txt, 'the comment!').ok(function (data) { docId = data.succinctProperties['cmis:objectId'].split(";")[0]; done(); @@ -439,7 +439,7 @@ describe('CmisJS library test', function () { if (!appended){ console.log("skipping") done(); - return; + return; } session.getContentStream(docId).ok(function (data) { assert(data == txt+appended,'document content should be "' + txt + appended + '"');