Commit Graph

812 Commits

Author SHA1 Message Date
Alexander Simonov 62e0a87e49 Merge pull request #166 from layerssss/master
treat empty file as non-exists
2014-07-02 14:07:52 +03:00
Alexander Simonov a989e8c145 Revert "Speed up Deflater sysread speed when number_of_bytes is small and @output_buffer is large"
This reverts commit a800987a52.
2014-07-02 14:05:13 +03:00
Michael Yin fe1d4ade49 treat empty file as non-exists 2014-07-02 12:46:44 +08:00
Alexander Simonov 8959d447a2 Merge pull request #163 from hainesr/tests-in-gem
Add the tests to the gem as per rubyzip/rubyzip#52.
2014-07-01 22:47:24 +03:00
Robert Haines 217b278715 Add the pkg directory to .gitignore. 2014-06-22 12:57:31 +01:00
Robert Haines 1f1e49e060 Add the tests to the gem as per rubyzip/rubyzip#52.
The tests aren't that big and this will help those with a build-test-install
workflow.
2014-06-22 12:53:40 +01:00
Alexander Simonov fd5310aa6d Fix rbx build on travis 2014-06-21 18:24:44 +03:00
Alexander Simonov 09011eca6b Merge pull request #141 from zacstewart/master
Add InputStream#ungetc
2014-06-21 17:48:49 +03:00
Alexander Simonov 62908f4ff1 Merge pull request #162 from hainesr/run-unicode-tests
Actually run the unicode tests
2014-06-21 17:45:56 +03:00
Robert Haines d01b0cde12 Rename the unicode tests file so it actually runs. 2014-06-21 13:47:03 +01:00
Robert Haines 81d39ff7c3 Declare utf-8 encoding for the unicode tests.
Will fail without this as there are utf-8 characters in the file.
2014-06-21 13:43:14 +01:00
Alexander Simonov bb1e4362e5 Merge pull request #161 from tpickett66/file-open
Return created zip file from Zip::File.open when supplied a block
2014-06-17 19:49:33 +03:00
Tyler Pickett e3029d0b10 Return created zip file from Zip::File.open when supplied a block
This change is to match ruby zip’s behavior to core’s IO.open when
supplied a block.
2014-06-17 10:08:26 -06:00
Alexander Simonov 6b77562d32 Version bump 2014-05-30 20:12:33 +03:00
Alexander Simonov c76e1a51ef Add license info 2014-05-30 20:09:02 +03:00
Alexander Simonov c61c8657da Merge pull request #156 from mehmetc/write_to_zip_output_stream_fix
Zip::Entry::DEFLATED is forced on every file
2014-04-23 10:15:38 +03:00
Mehmet Celik b5c5b6803e Zip::Entry::DEFLATED was forced on every file 2014-04-23 08:42:09 +02:00
Alexander Simonov 4761fab6ba Merge pull request #155 from mrloop/remove_empty_append
Don't send empty string to stream
2014-04-17 20:42:02 +03:00
mrloop 9eb35ca0c4 Don't send empty string to stream
Unneeded method call removed.
This was causing an issue in rails 4 and zipline
https://github.com/fringd/zipline/pull/10
2014-04-17 13:23:12 +01:00
Alexander Simonov 3ab98483c9 Merge pull request #154 from orien/exception_naming
Alias for legacy error names
2014-04-11 10:03:31 +03:00
Orien Madgwick 9d4292007c alias error names
Ensure we maintain the v1 interface
2014-04-11 08:32:17 +10:00
Alexander Simonov 47ef890de6 Version bump 2014-04-06 18:54:23 +03:00
Alexander Simonov 337a923138 Merge pull request #152 from orien/output_stream_write_buffer
Default argument for OutputStream::write_buffer
2014-04-06 18:51:38 +03:00
Orien Madgwick 34f5025d76 default arg for write_buffer
Adding the io parameter to OutputStream::write_buffer breaks backward
compatibility with v1.1.0. Adding a default value reinstates backward
compatibility.
2014-04-06 23:45:19 +10:00
Alexander Simonov 1173397321 Merge pull request #150 from iangreenleaf/tempfile_cleanup
Clean up tempfiles from output stream
2014-04-06 12:32:10 +03:00
Alexander Simonov 2a10ffb843 Merge pull request #149 from iangreenleaf/bad_line
Remove line doing random copy
2014-04-06 12:30:06 +03:00
Ian Young 37ed325783 Clean up tempfiles from output stream, fixes #57 2014-04-04 14:32:11 -07:00
Ian Young 3e28147525 Remove line doing random copy 2014-04-04 14:03:58 -07:00
Alexander Simonov 63d9ae4c3e Merge pull request #147 from Intrepidd/master
Replace zip/zip by zip in samples
2014-03-31 18:02:13 +03:00
Adrien Siami 2468c97a70 Replace zip/zip by zip in samples 2014-03-31 13:20:27 +02:00
Alexander Simonov e61f058abb Update Changelog.md 2014-03-20 14:28:25 +02:00
Alexander Simonov 527137db5f Version bump 2014-03-18 15:10:31 +02:00
Alexander Simonov f7949596eb Fix #143 2014-03-18 15:09:50 +02:00
Alexander Simonov 57482232da Version bump 2014-03-16 19:29:15 +02:00
Alexander Simonov 461f5400b2 Update .travis.yml 2014-03-16 19:18:41 +02:00
Alexander Simonov 0fb37b875d Merge pull request #142 from jstanley0/zip64-commit-fix
fix modifying existing zipfile with zip64 enabled
2014-03-16 19:07:31 +02:00
Jeremy Stanley ea33f64ed8 qualify namespaces in zip64_full_test 2014-03-13 11:53:08 -06:00
Jeremy Stanley b0b46a5b37 only write zip64 central directory if zip64 support enabled 2014-03-13 10:48:04 -06:00
Jeremy Stanley 38205d02f3 fix FULL_ZIP64_TEST
this test fails if zip64 write support isn't enabled
2014-03-13 07:42:57 -06:00
Jeremy Stanley 9e144061b9 fix modifying existing zipfile with zip64 enabled
The local header size computed from the central directory entry
is incorrect due to the Zip64Placeholder in the local entry.
This caused us to seek to the wrong location when copying an
unchanged compressed data stream.

