Merge branch 'release/2.0.0' into production
This commit is contained in:
commit
4d55ab82aa
|
@ -156,8 +156,7 @@ function defineModels(app, instructions) {
|
|||
var code = require(data.sourceFile);
|
||||
if (typeof code === 'function') {
|
||||
debug('Customizing model %s', name);
|
||||
// NOTE model.super_ is set by Node's util.inherits
|
||||
code(model, model.super_);
|
||||
code(model);
|
||||
} else {
|
||||
debug('Skipping model file %s - `module.exports` is not a function',
|
||||
data.sourceFile);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "loopback-boot",
|
||||
"version": "2.0.0-beta3",
|
||||
"version": "2.0.0",
|
||||
"description": "Convention-based bootstrapper for LoopBack applications",
|
||||
"keywords": [
|
||||
"StrongLoop",
|
||||
|
@ -24,7 +24,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"commondir": "0.0.1",
|
||||
"debug": "^0.8.1",
|
||||
"debug": "^1.0.4",
|
||||
"lodash.clonedeep": "^2.4.1",
|
||||
"semver": "^2.3.0",
|
||||
"toposort": "^0.2.10",
|
||||
|
@ -33,9 +33,9 @@
|
|||
"devDependencies": {
|
||||
"loopback": "^1.5.0",
|
||||
"mocha": "^1.19.0",
|
||||
"must": "^0.11.0",
|
||||
"must": "^0.12.0",
|
||||
"supertest": "^0.13.0",
|
||||
"fs-extra": "^0.9.1",
|
||||
"fs-extra": "^0.10.0",
|
||||
"browserify": "^4.1.8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,9 +56,9 @@ describe('executor', function() {
|
|||
|
||||
it('defines and customizes models', function() {
|
||||
appdir.writeFileSync('models/Customer.js', 'module.exports = ' +
|
||||
function(Customer, Base) {
|
||||
function(Customer) {
|
||||
Customer.settings._customized = 'Customer';
|
||||
Base.settings._customized = 'Base';
|
||||
Customer.base.settings._customized = 'Base';
|
||||
}.toString());
|
||||
|
||||
boot.execute(app, someInstructions({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = function(Customer, Base) {
|
||||
module.exports = function(Customer) {
|
||||
Customer.settings._customized = 'Customer';
|
||||
Base.settings._customized = 'Base';
|
||||
Customer.base.settings._customized = 'Base';
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue