zipr 0.3.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/zipr/archive.rb +1 -1
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6976718d5e5290a0ae2569b40ddbcb99e96215356a1ec154f3b6bfe2a2486062
4
- data.tar.gz: d59070f7523eb976b4e443440e7c8f5468b42fc7465ad95041f10081971bfdb4
3
+ metadata.gz: a62bdef06b58c837858d72e7f3e6fa1a16a62888783f014b96cdce25acaa4255
4
+ data.tar.gz: d304d5bcf9876d6e3a1852b3137246530f8881ef19fbd33890e9a0c082307b7e
5
5
  SHA512:
6
- metadata.gz: 31dd85955d53b08413d931d7a65c755c697c2b54e1dd3d85d54fea007fcd346e079b5badac853815670644d15f06e16ea460c00c13a1257817b98ee0b05f6b39
7
- data.tar.gz: fe3f113d4098f1ddfac92b70b470b3aced82a49806b78f0df4284330e75e433595da060699ad4121fc6afaf23d13ed251289e4c76b8cbc9005325952fff16e44
6
+ metadata.gz: 84b0029024a874635ffeb55bed38daeed54d178cecc74e523e4abd776e21df3a4b39c5cb7b19d156ea65c0077ae073b924eff8a3ecdf056005bd9516df6fbc16
7
+ data.tar.gz: 2591e17d3cd2e121901c4deef767d70a8b84740bbb47363fa4e524d4e8e81a4142772b5ecf44677cad95f1a86f54228a0e3d8255eaf4704e23b2200b11fddfca
data/lib/zipr/archive.rb CHANGED
@@ -357,7 +357,7 @@ module Zipr
357
357
  ::Zip::File.open(@path, ::Zip::File::CREATE) do |zip_archive|
358
358
  EasyIO.logger.info "Adding to #{@path}..." unless @options[:silent]
359
359
  files_to_add.each do |source_file|
360
- add_directory_lambda = ->(relative_path) { zip_archive.mkdir(relative_path) }
360
+ add_directory_lambda = ->(relative_path) { zip_archive.mkdir(relative_path) unless zip_archive.find_entry(relative_path) }
361
361
  add_file_lambda = ->(relative_path) { zip_archive.add(relative_path, source_file) { :overwrite } }
362
362
  _add_item(source_file, add_directory_lambda, add_file_lambda, source_folder)
363
363
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zipr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Munoz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-17 00:00:00.000000000 Z
11
+ date: 2022-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: easy_io
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []
131
- rubygems_version: 3.0.3
131
+ rubygems_version: 3.0.3.1
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Ruby library for easily extracting and creating 7zip and zip archives idempotently.