bredikhin / barrels

Simple DB Fixtures for Sails.js
MIT License
85 stars 34 forks source link

Expose doPopulateSails to the module #4

Closed PsySecCorp closed 10 years ago

PsySecCorp commented 10 years ago

https://github.com/bredikhin/barrels/blob/master/index.js#L19

populate() is opinionated in that it requires fixtures to exist in order to use Barrels. However, there are times when fixtures do not exist in a project (Such as when Barrels is part of a testing suite that acts as a template for more complex tests and, thus, does not contain models or fixtures) and never will, thus, checking for them and throwing an error when they do not exist is limiting.

Expose doPopulateSails so that we can bypass this requirement and not throw errors in the event of fixtures not existing.

bredikhin commented 10 years ago

Exposing doPopulateSails doesn't look necessary, but neither throwing an error in case of missing fixtures does. How about we just remove the error for now? The module will be rewritten soon anyway, in order to account for Sails v0.10 and associations.

PsySecCorp commented 10 years ago

Removal of the error is also acceptable :D yaaaaay

bredikhin commented 10 years ago

Done, published as v0.0.5.