Merge branch 'release/2.8.7' into production

This commit is contained in:
Miroslav Bajtoš 2015-01-06 08:39:57 +01:00
commit dd67ced68d
8 changed files with 69 additions and 26 deletions

View File

@ -1,3 +1,19 @@
2015-01-06, Version 2.8.7
=========================
* Change urlNotFound.js to url-not-found.js (Rand McKinney)
* Add lib/server-app.js (Rand McKinney)
* package: add versioned sl-blip dependency (Ryan Graham)
* fix User.settings.ttl can't be overridden in sub model (Clark Wang)
* Fix Change.getCheckpointModel() giving new models each call (Farid Neshat)
* Update README.md (Rand McKinney)
2014-12-15, Version 2.8.6 2014-12-15, Version 2.8.6
========================= =========================
@ -17,19 +33,16 @@
* Fix bcrypt issues for browserify (Raymond Feng) * Fix bcrypt issues for browserify (Raymond Feng)
* Allow native bcrypt for performance (Raymond Feng)
2014-12-08, Version 2.8.3
=========================
2014-12-08, Version 2.8.4 2014-12-08, Version 2.8.4
========================= =========================
* Allow native bcrypt for performance (Raymond Feng) * Allow native bcrypt for performance (Raymond Feng)
2014-12-08, Version 2.8.3
=========================
* Remove unused underscore dependency (Ryan Graham) * Remove unused underscore dependency (Ryan Graham)
@ -1251,6 +1264,14 @@
* 2.0.0-beta1 (Ritchie Martori) * 2.0.0-beta1 (Ritchie Martori)
* Bump version (Raymond Feng)
* Add postgresql to the keywords (Raymond Feng)
* updated package.json with SOAP and framework keywords (altsang)
* updated package.json with keywords and updated description (Raymond Feng)
* Make app.datasources unique per app instance (Miroslav Bajtoš) * Make app.datasources unique per app instance (Miroslav Bajtoš)
* Add RC version (Ritchie Martori) * Add RC version (Ritchie Martori)
@ -1316,6 +1337,11 @@
* Add Change model (Ritchie Martori) * Add Change model (Ritchie Martori)
2014-05-27, Version 1.8.4
=========================
2014-05-27, Version 1.8.5 2014-05-27, Version 1.8.5
========================= =========================
@ -1327,14 +1353,8 @@
* updated package.json with keywords and updated description (Raymond Feng) * updated package.json with keywords and updated description (Raymond Feng)
2014-05-27, Version 1.8.4
=========================
* Add more keywords (Raymond Feng) * Add more keywords (Raymond Feng)
* Bump version (Raymond Feng)
* app: flatten model config (Miroslav Bajtoš) * app: flatten model config (Miroslav Bajtoš)
* Fix the test for mocha 1.19.0 (Raymond Feng) * Fix the test for mocha 1.19.0 (Raymond Feng)
@ -1655,15 +1675,6 @@
* Improve jsdox documentation of app object (Miroslav Bajtoš) * Improve jsdox documentation of app object (Miroslav Bajtoš)
* Make sure methods are called in the context of the calling class (Raymond Feng)
* Start to move md to jsdoc (Ritchie Martori)
2014-01-14, Version 1.5.0
=========================
2014-01-14, Version 1.5.1 2014-01-14, Version 1.5.1
========================= =========================
@ -1674,6 +1685,10 @@
* Start to move md to jsdoc (Ritchie Martori) * Start to move md to jsdoc (Ritchie Martori)
2014-01-14, Version 1.5.0
=========================
* Replace `on` with `once` in middleware examples (Miroslav Bajtoš) * Replace `on` with `once` in middleware examples (Miroslav Bajtoš)
* Fix incorrect transports (Ritchie Martori) * Fix incorrect transports (Ritchie Martori)

View File

