mountetna / magma

Data server with friendly data loaders
GNU General Public License v2.0
5 stars 2 forks source link

Move spec Labors model attributes to attributes table #148

Closed alimi closed 4 years ago

alimi commented 4 years ago

Before spec/spec_helper.rb starts the Magma server, it will load Labors model attributes from a CSV into the attributes table. Then when the server starts, it will be able to load the attributes in memory from the database.

If the CSV data is bad for any reason, we'll truncate the attributes table before raising an exception. This will leave the test database in a good state so we can try loading the data again.

Fixes https://github.com/mountetna/magma/issues/145

alimi commented 4 years ago

@graft is this PR good to merge?

graft commented 4 years ago

:shipit: