omnizip 0.3.38 → 0.3.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Omnizip
4
- VERSION = "0.3.38"
4
+ VERSION = "0.3.39"
5
5
  end
@@ -418,13 +418,14 @@ Full support for creating and extracting .7z archives.
418
418
  [source,ruby]
419
419
  ----
420
420
  # Create archive
421
- writer = Omnizip::Formats::SevenZip::Writer.new('archive.7z')
422
- writer.add_file('input.txt')
423
- writer.add_file('data.bin')
424
- writer.close
421
+ Omnizip::Formats::SevenZip.create('archive.7z') do |writer|
422
+ writer.add_file('input.txt')
423
+ writer.add_file('data.bin')
424
+ end
425
425
 
426
426
  # Extract archive
427
427
  reader = Omnizip::Formats::SevenZip::Reader.new('archive.7z')
428
+ reader.open
428
429
  reader.extract_all('output_dir/')
429
430
  reader.close
430
431
 
@@ -198,12 +198,13 @@ end
198
198
 
199
199
  [source,ruby]
200
200
  ----
201
- writer = Omnizip::Formats::SevenZip::Writer.new('archive.7z')
202
- writer.algorithm = :lzma2
203
- writer.level = 9
201
+ writer = Omnizip::Formats::SevenZip::Writer.new('archive.7z',
202
+ algorithm: :lzma2,
203
+ level: 9
204
+ )
204
205
  writer.add_file('file1.txt')
205
206
  writer.add_file('file2.txt')
206
- writer.close
207
+ writer.write
207
208
  ----
208
209
 
209
210
  === Adapter Pattern
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnizip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.38
4
+ version: 0.3.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -504,10 +504,12 @@ files:
504
504
  - lib/omnizip/formats/rar/recovery_record.rb
505
505
  - lib/omnizip/formats/rar/volume_manager.rb
506
506
  - lib/omnizip/formats/rar/writer.rb
507
+ - lib/omnizip/formats/rar3.rb
507
508
  - lib/omnizip/formats/rar3/compressor.rb
508
509
  - lib/omnizip/formats/rar3/decompressor.rb
509
510
  - lib/omnizip/formats/rar3/reader.rb
510
511
  - lib/omnizip/formats/rar3/writer.rb
512
+ - lib/omnizip/formats/rar5.rb
511
513
  - lib/omnizip/formats/rar5/compressor.rb
512
514
  - lib/omnizip/formats/rar5/decompressor.rb
513
515
  - lib/omnizip/formats/rar5/reader.rb