Skip to content
Browse files

Release 0.5.0

  • Loading branch information...
1 parent 82dd0a0 commit 1051c038ecaa5f76d1a7aa02fe69390d289ce4e6 @fengmk2 fengmk2 committed
Showing with 64 additions and 36 deletions.
  1. +14 −0 History.md
  2. +3 −2 Makefile
  3. +3 −3 Readme.md
  4. +3 −2 package.json
  5. +41 −29 test_results.md
View
14 History.md
@@ -1,3 +1,17 @@
+
+0.5.0 / 2012-12-29
+==================
+
+ * fixed unsafe mode warnning log
+ * Merge pull request #84 from kingpearl/master
+ * MongoDB 1.2.x support
+ * Merge pull request #73 from jockster/master
+ * Merge pull request #75 from voke/patch-1
+ * Fix typo
+ * fixed bind() test cases;
+ * Minor error in readme. Now updated
+ * Updated readme according to issue #72
+
0.3.4 / 2011-03-24
* fix global leaks
View
5 Makefile
@@ -4,6 +4,7 @@ REPORTER = spec
MOCHA_OPTS =
PROJECT_DIR = $(shell pwd)
MONGOSKIN_REPLICASET = false
+JSCOVERAGE = ./node_modules/jscover/bin/jscover
SUPPORT_VERSIONS := \
1.0.0 1.0.1 1.0.2 \
1.1.0-beta 1.1.1 1.1.2 1.1.3 1.1.4
@@ -26,8 +27,8 @@ test-replicaset:
@$(MAKE) test MONGOSKIN_REPLICASET=true
lib-cov:
- @rm -rf ./$@
- @jscoverage --encoding=utf-8 ./lib ./$@
+ @rm -rf $@
+ @$(JSCOVERAGE) lib $@
test-cov: lib-cov
@MONGOSKIN_COV=1 $(MAKE) test REPORTER=dot
View
6 Readme.md
@@ -14,12 +14,12 @@ The api is same to node-mongodb-native, please see the [document](http://mongodb
* <del>>= 0.9.8 < 1.0.0</del>: mongodb have bug, it will throw a `TypeError: object is not a function`
when connection open error.
-* 1.0.x
-* 1.1.x
+* <del>1.0.x</del>
+* <del>1.1.x</del>
* 1.2.x
```bash
-$ make test-version
+$ make test
```
<a name='index'>
View
5 package.json
@@ -1,7 +1,7 @@
{
"name": "mongoskin",
"description": "The future layer above node-mongodb-native",
- "version": "0.4.4",
+ "version": "0.5.0",
"author": "Gui Lin <guileen@gmail.com>",
"homepage": "https://github.com/kissjs/node-mongoskin",
"repository": {
@@ -25,10 +25,11 @@
},
"devDependencies": {
"mocha": "*",
+ "jscover": "*",
"should": "*"
},
"scripts": {
- "test": "make test-version"
+ "test": "make test"
},
"directories": {
"example": "./examples",
View
70 test_results.md
@@ -28,11 +28,11 @@ Already up-to-date.
- [router.js](#routerjs)
- [server.js](#serverjs)
- [utils.js](#utilsjs)
-<a name="" />
+<a name=""></a>
-<a name="adminjs" />
+<a name="adminjs"></a>
# admin.js
-<a name="adminjs-open" />
+<a name="adminjs-open"></a>
## open()
should return admin.
@@ -74,11 +74,11 @@ skinAdmin.open(function (err, admin) {
});
```
-<a name="collectionjs" />
+<a name="collectionjs"></a>
# collection.js
-<a name="collectionjs-normal" />
+<a name="collectionjs-normal"></a>
## normal
-<a name="collectionjs-normal-open" />
+<a name="collectionjs-normal-open"></a>
### open()
should return a collection.
@@ -133,7 +133,7 @@ collection.open(function (err, coll) {
});
```
-<a name="collectionjs-normal-id" />
+<a name="collectionjs-normal-id"></a>
### id()
should convert string id to ObjectID success.
@@ -157,7 +157,7 @@ ids.forEach(function (id) {
});
```
-<a name="collectionjs-normal-find-finditems-findeach" />
+<a name="collectionjs-normal-find-finditems-findeach"></a>
### find(), findItems(), findEach()
should find().toArray() return 100 comments.
@@ -239,7 +239,7 @@ db.comment.findEach({}, {limit: 20}, function (err, comment) {
});
```
-<a name="collectionjs-normal-find-finditems-findeach-mock-find-error" />
+<a name="collectionjs-normal-find-finditems-findeach-mock-find-error"></a>
#### mock find() error
should findItems() error.
@@ -263,9 +263,9 @@ db.comment.findEach(function (err, docs) {
});
```
-<a name="collectionjs-normal-findbyid-updatebyid-removebyid" />
+<a name="collectionjs-normal-findbyid-updatebyid-removebyid"></a>
### findById(), updateById(), removeById()
-<a name="collectionjs-normal-findbyid-updatebyid-removebyid-findbyid" />
+<a name="collectionjs-normal-findbyid-updatebyid-removebyid-findbyid"></a>
#### findById()
should find one object by ObjectID.
@@ -305,7 +305,7 @@ db.article.findById('foo', function (err, article) {
});
```
-<a name="collectionjs-normal-findbyid-updatebyid-removebyid-updatebyid" />
+<a name="collectionjs-normal-findbyid-updatebyid-removebyid-updatebyid"></a>
#### updateById()
should update obj by id.
@@ -317,9 +317,10 @@ var doc = {
updated_at: updatedTime
}
};
-db.article.updateById(articleId.toString(), doc, function (err, article) {
+db.article.updateById(articleId.toString(), doc, function (err, success, result) {
should.not.exist(err);
- should.not.exist(article);
+ success.should.equal(1);
+ result.should.have.property('ok', 1);
db.article.findById(articleId, function (err, article) {
should.not.exist(err);
should.exist(article);
@@ -331,7 +332,7 @@ db.article.updateById(articleId.toString(), doc, function (err, article) {
});
```
-<a name="collectionjs-normal-findbyid-updatebyid-removebyid-removebyid" />
+<a name="collectionjs-normal-findbyid-updatebyid-removebyid-removebyid"></a>
#### removeById()
should remove obj by id.
@@ -340,9 +341,9 @@ var id = articleId.toString();
db.article.findById(id, function (err, article) {
should.not.exist(err);
should.exist(article);
- db.article.removeById(id, function (err, article) {
+ db.article.removeById(id, function (err, success) {
should.not.exist(err);
- should.not.exist(article);
+ success.should.equal(1);
db.article.findById(id, function (err, article) {
should.not.exist(err);
should.not.exist(article);
@@ -352,11 +353,22 @@ db.article.findById(id, function (err, article) {
});
```
-<a name="cursorjs" />
+should remove not exists obj.
+
+```js
+var id = articleId.toString();
+db.article.removeById(id, function (err, success) {
+ should.not.exist(err);
+ success.should.equal(0);
+ done();
+});
+```
+
+<a name="cursorjs"></a>
# cursor.js
-<a name="cursorjs-normal" />
+<a name="cursorjs-normal"></a>
## normal
-<a name="cursorjs-normal-new-skincursor" />
+<a name="cursorjs-normal-new-skincursor"></a>
### new SkinCursor()
should state is open when cursor exists.
@@ -372,7 +384,7 @@ var cursor = new SkinCursor(null, {});
cursor.should.have.property('state', constant.STATE_CLOSE);
```
-<a name="cursorjs-normal-open" />
+<a name="cursorjs-normal-open"></a>
### open()
should success when state is close.
@@ -428,7 +440,7 @@ cursor.open(function (err, mockCursor) {
});
```
-<a name="cursorjs-normal-sort-limit-skip-toarray-count-explain" />
+<a name="cursorjs-normal-sort-limit-skip-toarray-count-explain"></a>
### sort(), limit(), skip(), toArray(), count(), explain()
should cursor.skip(10).limit(10).toArray() return 10 rows.
@@ -479,11 +491,11 @@ db.testCursor.find({index: {$gt: 50}}).explain(function (err, result) {
});
```
-<a name="dbjs" />
+<a name="dbjs"></a>
# db.js
-<a name="dbjs-normal" />
+<a name="dbjs-normal"></a>
## normal
-<a name="dbjs-normal-bind" />
+<a name="dbjs-normal-bind"></a>
### bind()
should throw error when collection name wrong.
@@ -558,7 +570,7 @@ db.notExistsCollection.count(function (err, count) {
});
```
-<a name="dbjs-normal-gridfs" />
+<a name="dbjs-normal-gridfs"></a>
### gridfs()
should start gridfs store.
@@ -567,7 +579,7 @@ db.gridfs();
db.should.have.property('skinGridStore');
```
-<a name="dbjs-normal-open" />
+<a name="dbjs-normal-open"></a>
### open()
should open a database connection.
@@ -666,7 +678,7 @@ db.open(function (err, db) {
});
```
-<a name="dbjs-normal-close" />
+<a name="dbjs-normal-close"></a>
### close()
should close a database connection.
@@ -701,7 +713,7 @@ for (var i = 0; i < 100; i++) {
}
```
-<a name="dbjs-normal-ensureindex" />
+<a name="dbjs-normal-ensureindex"></a>
### ensureIndex()
should index infos is empty.

0 comments on commit 1051c03

Please sign in to comment.
Something went wrong with that request. Please try again.