Skip to content

Commit

Permalink
Stable Version 2.1.0.
Browse files Browse the repository at this point in the history
Now requiring >= js-data 1.1.0 in order to use removeCircular.
  • Loading branch information
jmdobry committed Feb 5, 2015
1 parent a834640 commit 945c80f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
##### 2.1.0 - 04 February 2015

Now requiring >= js-data 1.1.0 in order to use removeCircular to safely safe cyclic objects

##### 2.0.0 - 03 February 2015

_Note:_ Please see the [js-data CHANGELOG](https://github.com/js-data/js-data/blob/master/CHANGELOG.md).
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"angular-mocks-1.3.2": "angular-mocks#1.3.2"
},
"dependencies": {
"js-data": ">=1.0.0",
"js-data": ">=1.1.0",
"angular": ">=1.0.3"
}
}
5 changes: 4 additions & 1 deletion dist/js-data-angular.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @author Jason Dobry <jason.dobry@gmail.com>
* @file js-data-angular.js
* @version 2.0.0 - Homepage <http://www.js-data.io/js-data-angular/>
* @version 2.1.0 - Homepage <http://www.js-data.io/js-data-angular/>
* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>
* @license MIT <https://github.com/js-data/js-data-angular/blob/master/LICENSE>
*
Expand Down Expand Up @@ -464,6 +464,9 @@
config.url += '/';
}
config.method = config.method.toUpperCase();
if (typeof config.data === 'object') {
config.data = DSUtils.removeCircular(config.data);
}

function logResponse(data) {
var str = start.toUTCString() + ' - ' + data.config.method.toUpperCase() + ' ' + data.config.url + ' - ' + data.status + ' ' + (new Date().getTime() - start.getTime()) + 'ms';
Expand Down
4 changes: 2 additions & 2 deletions dist/js-data-angular.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-data-angular",
"description": "Angular wrapper for js-data.",
"version": "2.0.0",
"version": "2.1.0",
"homepage": "http://www.js-data.io/docs/js-data-angular",
"repository": {
"type": "git",
Expand Down Expand Up @@ -46,6 +46,6 @@
},
"dependencies": {
"mout": "0.11.0",
"js-data": ">=1.0.0"
"js-data": ">=1.1.0"
}
}
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@
config.url += '/';
}
config.method = config.method.toUpperCase();
if (typeof config.data === 'object') {
config.data = DSUtils.removeCircular(config.data);
}

function logResponse(data) {
var str = start.toUTCString() + ' - ' + data.config.method.toUpperCase() + ' ' + data.config.url + ' - ' + data.status + ' ' + (new Date().getTime() - start.getTime()) + 'ms';
Expand Down
4 changes: 2 additions & 2 deletions test/datastore/async_methods/save.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ describe('DS.save', function () {
$rootScope.$apply();

DS.save('post', 5, { cacheResponse: false }).then(function (post) {
assert.deepEqual(post, {
assert.deepEqual(DS.utils.toJson(post), DS.utils.toJson({
random: 'stuff'
}, 'should have the right response');
}), 'should have the right response');
assert.equal(lifecycle.beforeUpdate.callCount, 1, 'beforeUpdate should have been called');
assert.equal(lifecycle.afterUpdate.callCount, 1, 'afterUpdate should have been called');
assert.equal(lifecycle.beforeInject.callCount, 1, 'beforeInject should have been called only once');
Expand Down

0 comments on commit 945c80f

Please sign in to comment.