Skip to content

Commit adc7ed3

Browse files
committed
Fixes #113. Closes #114.
1 parent 8e1b21d commit adc7ed3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+476
-317
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
##### 0.10.5 - 11 August 2014
2+
3+
###### Backwards compatible API changes
4+
- #114 - Include resourceName in error messages
5+
6+
###### Backwards compatible bug fixes
7+
- #113 - FindAll with object as a result
8+
19
##### 0.10.4 - 04 August 2014
210

311
###### Breaking API changes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__Data store for Angular.js.__
44

55
__Latest Release:__ [0.10.4](http://angular-data.pseudobry.com/)
6-
__master:__ [0.10.4](http://angular-data-next.pseudobry.com/)
6+
__master:__ [0.10.5](http://angular-data-next.pseudobry.com/)
77

88
Angular-data is approaching 1.0.0 Beta. The API is stabilizing and angular-data is well tested.
99

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Jason Dobry",
33
"name": "angular-data",
44
"description": "Data store for Angular.js.",
5-
"version": "0.10.4",
5+
"version": "0.10.5",
66
"homepage": "http://angular-data.pseudobry.com/",
77
"repository": {
88
"type": "git",

dist/angular-data.js

Lines changed: 163 additions & 111 deletions
Large diffs are not rendered by default.

dist/angular-data.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

guide/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<i class="icon-wrench icon-white"></i> API <b class="caret"></b>
7373
</a>
7474
<ul class="dropdown-menu">
75-
<li class="nav-header">Angular-data - 0.10.4</li>
75+
<li class="nav-header">Angular-data - 0.10.5</li>
7676
<li>
7777
<a href="/documentation/api/angular-data/angular-data">Overview</a>
7878
</li>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-data",
33
"description": "Data store for Angular.js.",
4-
"version": "0.10.4",
4+
"version": "0.10.5",
55
"homepage": "http://angular-data.pseudobry.com",
66
"repository": {
77
"type": "git",

src/datastore/async_methods/create.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
var errorPrefix = 'DS.create(resourceName, attrs[, options]): ';
1+
function errorPrefix(resourceName) {
2+
return 'DS.create(' + resourceName + ', attrs[, options]): ';
3+
}
24

35
/**
46
* @doc method
@@ -52,9 +54,9 @@ function create(resourceName, attrs, options) {
5254
options = options || {};
5355

5456
if (!this.definitions[resourceName]) {
55-
throw new this.errors.NER(errorPrefix + resourceName);
57+
throw new this.errors.NER(errorPrefix(resourceName) + resourceName);
5658
} else if (!this.utils.isObject(attrs)) {
57-
throw new this.errors.IA(errorPrefix + 'attrs: Must be an object!');
59+
throw new this.errors.IA(errorPrefix(resourceName) + 'attrs: Must be an object!');
5860
}
5961
var definition = this.definitions[resourceName];
6062
var resource = this.store[resourceName];

src/datastore/async_methods/destroy.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
var errorPrefix = 'DS.destroy(resourceName, id): ';
1+
function errorPrefix(resourceName, id) {
2+
return 'DS.destroy(' + resourceName + ', ' + id + '): ';
3+
}
24

35
/**
46
* @doc method
@@ -50,14 +52,14 @@ function destroy(resourceName, id, options) {
5052
options = options || {};
5153

5254
if (!this.definitions[resourceName]) {
53-
throw new this.errors.NER(errorPrefix + resourceName);
55+
throw new this.errors.NER(errorPrefix(resourceName, id) + resourceName);
5456
} else if (!this.utils.isString(id) && !this.utils.isNumber(id)) {
55-
throw new this.errors.IA(errorPrefix + 'id: Must be a string or a number!');
57+
throw new this.errors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!');
5658
}
5759

5860
var item = this.get(resourceName, id);
5961
if (!item) {
60-
throw new this.errors.R(errorPrefix + 'id: "' + id + '" not found!');
62+
throw new this.errors.R(errorPrefix(resourceName, id) + 'id: "' + id + '" not found!');
6163
}
6264

6365
var definition = this.definitions[resourceName];

src/datastore/async_methods/destroyAll.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
var errorPrefix = 'DS.destroyAll(resourceName, params[, options]): ';
1+
function errorPrefix(resourceName) {
2+
return 'DS.destroyAll(' + resourceName + ', params[, options]): ';
3+
}
24

35
/**
46
* @doc method
@@ -64,11 +66,11 @@ function destroyAll(resourceName, params, options) {
6466
options = options || {};
6567

6668
if (!this.definitions[resourceName]) {
67-
throw new this.errors.NER(errorPrefix + resourceName);
69+
throw new this.errors.NER(errorPrefix(resourceName) + resourceName);
6870
} else if (!this.utils.isObject(params)) {
69-
throw new IA(errorPrefix + 'params: Must be an object!');
71+
throw new IA(errorPrefix(resourceName) + 'params: Must be an object!');
7072
} else if (!this.utils.isObject(options)) {
71-
throw new IA(errorPrefix + 'options: Must be an object!');
73+
throw new IA(errorPrefix(resourceName) + 'options: Must be an object!');
7274
}
7375

7476
var definition = this.definitions[resourceName];

0 commit comments

Comments
 (0)