diff --git a/CHANGELOG.md b/CHANGELOG.md
index 05391f8..5fba3c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+##### 2.3.0 - 15 April 2015
+
+###### Backwards compatible API changes
+- #328 - Add support for `js-data-sql` adapter
+
+###### Backwards compatible bug fixes
+- #328 - Fixed adapter registration
+
##### 2.2.3 - 08 March 2015
###### Other
diff --git a/Gruntfile.js b/Gruntfile.js
index ca7988b..260ac9a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -104,11 +104,11 @@ module.exports = function (grunt) {
},
module: {
loaders: [
- { test: /(src)(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict' }
+ { test: /(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict' }
],
preLoaders: [
{
- test: /(src)(.+)\.js$|(test)(.+)\.js$/, // include .js files
+ test: /(.+)\.js$/, // include .js files
exclude: /node_modules/, // exclude any and all files in the node_modules folder
loader: "jshint-loader?failOnHint=true"
}
diff --git a/bower.json b/bower.json
index a1f3e2a..4c785fa 100644
--- a/bower.json
+++ b/bower.json
@@ -28,7 +28,10 @@
"angular-mocks-1.3.2": "angular-mocks#1.3.2"
},
"dependencies": {
- "js-data": ">=1.1.0",
- "angular": ">=1.0.3"
+ "js-data": ">=1.5.7",
+ "angular": ">=1.1.0"
+ },
+ "resolutions": {
+ "angular": "1.3.2"
}
}
diff --git a/circle.yml b/circle.yml
index 74b0946..7ffcd64 100644
--- a/circle.yml
+++ b/circle.yml
@@ -1,3 +1,7 @@
+general:
+ branches:
+ ignore:
+ - gh-pages # list of branches to ignore
dependencies:
pre:
- bower install
diff --git a/dist/js-data-angular.js b/dist/js-data-angular.js
index bacca2a..b6bc7ea 100644
--- a/dist/js-data-angular.js
+++ b/dist/js-data-angular.js
@@ -1,6 +1,6 @@
/*!
* js-data-angular
- * @version 2.2.3 - Homepage
+ * @version 2.3.0 - Homepage
* @author Jason Dobry
* @copyright (c) 2014-2015 Jason Dobry
* @license MIT
@@ -63,10 +63,13 @@ return /******/ (function(modules) { // webpackBootstrap
/* 0 */
/***/ function(module, exports, __webpack_require__) {
- var _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
+ var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
- var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
+ var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
/*jshint loopfunc:true*/
var angular = undefined,
JSData = undefined;
@@ -80,7 +83,7 @@ return /******/ (function(modules) { // webpackBootstrap
} catch (e) {}
}
if (!JSData) {
- throw new Error("js-data must be loaded!");
+ throw new Error('js-data must be loaded!');
}
try {
angular = __webpack_require__(2);
@@ -92,7 +95,7 @@ return /******/ (function(modules) { // webpackBootstrap
} catch (e) {}
}
if (!angular) {
- throw new Error("angular must be loaded!");
+ throw new Error('angular must be loaded!');
}
var DSUtils = JSData.DSUtils;
@@ -106,24 +109,28 @@ return /******/ (function(modules) { // webpackBootstrap
var httpLoaded = false;
var adapters = [{
- project: "js-data-http",
- name: "http",
- "class": "DSHttpAdapter"
+ project: 'js-data-http',
+ name: 'http',
+ 'class': 'DSHttpAdapter'
}, {
- project: "js-data-localstorage",
- name: "localstorage",
- "class": "DSLocalStorageAdapter"
+ project: 'js-data-localstorage',
+ name: 'localstorage',
+ 'class': 'DSLocalStorageAdapter'
}, {
- project: "js-data-localforage",
- name: "localforage",
- "class": "DSLocalForageAdapter"
+ project: 'js-data-localforage',
+ name: 'localforage',
+ 'class': 'DSLocalForageAdapter'
}, {
- project: "js-data-firebase",
- name: "firebase",
- "class": "DSFirebaseAdapter"
+ project: 'js-data-firebase',
+ name: 'firebase',
+ 'class': 'DSFirebaseAdapter'
+ }, {
+ project: 'js-data-sql',
+ name: 'sql',
+ 'class': 'DSSqlAdapter'
}];
- var functionsToWrap = ["compute", "digest", "eject", "inject", "link", "linkAll", "linkInverse", "unlinkInverse"];
+ var functionsToWrap = ['compute', 'digest', 'eject', 'inject', 'link', 'linkAll', 'linkInverse', 'unlinkInverse'];
function registerAdapter(adapter) {
var Adapter = undefined;
@@ -133,15 +140,15 @@ return /******/ (function(modules) { // webpackBootstrap
} catch (e) {}
if (!Adapter) {
- Adapter = window[adapter["class"]];
+ Adapter = window[adapter['class']];
}
if (Adapter) {
- if (adapter.name === "http") {
+ if (adapter.name === 'http') {
httpLoaded = true;
}
adapter.loaded = true;
- angular.module("js-data").provider(adapter["class"], function () {
+ angular.module('js-data').provider(adapter['class'], function () {
var _this = this;
_this.defaults = {};
_this.$get = [function () {
@@ -159,7 +166,7 @@ return /******/ (function(modules) { // webpackBootstrap
for (var i = 0; i < adapters.length; i++) {
if (adapters[i].loaded) {
- deps.push(adapters[i]["class"]);
+ deps.push(adapters[i]['class']);
}
}
@@ -173,11 +180,11 @@ return /******/ (function(modules) { // webpackBootstrap
if (!_this.definitions[resourceName]) {
throw new DSErrors.NER(resourceName);
} else if (!DSUtils.isObject(params)) {
- throw new DSErrors.IA("\"params\" must be an object!");
+ throw new DSErrors.IA('"params" must be an object!');
} else if (!DSUtils.isObject(scope)) {
- throw new DSErrors.IA("\"scope\" must be an object!");
+ throw new DSErrors.IA('"scope" must be an object!');
} else if (!DSUtils.isString(expr)) {
- throw new DSErrors.IA("\"expr\" must be a string!");
+ throw new DSErrors.IA('"expr" must be a string!');
}
try {
@@ -206,11 +213,11 @@ return /******/ (function(modules) { // webpackBootstrap
if (!_this.definitions[resourceName]) {
throw new DSErrors.NER(resourceName);
} else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) {
- throw new DSErrors.IA("\"id\" must be a string or a number!");
+ throw new DSErrors.IA('"id" must be a string or a number!');
} else if (!DSUtils.isObject(scope)) {
- throw new DSErrors.IA("\"scope\" must be an object!");
+ throw new DSErrors.IA('"scope" must be an object!');
} else if (!DSUtils.isString(expr)) {
- throw new DSErrors.IA("\"expr\" must be a string!");
+ throw new DSErrors.IA('"expr" must be a string!');
}
try {
@@ -267,33 +274,36 @@ return /******/ (function(modules) { // webpackBootstrap
if (adapters[j].loaded && !adapters[j].registered) {
adapters[j].registered = true;
store.registerAdapter(adapters[j].name, args[i]);
+ break;
}
}
}
}
+ var _loop = function () {
+ var name = functionsToWrap[k];
+ originals[name] = store[name];
+ store[name] = function () {
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ if (!$rootScope.$$phase) {
+ return $rootScope.$apply(function () {
+ return originals[name].apply(store, args);
+ });
+ }
+ return originals[name].apply(store, args);
+ };
+ };
+
// Wrap certain sync functions with $apply
for (var k = 0; k < functionsToWrap.length; k++) {
- (function () {
- var name = functionsToWrap[k];
- originals[name] = store[name];
- store[name] = function () {
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
- }
-
- if (!$rootScope.$$phase) {
- return $rootScope.$apply(function () {
- return originals[name].apply(store, args);
- });
- }
- return originals[name].apply(store, args);
- };
- })();
+ _loop();
}
// Hook into the digest loop
- if (typeof Object.observe !== "function" || typeof Array.observe !== "function") {
+ if (typeof Object.observe !== 'function' || typeof Array.observe !== 'function') {
$rootScope.$watch(function () {
return store.observe.Platform.performMicrotaskCheckpoint();
});
@@ -302,14 +312,14 @@ return /******/ (function(modules) { // webpackBootstrap
return store;
}
- deps.push("$rootScope");
- deps.push("$q");
+ deps.push('$rootScope');
+ deps.push('$q');
deps.push(load);
_this.$get = deps;
};
- angular.module("js-data", ["ng"]).value("DSUtils", JSData.DSUtils).value("DSErrors", JSData.DSErrors).provider("DS", DSProvider);
+ angular.module('js-data', ['ng']).value('DSUtils', JSData.DSUtils).value('DSErrors', JSData.DSErrors).provider('DS', DSProvider);
for (var i = 0; i < adapters.length; i++) {
registerAdapter(adapters[i]);
@@ -322,38 +332,37 @@ return /******/ (function(modules) { // webpackBootstrap
_classCallCheck(this, Defaults);
}
- _createClass(Defaults, {
- queryTransform: {
- value: function queryTransform(resourceConfig, params) {
- return params;
- }
- },
- deserialize: {
- value: function deserialize(resourceConfig, data) {
- return data ? "data" in data ? data.data : data : data;
- }
- },
- serialize: {
- value: function serialize(resourceConfig, data) {
- return data;
- }
- },
- log: {
- value: function log() {}
- },
- error: {
- value: function error() {}
+ _createClass(Defaults, [{
+ key: 'queryTransform',
+ value: function queryTransform(resourceConfig, params) {
+ return params;
}
- });
+ }, {
+ key: 'deserialize',
+ value: function deserialize(resourceConfig, data) {
+ return data ? 'data' in data ? data.data : data : data;
+ }
+ }, {
+ key: 'serialize',
+ value: function serialize(resourceConfig, data) {
+ return data;
+ }
+ }, {
+ key: 'log',
+ value: function log() {}
+ }, {
+ key: 'error',
+ value: function error() {}
+ }]);
return Defaults;
})();
var defaultsPrototype = Defaults.prototype;
- defaultsPrototype.basePath = "";
+ defaultsPrototype.basePath = '';
- defaultsPrototype.forceTrailingSlash = "";
+ defaultsPrototype.forceTrailingSlash = '';
defaultsPrototype.httpConfig = {};
@@ -364,171 +373,170 @@ return /******/ (function(modules) { // webpackBootstrap
this.defaults = new Defaults();
if (console) {
this.defaults.log = function (a, b) {
- return console[typeof console.info === "function" ? "info" : "log"](a, b);
+ return console[typeof console.info === 'function' ? 'info' : 'log'](a, b);
};
}
if (console) {
this.defaults.error = function (a, b) {
- return console[typeof console.error === "function" ? "error" : "log"](a, b);
+ return console[typeof console.error === 'function' ? 'error' : 'log'](a, b);
};
}
deepMixIn(this.defaults, options);
}
- _createClass(DSHttpAdapter, {
- getPath: {
- value: function getPath(method, resourceConfig, id, options) {
- var _this = this;
- options = options || {};
- var args = [options.basePath || _this.defaults.basePath || resourceConfig.basePath, resourceConfig.getEndpoint(isString(id) || isNumber(id) || method === "create" ? id : null, options)];
- if (method === "find" || method === "update" || method === "destroy") {
- args.push(id);
- }
- return makePath.apply(DSUtils, args);
- }
- },
- GET: {
- value: function GET(url, config) {
- config = config || {};
- if (!("method" in config)) {
- config.method = "get";
- }
- return this.HTTP(deepMixIn(config, {
- url: url
- }));
- }
- },
- POST: {
- value: function POST(url, attrs, config) {
- config = config || {};
- config = DSUtils.copy(config);
- if (!("method" in config)) {
- config.method = "post";
- }
- return this.HTTP(deepMixIn(config, {
- url: url,
- data: attrs
- }));
- }
- },
- PUT: {
- value: function PUT(url, attrs, config) {
- config = config || {};
- if (!("method" in config)) {
- config.method = "put";
- }
- return this.HTTP(deepMixIn(config, {
- url: url,
- data: attrs || {}
- }));
- }
- },
- DEL: {
- value: function DEL(url, config) {
- config = config || {};
- if (!("method" in config)) {
- config.method = "delete";
- }
- return this.HTTP(deepMixIn(config, {
- url: url
- }));
+ _createClass(DSHttpAdapter, [{
+ key: 'getPath',
+ value: function getPath(method, resourceConfig, id, options) {
+ var _this = this;
+ options = options || {};
+ var args = [options.basePath || _this.defaults.basePath || resourceConfig.basePath, resourceConfig.getEndpoint(isString(id) || isNumber(id) || method === 'create' ? id : null, options)];
+ if (method === 'find' || method === 'update' || method === 'destroy') {
+ args.push(id);
}
- },
- find: {
- value: function find(resourceConfig, id, options) {
- var _this = this;
- options = options ? copy(options) : {};
- options.suffix = options.suffix || resourceConfig.suffix;
- options.params = options.params || {};
- options.params = _this.defaults.queryTransform(resourceConfig, options.params);
- return _this.GET(_this.getPath("find", resourceConfig, id, options), options).then(function (data) {
- var item = (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
- return !item ? JSData.DSUtils.Promise.reject(new Error("Not Found!")) : item;
- });
+ return makePath.apply(DSUtils, args);
+ }
+ }, {
+ key: 'GET',
+ value: function GET(url, config) {
+ config = config || {};
+ if (!('method' in config)) {
+ config.method = 'get';
}
- },
- findAll: {
- value: function findAll(resourceConfig, params, options) {
- var _this = this;
- options = options ? copy(options) : {};
- options.suffix = options.suffix || resourceConfig.suffix;
- options.params = options.params || {};
- if (params) {
- params = _this.defaults.queryTransform(resourceConfig, params);
- deepMixIn(options.params, params);
- }
- return _this.GET(_this.getPath("findAll", resourceConfig, params, options), options).then(function (data) {
- return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
- });
+ return this.HTTP(deepMixIn(config, {
+ url: url
+ }));
+ }
+ }, {
+ key: 'POST',
+ value: function POST(url, attrs, config) {
+ config = config || {};
+ config = DSUtils.copy(config);
+ if (!('method' in config)) {
+ config.method = 'post';
}
- },
- create: {
- value: function create(resourceConfig, attrs, options) {
- var _this = this;
- options = options ? copy(options) : {};
- options.suffix = options.suffix || resourceConfig.suffix;
- options.params = options.params || {};
- options.params = _this.defaults.queryTransform(resourceConfig, options.params);
- return _this.POST(_this.getPath("create", resourceConfig, attrs, options), (options.serialize ? options.serialize : _this.defaults.serialize)(resourceConfig, attrs), options).then(function (data) {
- return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
- });
+ return this.HTTP(deepMixIn(config, {
+ url: url,
+ data: attrs
+ }));
+ }
+ }, {
+ key: 'PUT',
+ value: function PUT(url, attrs, config) {
+ config = config || {};
+ if (!('method' in config)) {
+ config.method = 'put';
}
- },
- update: {
- value: function update(resourceConfig, id, attrs, options) {
- var _this = this;
- options = options ? copy(options) : {};
- options.suffix = options.suffix || resourceConfig.suffix;
- options.params = options.params || {};
- options.params = _this.defaults.queryTransform(resourceConfig, options.params);
- return _this.PUT(_this.getPath("update", resourceConfig, id, options), (options.serialize ? options.serialize : _this.defaults.serialize)(resourceConfig, attrs), options).then(function (data) {
- return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
- });
+ return this.HTTP(deepMixIn(config, {
+ url: url,
+ data: attrs || {}
+ }));
+ }
+ }, {
+ key: 'DEL',
+ value: function DEL(url, config) {
+ config = config || {};
+ if (!('method' in config)) {
+ config.method = 'delete';
}
- },
- updateAll: {
- value: function updateAll(resourceConfig, attrs, params, options) {
- var _this = this;
- options = options ? copy(options) : {};
- options.suffix = options.suffix || resourceConfig.suffix;
- options.params = options.params || {};
- if (params) {
- params = _this.defaults.queryTransform(resourceConfig, params);
- deepMixIn(options.params, params);
- }
- return this.PUT(_this.getPath("updateAll", resourceConfig, attrs, options), (options.serialize ? options.serialize : _this.defaults.serialize)(resourceConfig, attrs), options).then(function (data) {
- return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
- });
+ return this.HTTP(deepMixIn(config, {
+ url: url
+ }));
+ }
+ }, {
+ key: 'find',
+ value: function find(resourceConfig, id, options) {
+ var _this = this;
+ options = options ? copy(options) : {};
+ options.suffix = options.suffix || resourceConfig.suffix;
+ options.params = options.params || {};
+ options.params = _this.defaults.queryTransform(resourceConfig, options.params);
+ return _this.GET(_this.getPath('find', resourceConfig, id, options), options).then(function (data) {
+ var item = (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
+ return !item ? JSData.DSUtils.Promise.reject(new Error('Not Found!')) : item;
+ });
+ }
+ }, {
+ key: 'findAll',
+ value: function findAll(resourceConfig, params, options) {
+ var _this = this;
+ options = options ? copy(options) : {};
+ options.suffix = options.suffix || resourceConfig.suffix;
+ options.params = options.params || {};
+ if (params) {
+ params = _this.defaults.queryTransform(resourceConfig, params);
+ deepMixIn(options.params, params);
}
- },
- destroy: {
- value: function destroy(resourceConfig, id, options) {
- var _this = this;
- options = options ? copy(options) : {};
- options.suffix = options.suffix || resourceConfig.suffix;
- options.params = options.params || {};
- options.params = _this.defaults.queryTransform(resourceConfig, options.params);
- return _this.DEL(_this.getPath("destroy", resourceConfig, id, options), options).then(function (data) {
- return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
- });
+ return _this.GET(_this.getPath('findAll', resourceConfig, params, options), options).then(function (data) {
+ return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
+ });
+ }
+ }, {
+ key: 'create',
+ value: function create(resourceConfig, attrs, options) {
+ var _this = this;
+ options = options ? copy(options) : {};
+ options.suffix = options.suffix || resourceConfig.suffix;
+ options.params = options.params || {};
+ options.params = _this.defaults.queryTransform(resourceConfig, options.params);
+ return _this.POST(_this.getPath('create', resourceConfig, attrs, options), (options.serialize ? options.serialize : _this.defaults.serialize)(resourceConfig, attrs), options).then(function (data) {
+ return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
+ });
+ }
+ }, {
+ key: 'update',
+ value: function update(resourceConfig, id, attrs, options) {
+ var _this = this;
+ options = options ? copy(options) : {};
+ options.suffix = options.suffix || resourceConfig.suffix;
+ options.params = options.params || {};
+ options.params = _this.defaults.queryTransform(resourceConfig, options.params);
+ return _this.PUT(_this.getPath('update', resourceConfig, id, options), (options.serialize ? options.serialize : _this.defaults.serialize)(resourceConfig, attrs), options).then(function (data) {
+ return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
+ });
+ }
+ }, {
+ key: 'updateAll',
+ value: function updateAll(resourceConfig, attrs, params, options) {
+ var _this = this;
+ options = options ? copy(options) : {};
+ options.suffix = options.suffix || resourceConfig.suffix;
+ options.params = options.params || {};
+ if (params) {
+ params = _this.defaults.queryTransform(resourceConfig, params);
+ deepMixIn(options.params, params);
}
- },
- destroyAll: {
- value: function destroyAll(resourceConfig, params, options) {
- var _this = this;
- options = options ? copy(options) : {};
- options.suffix = options.suffix || resourceConfig.suffix;
- options.params = options.params || {};
- if (params) {
- params = _this.defaults.queryTransform(resourceConfig, params);
- deepMixIn(options.params, params);
- }
- return this.DEL(_this.getPath("destroyAll", resourceConfig, params, options), options).then(function (data) {
- return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
- });
+ return this.PUT(_this.getPath('updateAll', resourceConfig, attrs, options), (options.serialize ? options.serialize : _this.defaults.serialize)(resourceConfig, attrs), options).then(function (data) {
+ return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
+ });
+ }
+ }, {
+ key: 'destroy',
+ value: function destroy(resourceConfig, id, options) {
+ var _this = this;
+ options = options ? copy(options) : {};
+ options.suffix = options.suffix || resourceConfig.suffix;
+ options.params = options.params || {};
+ options.params = _this.defaults.queryTransform(resourceConfig, options.params);
+ return _this.DEL(_this.getPath('destroy', resourceConfig, id, options), options).then(function (data) {
+ return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
+ });
+ }
+ }, {
+ key: 'destroyAll',
+ value: function destroyAll(resourceConfig, params, options) {
+ var _this = this;
+ options = options ? copy(options) : {};
+ options.suffix = options.suffix || resourceConfig.suffix;
+ options.params = options.params || {};
+ if (params) {
+ params = _this.defaults.queryTransform(resourceConfig, params);
+ deepMixIn(options.params, params);
}
+ return this.DEL(_this.getPath('destroyAll', resourceConfig, params, options), options).then(function (data) {
+ return (options.deserialize ? options.deserialize : _this.defaults.deserialize)(resourceConfig, data);
+ });
}
- });
+ }]);
return DSHttpAdapter;
})();
@@ -540,17 +548,17 @@ return /******/ (function(modules) { // webpackBootstrap
var _this = this;
_this.defaults = {};
- _this.$get = ["$http", "DS", "$q", function ($http, DS, $q) {
+ _this.$get = ['$http', 'DS', '$q', function ($http, DS, $q) {
dsHttpAdapterPrototype.HTTP = function (config) {
var _this = this;
var start = new Date();
config = copy(config);
config = deepMixIn(config, _this.defaults.httpConfig);
- if (_this.defaults.forceTrailingSlash && config.url[config.url.length - 1] !== "/") {
- config.url += "/";
+ if (_this.defaults.forceTrailingSlash && config.url[config.url.length - 1] !== '/') {
+ config.url += '/';
}
config.method = config.method.toUpperCase();
- if (typeof config.data === "object") {
+ if (typeof config.data === 'object') {
config.data = removeCircular(config.data);
}
var suffix = config.suffix || _this.defaults.suffix;
@@ -559,7 +567,7 @@ return /******/ (function(modules) { // webpackBootstrap
}
function logResponse(data) {
- var str = "" + start.toUTCString() + " - " + data.config.method.toUpperCase() + " " + data.config.url + " - " + data.status + " " + (new Date().getTime() - start.getTime()) + "ms";
+ var str = '' + start.toUTCString() + ' - ' + data.config.method.toUpperCase() + ' ' + data.config.url + ' - ' + data.status + ' ' + (new Date().getTime() - start.getTime()) + 'ms';
if (data.status >= 200 && data.status < 300) {
if (_this.defaults.log) {
_this.defaults.log(str, data);
@@ -567,7 +575,7 @@ return /******/ (function(modules) { // webpackBootstrap
return data;
} else {
if (_this.defaults.error) {
- _this.defaults.error("FAILED: " + str, data);
+ _this.defaults.error('FAILED: ' + str, data);
}
return $q.reject(data);
}
@@ -577,20 +585,21 @@ return /******/ (function(modules) { // webpackBootstrap
};
var adapter = new DSHttpAdapter(_this.defaults);
- DS.registerAdapter("http", adapter, { "default": true });
+ DS.registerAdapter('http', adapter, { 'default': true });
return adapter;
}];
};
- angular.module("js-data").provider("DSHttpAdapter", DSHttpAdapterProvider);
+ angular.module('js-data').provider('DSHttpAdapter', DSHttpAdapterProvider);
})();
}
- angular.module("js-data").run(["DS", "DSHttpAdapter", function (DS, DSHttpAdapter) {
- return DS.registerAdapter("http", DSHttpAdapter, { "default": true });
+ angular.module('js-data').run(['DS', 'DSHttpAdapter', function (DS, DSHttpAdapter) {
+ return DS.registerAdapter('http', DSHttpAdapter, { 'default': true });
}]);
// return the module name
- module.exports = "js-data";
+ exports['default'] = 'js-data';
+ module.exports = exports['default'];
/***/ },
/* 1 */
diff --git a/dist/js-data-angular.min.js b/dist/js-data-angular.min.js
index 6a373d9..abdb04d 100644
--- a/dist/js-data-angular.min.js
+++ b/dist/js-data-angular.min.js
@@ -1,6 +1,6 @@
/*!
* js-data-angular
-* @version 2.2.3 - Homepage
+* @version 2.3.0 - Homepage
* @author Jason Dobry
* @copyright (c) 2014-2015 Jason Dobry
* @license MIT
@@ -8,5 +8,5 @@
* @overview Angular wrapper for js-data.
*/
-!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(function(){try{return require("js-data")}catch(a){}}(),function(){try{return require("angular")}catch(a){}}()):"function"==typeof define&&define.amd?define(["js-data","angular"],b):"object"==typeof exports?exports.jsDataAngularModuleName=b(function(){try{return require("js-data")}catch(a){}}(),function(){try{return require("angular")}catch(a){}}()):a.jsDataAngularModuleName=b(a.JSData,a.angular)}(this,function(a,b){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){function d(a){var b=void 0;try{b=c(3)(a.project)}catch(d){}b||(b=window[a["class"]]),b&&("http"===a.name&&(r=!0),a.loaded=!0,g.module("js-data").provider(a["class"],function(){var a=this;a.defaults={},a.$get=[function(){return new b(a.defaults)}]}))}var e=function(){function a(a,b){for(var c in b){var d=b[c];d.configurable=!0,d.value&&(d.writable=!0)}Object.defineProperties(a,b)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},g=void 0,h=void 0;try{h=c(1)}catch(i){}if(!h)try{h=window.JSData}catch(i){}if(!h)throw new Error("js-data must be loaded!");try{g=c(2)}catch(i){}if(!g)try{g=window.angular}catch(i){}if(!g)throw new Error("angular must be loaded!");var j=h.DSUtils,k=h.DSErrors,l=j.deepMixIn,m=j.copy,n=j.removeCircular,o=j.isString,p=j.isNumber,q=j.makePath,r=!1,s=[{project:"js-data-http",name:"http","class":"DSHttpAdapter"},{project:"js-data-localstorage",name:"localstorage","class":"DSLocalStorageAdapter"},{project:"js-data-localforage",name:"localforage","class":"DSLocalForageAdapter"},{project:"js-data-firebase",name:"firebase","class":"DSFirebaseAdapter"}],t=["compute","digest","eject","inject","link","linkAll","linkInverse","unlinkInverse"],u=function w(){function a(){function a(a){var b=i.defer();try{a.call(void 0,g.bind(b,b.resolve),g.bind(b,b.reject))}catch(c){b.reject(c)}return b.promise}for(var c=arguments.length,d=Array(c),e=0;c>e;e++)d[e]=arguments[e];var f=d[d.length-2],i=d[d.length-1],k=new h.DS(b.defaults),l={};if(a.all=i.all,a.when=i.when,a.reject=i.reject,j.Promise=a,d.length)for(var m=0;md;d++)c[d]=arguments[d];return f.$$phase?l[a].apply(k,c):f.$apply(function(){return l[a].apply(k,c)})}}();return("function"!=typeof Object.observe||"function"!=typeof Array.observe)&&f.$watch(function(){return k.observe.Platform.performMicrotaskCheckpoint()}),k}f(this,w);for(var b=this,c=[],d=0;d=200&&a.status<300?(d.defaults.log&&d.defaults.log(b,a),a):(d.defaults.error&&d.defaults.error("FAILED: "+b,a),f.reject(a))}var d=this,e=new Date;a=m(a),a=l(a,d.defaults.httpConfig),d.defaults.forceTrailingSlash&&"/"!==a.url[a.url.length-1]&&(a.url+="/"),a.method=a.method.toUpperCase(),"object"==typeof a.data&&(a.data=n(a.data));var g=a.suffix||d.defaults.suffix;return g&&a.url.substr(a.url.length-g.length)!==g&&(a.url+=g),b(a).then(c,c)};var g=new c(a.defaults);return e.registerAdapter("http",g,{"default":!0}),g}]};g.module("js-data").provider("DSHttpAdapter",i)}(),g.module("js-data").run(["DS","DSHttpAdapter",function(a,b){return a.registerAdapter("http",b,{"default":!0})}]),a.exports="js-data"},function(b){if("undefined"==typeof a){var c=new Error('Cannot find module "undefined"');throw c.code="MODULE_NOT_FOUND",c}b.exports=a},function(a){if("undefined"==typeof b){var c=new Error('Cannot find module "angular"');throw c.code="MODULE_NOT_FOUND",c}a.exports=b},function(a,b,c){function d(a){return c(e(a))}function e(a){return f[a]||function(){throw new Error("Cannot find module '"+a+"'.")}()}var f={};d.keys=function(){return Object.keys(f)},d.resolve=e,a.exports=d,d.id=3}])});
+!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(function(){try{return require("js-data")}catch(a){}}(),function(){try{return require("angular")}catch(a){}}()):"function"==typeof define&&define.amd?define(["js-data","angular"],b):"object"==typeof exports?exports.jsDataAngularModuleName=b(function(){try{return require("js-data")}catch(a){}}(),function(){try{return require("angular")}catch(a){}}()):a.jsDataAngularModuleName=b(a.JSData,a.angular)}(this,function(a,b){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){function d(a){var b=void 0;try{b=c(3)(a.project)}catch(d){}b||(b=window[a["class"]]),b&&("http"===a.name&&(r=!0),a.loaded=!0,g.module("js-data").provider(a["class"],function(){var a=this;a.defaults={},a.$get=[function(){return new b(a.defaults)}]}))}var e=function(){function a(a,b){for(var c=0;ce;e++)d[e]=arguments[e];var f=d[d.length-2],i=d[d.length-1],k=new h.DS(b.defaults),l={};if(a.all=i.all,a.when=i.when,a.reject=i.reject,j.Promise=a,d.length)for(var m=0;md;d++)c[d]=arguments[d];return f.$$phase?l[a].apply(k,c):f.$apply(function(){return l[a].apply(k,c)})}},p=0;p=200&&a.status<300?(d.defaults.log&&d.defaults.log(b,a),a):(d.defaults.error&&d.defaults.error("FAILED: "+b,a),f.reject(a))}var d=this,e=new Date;a=m(a),a=l(a,d.defaults.httpConfig),d.defaults.forceTrailingSlash&&"/"!==a.url[a.url.length-1]&&(a.url+="/"),a.method=a.method.toUpperCase(),"object"==typeof a.data&&(a.data=n(a.data));var g=a.suffix||d.defaults.suffix;return g&&a.url.substr(a.url.length-g.length)!==g&&(a.url+=g),b(a).then(c,c)};var g=new c(a.defaults);return e.registerAdapter("http",g,{"default":!0}),g}]};g.module("js-data").provider("DSHttpAdapter",i)}(),g.module("js-data").run(["DS","DSHttpAdapter",function(a,b){return a.registerAdapter("http",b,{"default":!0})}]),b["default"]="js-data",a.exports=b["default"]},function(b,c,d){if("undefined"==typeof a){var e=new Error('Cannot find module "undefined"');throw e.code="MODULE_NOT_FOUND",e}b.exports=a},function(a,c,d){if("undefined"==typeof b){var e=new Error('Cannot find module "angular"');throw e.code="MODULE_NOT_FOUND",e}a.exports=b},function(a,b,c){function d(a){return c(e(a))}function e(a){return f[a]||function(){throw new Error("Cannot find module '"+a+"'.")}()}var f={};d.keys=function(){return Object.keys(f)},d.resolve=e,a.exports=d,d.id=3}])});
//# sourceMappingURL=js-data-angular.min.map
\ No newline at end of file
diff --git a/dist/js-data-angular.min.map b/dist/js-data-angular.min.map
index c9e321e..78693aa 100644
--- a/dist/js-data-angular.min.map
+++ b/dist/js-data-angular.min.map
@@ -1 +1 @@
-{"version":3,"file":"js-data-angular.min.js","sources":["js-data-angular.js"],"names":["root","factory","exports","module","require","e","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","__WEBPACK_EXTERNAL_MODULE_2__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","registerAdapter","adapter","Adapter","undefined","project","window","name","httpLoaded","angular","provider","_this","defaults","$get","_createClass","defineProperties","target","props","key","prop","configurable","value","writable","Object","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","TypeError","JSData","Error","DSUtils","DSErrors","deepMixIn","copy","removeCircular","isString","isNumber","makePath","adapters","class","functionsToWrap","DSProvider","load","QPromise","executor","deferred","$q","defer","bind","resolve","reject","err","promise","_len","arguments","length","args","Array","_key","$rootScope","store","DS","originals","all","when","Promise","i","j","registered","k","_len2","_key2","$$phase","apply","$apply","observe","$watch","Platform","performMicrotaskCheckpoint","deps","push","bindAll","resourceName","params","scope","expr","cb","definitions","NER","isObject","IA","lastModified","items","filter","set","bindOne","resolveId","item","get","Defaults","queryTransform","resourceConfig","deserialize","data","serialize","log","error","defaultsPrototype","basePath","forceTrailingSlash","httpConfig","DSHttpAdapter","options","console","a","b","info","getPath","method","getEndpoint","GET","url","config","HTTP","POST","attrs","PUT","DEL","find","suffix","then","findAll","create","update","updateAll","destroy","destroyAll","dsHttpAdapterPrototype","DSHttpAdapterProvider","$http","logResponse","str","start","toUTCString","toUpperCase","status","Date","getTime","substr","default","run","code","webpackContext","req","webpackContextResolve","map","keys"],"mappings":";;;;;;;;;;CASA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,EAAS,WAA+C,IAAM,MAAOG,SAAQ,WAAc,MAAMC,QAAa,WAA+C,IAAM,MAAOD,SAAQ,WAAc,MAAMC,SAC9L,kBAAXC,SAAyBA,OAAOC,IAC9CD,QAAQ,UAAW,WAAYL,GACL,gBAAZC,SACdA,QAAiC,wBAAID,EAAS,WAA+C,IAAM,MAAOG,SAAQ,WAAc,MAAMC,QAAa,WAA+C,IAAM,MAAOD,SAAQ,WAAc,MAAMC,SAE3OL,EAA8B,wBAAIC,EAAQD,EAAa,OAAGA,EAAc,UACvEQ,KAAM,SAASC,EAA+BC,GACjD,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUX,OAGnC,IAAIC,GAASW,EAAiBD,IAC7BX,WACAa,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKd,EAAOD,QAASC,EAAQA,EAAOD,QAASU,GAG/DT,EAAOa,QAAS,EAGTb,EAAOD,QAvBf,GAAIY,KAqCJ,OATAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAGjBR,EAAoB,KAK/B,SAAST,EAAQD,EAASU,GAgE/B,QAASS,GAAgBC,GACvB,GAAIC,GAAUC,MAEd,KACED,EAAUX,EAAoB,GAAGU,EAAQG,SACzC,MAAOpB,IAEJkB,IACHA,EAAUG,OAAOJ,EAAQ,WAGvBC,IACmB,SAAjBD,EAAQK,OACVC,GAAa,GAEfN,E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OlD,GAAG/D,gBAAgB,OAAQiH,GAAiBsC,WAAW,OAIhEzK,EAAOD,QAAU,WAIZ,SAASC,GAEd,GAA4C,mBAAlCM,GAA+C,CAAC,GAAIJ,GAAI,GAAI+C,OAAM,iCAAkE,MAA7B/C,GAAEyK,KAAO,mBAA0BzK,EACpJF,EAAOD,QAAUO,GAIZ,SAASN,GAEd,GAA4C,mBAAlCO,GAA+C,CAAC,GAAIL,GAAI,GAAI+C,OAAM,+BAAgE,MAA7B/C,GAAEyK,KAAO,mBAA0BzK,EAClJF,EAAOD,QAAUQ,GAIZ,SAASP,EAAQD,EAASU,GAG/B,QAASmK,GAAeC,GACvB,MAAOpK,GAAoBqK,EAAsBD,IAElD,QAASC,GAAsBD,GAC9B,MAAOE,GAAIF,IAAS,WAAa,KAAM,IAAI5H,OAAM,uBAAyB4H,EAAM,SALjF,GAAIE,KAOJH,GAAeI,KAAO,WACrB,MAAOxI,QAAOwI,KAAKD,IAEpBH,EAAevG,QAAUyG,EACzB9K,EAAOD,QAAU6K,EACjBA,EAAehK,GAAK"}
\ No newline at end of file
+{"version":3,"file":"js-data-angular.min.js","sources":["js-data-angular.js"],"names":["root","factory","exports","module","require","e","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","__WEBPACK_EXTERNAL_MODULE_2__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","registerAdapter","adapter","Adapter","undefined","project","window","name","httpLoaded","angular","provider","_this","defaults","$get","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","TypeError","value","JSData","Error","DSUtils","DSErrors","deepMixIn","copy","removeCircular","isString","isNumber","makePath","adapters","class","functionsToWrap","DSProvider","load","QPromise","executor","deferred","$q","defer","bind","resolve","reject","err","promise","_len","arguments","args","Array","_key","$rootScope","store","DS","originals","all","when","Promise","j","registered","_loop","k","_len2","_key2","$$phase","apply","$apply","observe","$watch","Platform","performMicrotaskCheckpoint","deps","push","bindAll","resourceName","params","scope","expr","cb","definitions","NER","isObject","IA","lastModified","items","filter","set","bindOne","resolveId","item","get","Defaults","resourceConfig","data","defaultsPrototype","basePath","forceTrailingSlash","httpConfig","DSHttpAdapter","options","console","log","a","b","info","error","method","getEndpoint","url","config","HTTP","attrs","suffix","queryTransform","GET","getPath","then","deserialize","POST","serialize","PUT","DEL","dsHttpAdapterPrototype","DSHttpAdapterProvider","$http","logResponse","str","start","toUTCString","toUpperCase","status","Date","getTime","substr","default","run","code","webpackContext","req","webpackContextResolve","map","keys"],"mappings":";;;;;;;;;;CASA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,EAAS,WAA+C,IAAM,MAAOG,SAAQ,WAAc,MAAMC,QAAa,WAA+C,IAAM,MAAOD,SAAQ,WAAc,MAAMC,SAC9L,kBAAXC,SAAyBA,OAAOC,IAC9CD,QAAQ,UAAW,WAAYL,GACL,gBAAZC,SACdA,QAAiC,wBAAID,EAAS,WAA+C,IAAM,MAAOG,SAAQ,WAAc,MAAMC,QAAa,WAA+C,IAAM,MAAOD,SAAQ,WAAc,MAAMC,SAE3OL,EAA8B,wBAAIC,EAAQD,EAAa,OAAGA,EAAc,UACvEQ,KAAM,SAASC,EAA+BC,GACjD,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUX,OAGnC,IAAIC,GAASW,EAAiBD,IAC7BX,WACAa,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKd,EAAOD,QAASC,EAAQA,EAAOD,QAASU,GAG/DT,EAAOa,QAAS,EAGTb,EAAOD,QAvBf,GAAIY,KAqCJ,OATAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAGjBR,EAAoB,KAK/B,SAAST,EAAQD,EAASU,GAuE/B,QAASS,GAAgBC,GACvB,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"js-data-angular",
"description": "Angular wrapper for js-data.",
- "version": "2.2.3",
+ "version": "2.3.0",
"homepage": "http://www.js-data.io/docs/js-data-angular",
"repository": {
"type": "git",
@@ -20,18 +20,18 @@
],
"main": "dist/js-data-angular.js",
"devDependencies": {
- "babel-core": "^4.7.3",
- "babel-loader": "^4.1.0",
+ "babel-core": "5.1.9",
+ "babel-loader": "5.0.0",
"grunt": "0.4.5",
"grunt-contrib-clean": "0.6.0",
- "grunt-contrib-uglify": "0.8.0",
+ "grunt-contrib-uglify": "0.9.1",
"grunt-contrib-watch": "0.6.1",
"grunt-karma": "0.10.1",
"grunt-karma-coveralls": "2.5.3",
- "grunt-webpack": "^1.0.8",
+ "grunt-webpack": "1.0.8",
"jit-grunt": "0.9.1",
- "jshint": "^2.6.3",
- "jshint-loader": "^0.8.3",
+ "jshint": "2.7.0",
+ "jshint-loader": "0.8.3",
"karma": "0.12.31",
"karma-chai": "0.1.0",
"karma-chrome-launcher": "0.1.7",
@@ -41,16 +41,16 @@
"karma-phantomjs-launcher": "0.1.4",
"karma-script-launcher": "0.1.0",
"karma-sinon": "1.0.4",
- "karma-spec-reporter": "0.0.16",
+ "karma-spec-reporter": "0.0.18",
"time-grunt": "1.1.0",
- "webpack": "^1.7.2",
- "webpack-dev-server": "^1.7.0"
+ "webpack": "1.8.4",
+ "webpack-dev-server": "1.8.0"
},
"scripts": {
"test": "grunt test"
},
- "dependencies": {
+ "peerDependencies": {
"angular": ">=1.1.0",
- "js-data": ">=1.1.0"
+ "js-data": ">=1.5.7"
}
}
diff --git a/src/index.js b/src/index.js
index 8acfbbb..5ff163d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -43,27 +43,27 @@ let adapters = [
{
project: 'js-data-http',
name: 'http',
- class: 'DSHttpAdapter'
+ 'class': 'DSHttpAdapter'
},
{
project: 'js-data-localstorage',
name: 'localstorage',
- class: 'DSLocalStorageAdapter'
+ 'class': 'DSLocalStorageAdapter'
},
{
project: 'js-data-localforage',
name: 'localforage',
- class: 'DSLocalForageAdapter'
+ 'class': 'DSLocalForageAdapter'
},
{
project: 'js-data-firebase',
name: 'firebase',
- class: 'DSFirebaseAdapter'
+ 'class': 'DSFirebaseAdapter'
},
{
project: 'js-data-sql',
name: 'sql',
- class: 'DSSqlAdapter'
+ 'class': 'DSSqlAdapter'
}
];
diff --git a/test/datastore/async_methods/update.test.js b/test/datastore/async_methods/update.test.js
index bfb07b1..174cf0d 100644
--- a/test/datastore/async_methods/update.test.js
+++ b/test/datastore/async_methods/update.test.js
@@ -102,20 +102,26 @@ describe('DS.update', function () {
$httpBackend.flush();
- $httpBackend.expectPUT('http://test.angular-cache.com/user/4/comment/6', { content: 'stuff' }).respond(200, testComment2);
+ $httpBackend.expectPUT('http://test.angular-cache.com/user/4/comment/6', { content: 'stuff', other: 'stuff' }).respond(200, testComment2);
var comment = DS.inject('comment', testComment2);
- function onBeforeUpdate(resourceName, attrs) {
- attrs.other = 'stuff';
- assert.equal(resourceName, 'comment');
- assert.deepEqual(angular.toJson(attrs), angular.toJson({ content: 'stuff', other: 'stuff' }));
+ function onBeforeUpdate(resource, attrs) {
+ try {
+ attrs.other = 'stuff';
+ assert.equal(angular.toJson(attrs), angular.toJson({ content: 'stuff', other: 'stuff' }));
+ } catch (e) {
+ console.log(e.stack);
+ }
}
- function onAfterUpdate(resourceName, attrs) {
- assert.equal(resourceName, 'comment');
- assert.deepEqual(angular.toJson(attrs), angular.toJson(testComment2));
- assert.isFalse(testComment2 === attrs);
+ function onAfterUpdate(resource, attrs) {
+ try {
+ assert.deepEqual(angular.toJson(attrs), angular.toJson(testComment2));
+ assert.isFalse(testComment2 === attrs);
+ } catch (e) {
+ console.log(e.stack);
+ }
}
Comment.on('DS.beforeUpdate', onBeforeUpdate);
@@ -128,8 +134,12 @@ describe('DS.update', function () {
approvedBy: 4
}
}).then(function (comment) {
- assert.deepEqual(angular.toJson(comment), angular.toJson(testComment2));
- assert.deepEqual(angular.toJson(comment), angular.toJson(DS.get('comment', 6)));
+ try {
+ assert.deepEqual(angular.toJson(comment), angular.toJson(testComment2));
+ assert.deepEqual(angular.toJson(comment), angular.toJson(DS.get('comment', 6)));
+ } catch (e) {
+ console.log(e.stack);
+ }
}, function () {
fail('Should not have failed!');
});
@@ -147,8 +157,12 @@ describe('DS.update', function () {
approvedBy: false
}
}).then(function (comment) {
- assert.deepEqual(angular.toJson(comment), angular.toJson(testComment2));
- assert.deepEqual(angular.toJson(comment), angular.toJson(DS.get('comment', 6)));
+ try {
+ assert.deepEqual(angular.toJson(comment), angular.toJson(testComment2));
+ assert.deepEqual(angular.toJson(comment), angular.toJson(DS.get('comment', 6)));
+ } catch (e) {
+ console.log(e.stack);
+ }
}, function () {
fail('Should not have failed!');
});