ErlyORM / boss_db

BossDB: a sharded, caching, pooling, evented ORM for Erlang
Other
277 stars 138 forks source link

Rebar Plugin Enhancement: Coverage copying of models #266

Closed stevepm closed 6 years ago

stevepm commented 7 years ago

This enhancement checks if coverage is enabled in the rebar config. If it is AND the models directory is outside of the src directory, during the eunit hook, copy the models into the .eunit directory to allow coverage to run.

Problem this is solving: We store our models in models directory outside of src. Eunit copies all of the erl files from src into the .eunit directory to allow coverage to run against them. But it doesn't take into account our models which are outside of src. This fixes that issue for us.

danikp commented 7 years ago

please update your code with latest master branch and comments from @wk8. Also, please keep in mind that support for rebar2 is going away and it's better to move to rebar3 plugin there you can set dirs for models

wk8 commented 6 years ago

@danikp if you had a few minutes to have a look at this again, would be deeply appreciated :)

danikp commented 6 years ago

I don't have a problem with your approach, but boss_db moving to rebar3 and all that rebar-related code meant to be removed. Instead, you should take a look at rebar3_boss_db plugin https://github.com/danikp/rebar3_boss_db