Skip to content

Commit

Permalink
Stable Version 1.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Oct 5, 2014
1 parent 17deb9a commit 7ae1170
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 73 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
##### 1.0.0 - 04 October 2014

Stable Version 1.0.0

##### 1.0.0-rc.2-1 - 25 September 2014

###### Backwards compatible bug fixes
Expand Down
55 changes: 28 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ Unlike Backbone and Ember Models, angular-data does not require the use of gette

Supporting relations, computed properties, model lifecycle control and a slew of other features, angular-data is the tool for giving your data the respect it deserves.

__Latest Release:__ [1.0.0-rc.2-1](http://angular-data.pseudobry.com/)
__master:__ [1.0.0-rc.2-1](http://angular-data-next.pseudobry.com/)
__Latest Release:__ [1.0.0](https://github.com/jmdobry/angular-data/releases/tag/1.0.0)

Angular-data is in a 1.0.0 Beta. The API is rather stable and angular-data is well tested.
Angular-data is finally 1.0.0!

Although angular-data is being used in production, it's not fully 1.0.0. If you want to use Angular-data, keep an eye on the changelog. 1.0.0 will introduce strict semver (until then, minor number is bumped for breaking changes).
Angular-data 1.x will continue to see bug fixes, but all new development will be on [js-data](https://github.com/js-data/js-data) and [js-data-angular](https://github.com/jmdobry/angular-data/pull/198) (Angular-data 2.0).

## Documentation
#### A note about Angular-data 2.0 (forthcoming)
See [angular-data/pull/198](https://github.com/jmdobry/angular-data/pull/198).

## 1.x Documentation
[http://angular-data.pseudobry.com](http://angular-data.pseudobry.com)

## Project Status
Expand All @@ -37,42 +39,41 @@ var app = angular.module('myApp', ['angular-data.DS']);
```

```js
app.factory('User', function (DS) {
app.factory('Post', function (DS) {
// Simplest resource definition
return DS.defineResource('user');
return DS.defineResource('post');
});
app.factory('Comment', function (DS) {
return DS.defineResource('comment');
});
```

```js
app.controller('friendsCtrl', function ($scope, $routeParams, User) {
app.controller('postCtrl', function ($scope, $routeParams, Post, Comment) {
// it's up to your server to know how to interpret this query
// or you can teach angular-data how to understand your servers' query language
var query = {
where: {
friendIds: {
in: $routeParams.id
}
}
postId: $routeParams.id
};

User.find($routeParams.id);
User.findAll(query);
Post.find($routeParams.id);
Comment.findAll(query);

// My goodness this was easy
User.bindOne($scope, 'me', $routeParams.id);
User.bindAll($scope, 'friends', query);
Post.bindOne($scope, 'post', $routeParams.id);
Comment.bindAll($scope, 'comments', query);

// Long form
// Long form, functionally the same as above
$scope.$watch(function () {
return User.lastModified($routeParams.id);
return Post.lastModified($routeParams.id);
}, function () {
$scope.me = User.get($routeParams.id);
$scope.post = Post.get($routeParams.id);
});
$scope.$watch(function () {
// Changes when anything in the User collection is modified
return User.lastModified();
// Changes when anything in the Comment collection is modified
return Comment.lastModified();
}, function () {
$scope.friends = User.filter(query);
$scope.comments = Comment.filter(query);
});
});
```
Expand Down Expand Up @@ -101,9 +102,7 @@ app.controller('friendsCtrl', function ($scope, $routeParams, User) {
## Community
- [Mailing List](https://groups.google.com/forum/?fromgroups#!forum/angular-data) - Ask your questions!
- [Issues](https://github.com/jmdobry/angular-data/issues) - Found a bug? Feature request? Submit an issue!
- [GitHub](https://github.com/jmdobry/angular-data) - View the source code for angular-data.
- [Design Doc](https://docs.google.com/document/d/1o069KLuBH4jpwm1FCLZFwKMgM73Xi8_1JyjhSxVpidM/edit?usp=sharing) - Design document for Angular-data.
- [Contributing Guide](#Contributing)
- [Contributing Guide](https://github.com/jmdobry/angular-data/blob/master/CONTRIBUTING.md)

## Contributing

Expand All @@ -120,7 +119,9 @@ First, feel free to contact me with questions. [Mailing List](https://groups.goo

## License

Copyright (C) 2014 Jason Dobry
The MIT License (MIT)

Copyright (c) 2014 Jason Dobry

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Jason Dobry",
"name": "angular-data",
"description": "Data store for Angular.js.",
"version": "1.0.0-rc.2-1",
"version": "1.0.0",
"homepage": "http://angular-data.pseudobry.com/",
"repository": {
"type": "git",
Expand All @@ -26,11 +26,11 @@
"karma.start.js"
],
"devDependencies": {
"angular": "~1.2.22",
"angular-mocks": "~1.2.22",
"angular-cache": "~3.1.1",
"angular": "1.2.25",
"angular-mocks": "1.2.25",
"angular-cache": "3.1.1",
"observe-js": "0.3.4",
"angular-data-mocks": "1.0.0-rc.1",
"bootstrap": "~3.2.0"
"angular-data-mocks": "1.0.0",
"bootstrap": "3.2.0"
}
}
12 changes: 7 additions & 5 deletions dist/angular-data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @author Jason Dobry <jason.dobry@gmail.com>
* @file angular-data.js
* @version 1.0.0-rc.2-1 - Homepage <http://angular-data.pseudobry.com/>
* @version 1.0.0 - Homepage <http://angular-data.pseudobry.com/>
* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>
* @license MIT <https://github.com/jmdobry/angular-data/blob/master/LICENSE>
*
Expand Down Expand Up @@ -4720,8 +4720,7 @@ function DSProvider() {
try {
cache = angular.injector(['angular-data.DSCacheFactory']).get('DSCacheFactory');
} catch (err) {
$log.warn(err);
$log.warn('DSCacheFactory is unavailable. Resorting to the lesser capabilities of $cacheFactory.');
$log.debug('DSCacheFactory is unavailable. Resorting to the lesser capabilities of $cacheFactory.');
cache = angular.injector(['ng']).get('$cacheFactory');
}

Expand Down Expand Up @@ -6384,7 +6383,10 @@ function _injectRelations(definition, injected, options) {
DS.utils.forEach(definition.relationList, function (def) {
var relationName = def.relation;
var relationDef = DS.definitions[relationName];
if (relationDef && injected[def.localField]) {
if (injected[def.localField]) {
if (!relationDef) {
throw new DS.errors.R(definition.name + 'relation is defined but the resource is not!');
}
try {
injected[def.localField] = DS.inject(relationName, injected[def.localField], options);
} catch (err) {
Expand Down Expand Up @@ -7410,7 +7412,7 @@ module.exports = [function () {
* @id angular-data
* @name angular-data
* @description
* __Version:__ 1.0.0-rc.1
* __Version:__ 1.0.0
*
* ## Install
*
Expand Down
6 changes: 3 additions & 3 deletions dist/angular-data.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion guide/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h1>Respect your data</h1>
<li>Read the <a href="/documentation/guide/angular-data/overview">Guide</a></li>
<li>Explore the <a href="/documentation/guide/angular-data/overview">API</a></li>
<li>Ask a question on the <a href="https://groups.google.com/forum/?fromgroups#!forum/angular-data">Mailing List</a></li>
<li>Submit an <a href="https://github.com/jmdobry/angular-data/issues">Bug or Feature Request</a></li>
<li>Submit a <a href="https://github.com/jmdobry/angular-data/issues">Bug or Feature Request</a></li>
<li><a href="https://github.com/jmdobry/angular-data/blob/master/CONTRIBUTING.md">Contribute</a></li>
</ul>
</p>
Expand Down
6 changes: 3 additions & 3 deletions guide/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<a class="navbar-brand" data-ng-href="/"
style="padding-top: 6px; padding-bottom: 6px; color: #0088cc;">
<img class="logo-small" src="/resources/img/data_grey.png" style="height: 27px">&nbsp;
angular-data
angular-data 1.x docs
<small>Data store and caching for Angular.js</small>
</a>
</div>
Expand Down Expand Up @@ -82,7 +82,7 @@
<i class="icon-wrench icon-white"></i> API <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li class="nav-header">Angular-data - 1.0.0-rc.1</li>
<li class="nav-header">Angular-data - 1.0.0</li>
<li>
<a href="/documentation/api/angular-data/angular-data">Overview</a>
</li>
Expand All @@ -96,7 +96,7 @@
<a href="/documentation/api/angular-data/DSLocalStorageAdapter">DSLocalStorageAdapter</a>
</li>
<li class="divider"></li>
<li class="nav-header">Angular-data-mocks - 1.0.0-rc.1</li>
<li class="nav-header">Angular-data-mocks - 1.0.0</li>
<li>
<a href="/documentation/api/angular-data-mocks/angular-data-mocks">Overview</a>
</li>
Expand Down
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-data",
"description": "Data store for Angular.js.",
"version": "1.0.0-rc.2-1",
"version": "1.0.0",
"homepage": "http://angular-data.pseudobry.com",
"repository": {
"type": "git",
Expand All @@ -19,34 +19,34 @@
}
],
"devDependencies": {
"grunt": "^0.4.5",
"grunt-browserify": "^3.0.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.5.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-karma": "^0.8.3",
"grunt-karma-coveralls": "^2.5.1",
"karma": "^0.12.23",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^0.1.4",
"karma-coverage": "^0.2.6",
"karma-script-launcher": "^0.1.0",
"karma-firefox-launcher": "^0.1.3",
"karma-phantomjs-launcher": "^0.1.4",
"karma-mocha": "^0.1.9",
"karma-sinon": "^1.0.3",
"karma-spec-reporter": "^0.0.13",
"time-grunt": "^1.0.0",
"jit-grunt": "^0.8.0",
"grunt-docular": "^0.1.4"
"grunt": "0.4.5",
"grunt-browserify": "3.0.1",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-concat": "0.5.0",
"grunt-contrib-copy": "0.6.0",
"grunt-contrib-jshint": "0.10.0",
"grunt-contrib-uglify": "0.6.0",
"grunt-contrib-watch": "0.6.1",
"grunt-karma": "0.9.0",
"grunt-karma-coveralls": "2.5.2",
"karma": "0.12.24",
"karma-chai": "0.1.0",
"karma-chrome-launcher": "0.1.5",
"karma-coverage": "0.2.6",
"karma-script-launcher": "0.1.0",
"karma-firefox-launcher": "0.1.3",
"karma-phantomjs-launcher": "0.1.4",
"karma-mocha": "0.1.9",
"karma-sinon": "1.0.3",
"karma-spec-reporter": "0.0.13",
"time-grunt": "1.0.0",
"jit-grunt": "0.8.0",
"grunt-docular": "0.1.4"
},
"scripts": {
"test": "grunt test"
},
"dependencies": {
"mout": "^0.10.0"
"mout": "0.10.0"
}
}
3 changes: 1 addition & 2 deletions src/datastore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,7 @@ function DSProvider() {
try {
cache = angular.injector(['angular-data.DSCacheFactory']).get('DSCacheFactory');
} catch (err) {
$log.warn(err);
$log.warn('DSCacheFactory is unavailable. Resorting to the lesser capabilities of $cacheFactory.');
$log.debug('DSCacheFactory is unavailable. Resorting to the lesser capabilities of $cacheFactory.');
cache = angular.injector(['ng']).get('$cacheFactory');
}

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @id angular-data
* @name angular-data
* @description
* __Version:__ 1.0.0-rc.1
* __Version:__ 1.0.0
*
* ## Install
*
Expand Down

0 comments on commit 7ae1170

Please sign in to comment.