Merge branch 'release/2.0.0' into production

This commit is contained in:
Miroslav Bajtoš 2014-07-22 19:34:24 +02:00
commit 4d55ab82aa
4 changed files with 9 additions and 10 deletions

View File

@ -156,8 +156,7 @@ function defineModels(app, instructions) {
var code = require(data.sourceFile); var code = require(data.sourceFile);
if (typeof code === 'function') { if (typeof code === 'function') {
debug('Customizing model %s', name); debug('Customizing model %s', name);
// NOTE model.super_ is set by Node's util.inherits code(model);
code(model, model.super_);
} else { } else {
debug('Skipping model file %s - `module.exports` is not a function', debug('Skipping model file %s - `module.exports` is not a function',
data.sourceFile); data.sourceFile);

View File

@ -1,6 +1,6 @@
{ {
"name": "loopback-boot", "name": "loopback-boot",
"version": "2.0.0-beta3", "version": "2.0.0",
"description": "Convention-based bootstrapper for LoopBack applications", "description": "Convention-based bootstrapper for LoopBack applications",
"keywords": [ "keywords": [
"StrongLoop", "StrongLoop",
@ -24,7 +24,7 @@
}, },
"dependencies": { "dependencies": {
"commondir": "0.0.1", "commondir": "0.0.1",
"debug": "^0.8.1", "debug": "^1.0.4",
"lodash.clonedeep": "^2.4.1", "lodash.clonedeep": "^2.4.1",
"semver": "^2.3.0", "semver": "^2.3.0",
"toposort": "^0.2.10", "toposort": "^0.2.10",
@ -33,9 +33,9 @@
"devDependencies": { "devDependencies": {
"loopback": "^1.5.0", "loopback": "^1.5.0",
"mocha": "^1.19.0", "mocha": "^1.19.0",
"must": "^0.11.0", "must": "^0.12.0",
"supertest": "^0.13.0", "supertest": "^0.13.0",
"fs-extra": "^0.9.1", "fs-extra": "^0.10.0",
"browserify": "^4.1.8" "browserify": "^4.1.8"
} }
} }

View File

@ -56,9 +56,9 @@ describe('executor', function() {
it('defines and customizes models', function() { it('defines and customizes models', function() {
appdir.writeFileSync('models/Customer.js', 'module.exports = ' + appdir.writeFileSync('models/Customer.js', 'module.exports = ' +
function(Customer, Base) { function(Customer) {
Customer.settings._customized = 'Customer'; Customer.settings._customized = 'Customer';
Base.settings._customized = 'Base'; Customer.base.settings._customized = 'Base';
}.toString()); }.toString());
boot.execute(app, someInstructions({ boot.execute(app, someInstructions({

View File

@ -1,4 +1,4 @@
module.exports = function(Customer, Base) { module.exports = function(Customer) {
Customer.settings._customized = 'Customer'; Customer.settings._customized = 'Customer';
Base.settings._customized = 'Base'; Customer.base.settings._customized = 'Base';
}; };