Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writer produced empty file on some conditions #100

Open
webhive opened this issue Jan 19, 2016 · 1 comment
Open

Writer produced empty file on some conditions #100

webhive opened this issue Jan 19, 2016 · 1 comment

Comments

@webhive
Copy link

webhive commented Jan 19, 2016

Hello!

If initialize writer this way (as specified here https://github.com/mbleigh/seed-fu/blob/master/lib/seed-fu/writer.rb#L7)

SeedFu::Writer.write('path/to/file.rb', :class_name => 'Person') do |writer|

result file is empty and has only single footer line

# End auto-generated file.

But if use io as first argument

SeedFu::Writer.write(File.open('path/to/file.rb', 'w'), :class_name => 'Person') do |writer|

it work fine as expected

@evdevdev
Copy link
Contributor

I just inadvertently reproduced this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants