Repository navigation
Add modelToIgnore option - #25
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
@bajtos Any updates on this? |
|
Can one of the admins verify this patch? |
| }, | ||
| "dependencies": { | ||
| "loopback-sdk-angular": "^1.2.0" | ||
| "loopback-sdk-angular": "https://github.com/aquid/loopback-sdk-angular/tarball/master" |
There was a problem hiding this comment.
Even better, change the dependency version spec to ^1.10.0 to ensure we have a version that supports modelsToIgnore option.
|
@aquid please add a unit-test to verify this change. IIRC, you will need to add a new section to grunt-loopback-sdk-angular/Gruntfile.js Lines 37 to 54 in 8ab1baf grunt-loopback-sdk-angular/test/loopback_sdk_angular_test.js Lines 39 to 54 in 8ab1baf |
|
@aquid also please rebase your patch on top of the current |
|
@aquid ping, what's the status of this pull request? Are you still keen to get it finished? |
|
@bajtos Apologies for the delay but, I am on it. Just need some time to add unit tests. Have to finish some other projects, once that are done will work on the PR. |
|
@bajtos Is there a way to test What I have done till now is this Will that be enough for the tests? |
|
@bajtos I have updated the PR. Please let me know if there's anything else that I should add here. |
You can check that the script does not contain any of these models. Something along the following lines: // assuming User model is ignored
test.ok(script.indexOf('User') === -1);Also make sure to see your test fail. For example, the currently proposed test excluding |
| "grunt-contrib-nodeunit": "^1.0.0", | ||
| "loopback": "^1.7.4", | ||
| "loopback-datasource-juggler": "^1.3.10" | ||
| "loopback": "^2.0.0", |
|
@bajtos Updated PR with custom models initialization and tests to verify if models are ignored properly. |
|
|
||
| // Create custom models extending Model | ||
| var CustomModel_1 = Model.extend('CustomModel_1', {}, { | ||
| trackChanges: true, |
There was a problem hiding this comment.
Why is trackChanges needed? AFAICT, your test is not using this feature at all.
|
@aquid almost there :) See my comment above, and also please edit the first line of the commit message to mention "modelsToIgnore option". |
- Changed looback-sdk-angular version to support modelsToIgnore option - Changed multiple arguments into single options argument for generator - Added unit test to verify the change
|
@bajtos Hopefully fixed everything this time. Waiting for your response. (Fingers crossed). |
|
@slnode ok to test |
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
|
Can one of the admins verify this patch? |
|
Landed, thank you for the contribution! |
|
Released as |
… contains a list of models that are to be prevented from being published in loopback angular SDK.
@bajtos You will have to update the package.json with right version number , once you accept and publish the PR,
strongloop/loopback-sdk-angular#224