Skip to content

Commit f398a35

Browse files
committed
Stable Version 1.1.1.
1 parent 0c7b229 commit f398a35

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##### 1.1.1 - 25 February 2015
2+
3+
- Updated dependencies
4+
15
##### 1.1.0 - 05 February 2015
26

37
- #3, #4 - Added the `with` option to `DSRethinkDBAdapter#find` which allows for loading relations.

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ RethinkDB adapter for [js-data](http://www.js-data.io/).
77
## API Documentation
88
[DSRethinkDBAdapter](http://www.js-data.io/docs/dsrethinkdbadapter)
99

10+
## Example App
11+
[js-data-examples/server/rethinkdb](https://github.com/js-data/js-data-examples/tree/master/server/rethinkdb)
12+
1013
## Project Status
1114

1215
| Branch | Master |
1316
| ------ | ------ |
14-
| NPM | [![NPM version](https://badge.fury.io/js/js-data-rethinkdb.png)](http://badge.fury.io/js/js-data-rethinkdb) |
17+
| NPM | [![NPM](https://nodei.co/npm/js-data-rethinkdb.png?downloads=true&stars=true)](https://nodei.co/npm/js-data-rethinkdb/) |
1518
| Build Status | [![Build Status](https://travis-ci.org/js-data/js-data-rethinkdb.png?branch=master)](https://travis-ci.org/js-data/js-data-rethinkdb) |
1619
| Code Climate | [![Code Climate](https://codeclimate.com/github/js-data/js-data-rethinkdb.png)](https://codeclimate.com/github/js-data/js-data-rethinkdb) |
1720
| Dependency Status | [![Dependency Status](https://gemnasium.com/js-data/js-data-rethinkdb.png)](https://gemnasium.com/js-data/js-data-rethinkdb) |

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-rethinkdb",
33
"description": "RethinkDB adapter for js-data.",
4-
"version": "1.1.0",
4+
"version": "1.1.1",
55
"homepage": "http://www.js-data.io/docs/dsrethinkdbadapter",
66
"repository": {
77
"type": "git",
@@ -28,15 +28,15 @@
2828
"reql"
2929
],
3030
"devDependencies": {
31-
"chai": "1.10.0",
31+
"chai": "2.1.0",
3232
"grunt": "0.4.5",
3333
"grunt-contrib-jshint": "0.11.0",
3434
"grunt-contrib-watch": "0.6.1",
3535
"grunt-karma-coveralls": "2.5.3",
36-
"grunt-mocha-test": "0.12.6",
36+
"grunt-mocha-test": "0.12.7",
3737
"jit-grunt": "0.9.1",
3838
"sinon": "1.12.2",
39-
"time-grunt": "1.0.0"
39+
"time-grunt": "1.1.0"
4040
},
4141
"scripts": {
4242
"test": "grunt test"

src/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ var isString = require('mout/lang/isString');
1111
var upperCase = require('mout/string/upperCase');
1212
var underscore = require('mout/string/underscore');
1313
var JSData = require('js-data');
14+
var P = JSData.DSUtils.Promise;
1415

1516
function Defaults() {
1617

@@ -212,7 +213,7 @@ dsRethinkDBAdapterPrototype.find = function find(resourceConfig, id, options) {
212213
tasks.push(_this.waitForIndex(resourceConfig.table || underscore(resourceConfig.name), def.localKey, options));
213214
}
214215
});
215-
return JSData.DSUtils.Promise.all(tasks).then(function () {
216+
return P.all(tasks).then(function () {
216217
return _this.r.do(_this.r.table(table).get(id), function (doc) {
217218
forEach(resourceConfig.relationList, function (def) {
218219
var relationName = def.relation;
@@ -262,7 +263,7 @@ dsRethinkDBAdapterPrototype.find = function find(resourceConfig, id, options) {
262263
}).run();
263264
}).then(function (item) {
264265
if (!item) {
265-
throw new Error('Not Found!');
266+
return P.reject(new Error('Not Found!'));
266267
} else {
267268
forOwn(item, function (localValue, localKey) {
268269
if (localKey in newModels) {

0 commit comments

Comments
 (0)