Skip to content

Commit

Permalink
Stable Version 0.5.0.
Browse files Browse the repository at this point in the history
Closes #4.
Closes #5.
  • Loading branch information
jmdobry committed Jul 10, 2015
1 parent aeeba88 commit ea0c5af
Show file tree
Hide file tree
Showing 8 changed files with 606 additions and 72 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
##### 0.5.0 - 10 July 2015

Upgraded dependencies

###### Backwards compatible API changes
- #4 - Add support for loading relations in find()
- #5 - Add support for loading relations in findAll()

##### 0.4.0 - 02 July 2015

Stable Version 0.4.0
Expand Down
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module.exports = function (grunt) {
},
externals: [
'mout/string/underscore',
'mout/array/unique',
'mout/array/map',
'js-data',
'mongodb',
Expand Down
268 changes: 228 additions & 40 deletions dist/js-data-mongodb.js

Large diffs are not rendered by default.

21 changes: 17 additions & 4 deletions mocha.start.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@

var assert = require('chai').assert;
var mocha = require('mocha');
var sinon = require('sinon');
var JSData = require('js-data');
JSData.DSUtils.Promise = require('bluebird');
var DSMongoDBAdapter = require('./');

var adapter, store, DSUtils, DSErrors, User, Post, Comment;
var adapter, store, DSUtils, DSErrors, Profile, User, Post, Comment;

var globals = module.exports = {
fail: function (msg) {
Expand All @@ -34,7 +33,6 @@ var globals = module.exports = {
}],
TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false],
assert: assert,
sinon: sinon,
adapter: undefined
};

Expand All @@ -57,6 +55,9 @@ beforeEach(function () {
store.registerAdapter('mongo', adapter, { 'default': true });
DSUtils = JSData.DSUtils;
DSErrors = JSData.DSErrors;
globals.Profile = global.Profile = Profile = store.defineResource({
name: 'profile'
});
globals.User = global.User = User = store.defineResource({
name: 'user',
relations: {
Expand All @@ -65,6 +66,12 @@ beforeEach(function () {
localField: 'posts',
foreignKey: 'post'
}
},
hasOne: {
profile: {
localField: 'profile',
localKey: 'profileId'
}
}
}
});
Expand Down Expand Up @@ -115,7 +122,13 @@ afterEach(function (done) {
globals.adapter = null;
global.adapter = null;

adapter.destroyAll(User, {}).then(function () {
adapter.destroyAll(Comment).then(function () {
return adapter.destroyAll(Post);
}).then(function () {
return adapter.destroyAll(User);
}).then(function () {
return adapter.destroyAll(Profile);
}).then(function () {
done();
}, done);
});
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-data-mongodb",
"description": "MongoDB adapter for js-data.",
"version": "0.4.0",
"version": "0.5.0",
"homepage": "http://www.js-data.io/docs/dsmongodbadapter",
"repository": {
"type": "git",
Expand All @@ -27,9 +27,9 @@
"mongodb"
],
"devDependencies": {
"babel-core": "5.6.15",
"babel-loader": "5.2.2",
"bluebird": "^2.9.30",
"babel-core": "5.6.17",
"babel-loader": "5.3.1",
"bluebird": "2.9.33",
"chai": "3.0.0",
"grunt": "0.4.5",
"grunt-contrib-watch": "0.6.1",
Expand All @@ -39,7 +39,6 @@
"jit-grunt": "0.9.1",
"jshint": "2.8.0",
"jshint-loader": "0.8.3",
"sinon": "1.14.1",
"time-grunt": "1.2.1",
"webpack-dev-server": "1.10.1"
},
Expand Down
Loading

0 comments on commit ea0c5af

Please sign in to comment.