bestchange 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/bestchange/version.rb +1 -1
- data/lib/bestchange/zip_extractor.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d6a02d56b4b2a21310cec76c34b7b35565953193839cd881e601a8793713da9
|
4
|
+
data.tar.gz: 79f74ffaad6279e4786bf0feb0c6adf0cf2cde65ae219a4831290460aa0b968f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9390b359cafddf3c1f1cda493f47a0e6a3723575dc049b4e1f037795677d2f474d93163195e8e0c9ea56ec78c88d5b976c5bc315640aef2261440879cb7e6f54
|
7
|
+
data.tar.gz: 0f0b6ba210438209fddbece962396ecc7336c48b509d834e974fc0ff1ec0049260258294e5655d1514f1bae42746f5e357aeec223cbf3b8f1f3e3966d545229e
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/bestchange/version.rb
CHANGED
@@ -4,8 +4,9 @@ require 'zip'
|
|
4
4
|
|
5
5
|
module Bestchange
|
6
6
|
class ZipExtractor
|
7
|
-
def initialize(zip_file)
|
7
|
+
def initialize(zip_file, on_extract: nil)
|
8
8
|
@zip_file = zip_file
|
9
|
+
@on_extract = on_extract
|
9
10
|
end
|
10
11
|
|
11
12
|
def call(filename)
|
@@ -14,6 +15,7 @@ module Bestchange
|
|
14
15
|
Zip::File.open(@zip_file) do |zip_file|
|
15
16
|
entry = zip_file.find_entry(filename)
|
16
17
|
|
18
|
+
@on_extract&.call(entry)
|
17
19
|
entry.extract(tempfile) { true }
|
18
20
|
end
|
19
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bestchange
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Karpinovsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|