@ -12,6 +12,10 @@ LoopBack consists of:
* A library of Node.js modules. * A library of Node.js modules.
* [Yeoman](http://yeoman.io/) generators for scaffolding applications. * [Yeoman](http://yeoman.io/) generators for scaffolding applications.
* Client SDKs for iOS, Android, and web clients. * Client SDKs for iOS, Android, and web clients.
LoopBack tools include:
* Command-line tool `slc loopback` to create applications, models, data sources, and so on.
* StrongLoop Arc, a graphical tool for editing LoopBack applications; and for deploying and monitoring applications.
For more details, see http://loopback.io/. For more details, see http://loopback.io/.
@ -38,6 +42,10 @@ The LoopBack framework is a set of Node.js modules that you can use independentl
* [loopback-connector-soap](https://github.com/strongloop/loopback-connector-soap) * [loopback-connector-soap](https://github.com/strongloop/loopback-connector-soap)
* [loopback-connector-atg](https://github.com/strongloop/loopback-connector-atg) * [loopback-connector-atg](https://github.com/strongloop/loopback-connector-atg)
### Community Connectors
The LoopBack community has created and supports a number of additional connectors. See [Community connectors](http://docs.strongloop.com/display/LB/Community+connectors) for details.
### Components ### Components
* [loopback-component-push](https://github.com/strongloop/loopback-component-push) * [loopback-component-push](https://github.com/strongloop/loopback-component-push)
* [loopback-component-storage](https://github.com/strongloop/loopback-component-storage) * [loopback-component-storage](https://github.com/strongloop/loopback-component-storage)

View File

@ -419,7 +419,7 @@ module.exports = function(Change) {
Change.getCheckpointModel = function() { Change.getCheckpointModel = function() {
var checkpointModel = this.Checkpoint; var checkpointModel = this.Checkpoint;
if (checkpointModel) return checkpointModel; if (checkpointModel) return checkpointModel;
this.checkpoint = checkpointModel = loopback.Checkpoint.extend('checkpoint'); this.Checkpoint = checkpointModel = loopback.Checkpoint.extend('checkpoint');
assert(this.dataSource, 'Cannot getCheckpointModel(): ' + this.modelName assert(this.dataSource, 'Cannot getCheckpointModel(): ' + this.modelName
+ ' is not attached to a dataSource'); + ' is not attached to a dataSource');
checkpointModel.attachTo(this.dataSource); checkpointModel.attachTo(this.dataSource);

View File

@ -464,7 +464,7 @@ module.exports = function(User) {
// max ttl // max ttl
this.settings.maxTTL = this.settings.maxTTL || DEFAULT_MAX_TTL; this.settings.maxTTL = this.settings.maxTTL || DEFAULT_MAX_TTL;
this.settings.ttl = DEFAULT_TTL; this.settings.ttl = this.settings.ttl || DEFAULT_TTL;
UserModel.setter.password = function(plain) { UserModel.setter.password = function(plain) {
var salt = bcrypt.genSaltSync(this.constructor.settings.saltWorkFactor || SALT_WORK_FACTOR); var salt = bcrypt.genSaltSync(this.constructor.settings.saltWorkFactor || SALT_WORK_FACTOR);

View File

@ -2,6 +2,7 @@
"title": "LoopBack Documentation", "title": "LoopBack Documentation",
"content": [ "content": [
"lib/application.js", "lib/application.js",
"lib/server-app.js",
"lib/loopback.js", "lib/loopback.js",
"lib/registry.js", "lib/registry.js",
"lib/access-context.js", "lib/access-context.js",
@ -14,7 +15,7 @@
"server/middleware/static.js", "server/middleware/static.js",
"server/middleware/status.js", "server/middleware/status.js",
"server/middleware/token.js", "server/middleware/token.js",
"server/middleware/urlNotFound.js", "server/middleware/url-not-found.js",
{ "title": "Built-in models", "depth": 2 }, { "title": "Built-in models", "depth": 2 },
"common/models/access-token.js", "common/models/access-token.js",
"common/models/acl.js", "common/models/acl.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "loopback", "name": "loopback",
"version": "2.8.6", "version": "2.8.7",
"description": "LoopBack: Open Source Framework for Node.js", "description": "LoopBack: Open Source Framework for Node.js",
"homepage": "http://loopback.io", "homepage": "http://loopback.io",
"keywords": [ "keywords": [
@ -100,5 +100,8 @@
"license": { "license": {
"name": "Dual MIT/StrongLoop", "name": "Dual MIT/StrongLoop",
"url": "https://github.com/strongloop/loopback/blob/master/LICENSE" "url": "https://github.com/strongloop/loopback/blob/master/LICENSE"
},
"optionalDependencies": {
"sl-blip": "http://blip.strongloop.com/loopback@2.8.7"
} }
} }

View File

@ -28,6 +28,12 @@ describe('Change', function() {
}); });
}); });
describe('Change.getCheckpointModel()', function() {
it('Shouldnt create two models if called twice', function() {
assert.equal(Change.getCheckpointModel(), Change.getCheckpointModel());
});
});
describe('change.id', function() { describe('change.id', function() {
it('should be a hash of the modelName and modelId', function() { it('should be a hash of the modelName and modelId', function() {
var change = new Change({ var change = new Change({

View File

@ -808,4 +808,14 @@ describe('User', function() {
expect(User.accessToken.modelName, 'modelName').to.eql('AccessToken'); expect(User.accessToken.modelName, 'modelName').to.eql('AccessToken');
}); });
}); });
describe('ttl', function() {
var User2;
beforeEach(function() {
User2 = loopback.User.extend('User2', {}, { ttl: 10 });
});
it('should override ttl setting in based User model', function() {
expect(User2.settings.ttl).to.equal(10);
});
});
}); });