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

fixed support for streaming documents #107

Open xsrust opened 8 years ago

xsrust commented 8 years ago

The YAML.load_documents method is deprecated. In the source code, it calls load_stream to get it's result. This implementation means that blocks are not properly handled, and thus all documents in the YAML file get loaded into memory. Calling load_stream instead allows the passing of blocks, and thus allows actual streaming, decreasing memory usage.

dnrce commented 8 years ago

Thanks! Can you please update the failing tests?