yamldb / yaml_db

Rails plugin for a database-independent dump format, data.yml .......... Seeking new maintainers! See https://github.com/yamldb/yaml_db/issues/143
https://rubygems.org/gems/yaml_db
949 stars 200 forks source link

File flushing fix #79

Closed jordan-brough closed 9 years ago

jordan-brough commented 9 years ago

Use the block form of File.open when writing to a file. This ensures that the file gets flushed to disk when finished.

This is a problem when running tasks like Rake::Task['db:data:dump'].invoke.

It hasn't been not a problem for rake db:data:dump because open files get flushed automatically when rake finishes and ruby terminates.

lime commented 9 years ago

Looks good to me! :+1:

jrgifford commented 9 years ago

Thanks!