(The same problem could occur when modifying any zip file where
the local header and central directory header contain different
variable-sized fields, so it's a good idea not to trust the CD
to tell us the local header size in any case.)
2014-03-12 15:57:52 -06:00
Zac Stewart 192f910992 Use string concatenation instead of String#prepend
For < Ruby 1.9.3 compatibility
2014-03-12 11:52:12 -04:00
Zac Stewart b3d3b15968 Use String#reverse in test for 1.9 compatibility 2014-03-12 11:28:02 -04:00
Zac Stewart 96377f72de Add InputStream#ungetc
Works like IO#ungetc
2014-03-11 21:19:24 -04:00
Alexander Simonov 2697c7ea4f Fix #138 2014-03-09 20:38:24 +02:00
Alexander Simonov d9f97b06d4 Merge pull request #139 from plexus/readme_howto_read
Add an example on how to read a zipfile
2014-03-04 17:45:03 +02:00
Arne Brasseur ddf32d027a Add an example on how to read a zipfile 2014-03-04 16:05:56 +01:00
Alexander Simonov 34437e77b8 Fix for #125 2014-03-01 12:17:22 +02:00
Alexander Simonov 81c4c4face Fix #135 2014-03-01 00:31:10 +02:00
Alexander Simonov 09ac194540 Merge pull request #130 from srawlins/less-allocations-writing-a-zipfile
Allocate less Arrays and Strings when writing a zip
2014-02-07 09:05:34 +02:00
Alexander Simonov c8dfe3ab62 Merge pull request #134 from srawlins/use-file-exist
File.exists? -> File.exist?
2014-02-07 09:04:04 +02:00