Commit Graph

1244 Commits

Author SHA1 Message Date
Robert Haines e361a47c8e Configure Lint/UselessComparison cop.
Allow this in entry_test.rb so we can test <=>.
2020-02-15 16:26:32 +00:00
Robert Haines cd065d0186 Fix Lint/UnusedBlockArgument cop. 2020-02-15 16:26:32 +00:00
Robert Haines b528cae084 Fix Lint/LiteralAsCondition cop.
This fixes Style/InfiniteLoop as a side-effect.
2020-02-15 16:26:32 +00:00
Robert Haines 20743a53b2 Fix Lint/AmbiguousBlockAssociation cop. 2020-02-15 16:26:32 +00:00
Robert Haines 98c6969c18 Fix Layout/SpaceAroundOperators cop. 2020-02-15 16:26:32 +00:00
Robert Haines e7275dad93 Fix Style/BlockDelimiters cop errors. 2020-02-15 16:26:32 +00:00
Robert Haines 3a3ac6feb7 Fix Style/Semicolon cop. 2020-02-15 16:26:32 +00:00
Robert Haines f1154c2eca Fix Style/OrAssignment cop. 2020-02-15 15:56:17 +00:00
Robert Haines 73e405acef Fix Security/Open cop errors. 2020-02-15 15:56:17 +00:00
Robert Haines aa40035525 Fix Gemspec/OrderedDependencies cop. 2020-02-15 15:56:17 +00:00
Robert Haines a3245ac241 Add Rubocop tasks to the Rakefile. 2020-02-15 15:56:17 +00:00
Robert Haines c8bfd14764 Update rubocop version and the config files.
Also rename .rubocop_rubyzip.yml to be consistent with Rubocop default
setup.
2020-02-15 15:56:17 +00:00
John Lees-Miller 5da87ef1d6
Merge pull request #420 from hainesr/console
Quickly fire up a console with 'zip' pre-loaded.
2020-02-15 11:48:12 +00:00
Robert Haines 862892c0ac Quickly fire up a console with 'zip' pre-loaded. 2020-02-15 09:43:53 +00:00
John Lees-Miller 247fd43290 Update changelog for #431 2020-02-09 08:24:30 +00:00
John Lees-Miller 393cd9749c
Merge pull request #431 from taichi-ishitani/fix_frozen_error
Fix frozen error caused by frozen string literal
2020-02-09 08:19:54 +00:00
taichi 976dbd3408 reverted the change according to comment below:
https://github.com/rubyzip/rubyzip/pull/431#discussion_r376698387
2020-02-08 19:54:45 +09:00
taichi b326d17438 use @+ operator instead of #dup to get unfrozen string 2020-02-05 11:40:56 +09:00
taichi 3bc85ccdec fixed frozen error caseud by frozen string literal 2020-02-05 11:30:30 +09:00
taichi 609c12d1c4 added Ruby 2.7 to CI regression 2020-02-05 11:11:46 +09:00
John Lees-Miller ecd641e459
Merge pull request #429 from rubyzip/v2-2-0
Bump version to 2.2.0
2020-02-01 15:22:01 +00:00
John Lees-Miller f42827e99c Bump version to 2.2.0 2020-02-01 13:24:50 +00:00
John Lees-Miller 040962a59f Remove unused error argument 2020-02-01 13:19:15 +00:00
John Lees-Miller 666fb8c03f
Merge pull request #427 from jspanjers/refactor-decompressor
Support decompressor plugins
2020-02-01 13:15:03 +00:00
Jan-Joost Spanjers 0b9433c3b2 Add test for unsupported decompression, e.g bzip2 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers a5d068d3e8 Support Decompressor plugins 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 2b7268373a Define compression methods 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 456bd4d92c Mimic IO#read return values in Decompressor#read 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers c66277db58 Rename Decompressor#sysread to #read 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 00b525d76e Fix returned outbuf for Inflater#sysread 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers cda7127107 Add Decompressor#input_stream 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 5707c52a15 Move PassTruDecompressor#decompressed_size to Decompressor 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 2bbcec0e34 Cleanup PassTruDecompressor 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 4ac83737b1 Cleanup Inflater 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers dd74bc0e73 Cleanup NullDecompressor 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers b80ce3cc57 Make decryption generic for all compression methods
Now, STORED files can be decrypted, just like DEFLATED files.
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 4e28f7286c Untangle encryption and decompression 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 8f7c5caf29 Drop #produce_input from Decompressor class 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers d20a6834a3 Rework Inflater#produce_input to use sysread
This aligns Inflater#produce_input with
PassThruDecompresser#produce_input.
2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 1b6aeb2cd0 Replace Decompressor#input_finished? with #eof 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 4a4c553b1e Move :eof from InputStream to AbastractInputStream 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers e072c57beb Add Entry#incomplete? 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers c897bbdf77 Add Entry#encrypted? 2020-01-26 15:34:17 +01:00
Jan-Joost Spanjers 0b7b78dc4a Encapsulate Zlib errors within DecompressionError 2020-01-26 15:34:13 +01:00
John Lees-Miller 0b791046d4
Merge pull request #428 from rubyzip/v2-1-0
Bump version to 2.1.0
2020-01-25 19:44:57 +00:00
John Lees-Miller f6639f9b55 Bump version to 2.1.0 2020-01-25 18:12:57 +00:00
Jan-Joost Spanjers e50fa4a97b Remove unused variables from deflater_test 2020-01-05 14:24:46 +01:00
John Lees-Miller 76cf2290c3 Update changelog for #421 2019-12-27 16:31:08 +00:00
John Lees-Miller 7bc4905a43
Merge pull request #421 from hainesr/universal-time
Fixes for the UniversalTime extra field
2019-12-27 16:26:23 +00:00
Robert Haines ee028d2746 UniversalTime: more ruby-like (readable) code. 2019-12-15 22:42:09 +00:00