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

Allow Tempfile as IO for OutputStream::write_buffer #182

Closed

Conversation

jacobsimeon
Copy link

Resolves #146

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0%) when pulling d20b72c on jacobsimeon:allow-io-for-output-buffer into 8ede424 on rubyzip:master.

@jvdp
Copy link

jvdp commented Nov 2, 2014

This would be great to have! For now I'm using this workaround: http://thinkingeek.com/2013/11/15/create-temporary-zip-file-send-response-rails/

@simonoff
Copy link
Member

simonoff commented Nov 3, 2014

What the reason to use Tempfile for write buffer if you can use StringIO?

@jvdp
Copy link

jvdp commented Nov 3, 2014

Well I wouldn't want to store the whole zip file into memory; isn't that what happens if you use StringIO?

@mikemccrary
Copy link

As @jvdp mentioned, using a Tempfile lets us write to the buffer without forcing us to store the whole string in memory.

@simonoff
Copy link
Member

@jacobsimeon can you fix tests for jruby and ruby 1.9.3 ?

simonoff added a commit that referenced this pull request Feb 2, 2015
@simonoff simonoff closed this Feb 2, 2015
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

Successfully merging this pull request may close these issues.

Error when calling Zip::File.open_buffer(io)
5 participants