caxlsx 4.4.0 → 4.4.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/axlsx/util/buffered_zip_output_stream.rb +6 -2
- data/lib/axlsx/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dcbb7e84632bd4649224e5d86f862f8f72a4782213f26a93b8b526e6fd303c23
|
|
4
|
+
data.tar.gz: bba54de54404af1abad6be6a853a69d8702222dbe1e7f7abfffdd397ade6afeb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1d3e462d9cc08999723034b1b75553f2e05da0a98c802adf6a90378761d8b2bbe4eb25d2092452678a359bcc5b67aa54d3b3638c368a82d2b6a1b898bd2310d
|
|
7
|
+
data.tar.gz: ac43a99324114c37ba093a19212685f206f844d8991d4d0da48e9421d0efedcb00ef1799e74bafc66be400c32fd9bd5684ae8b6a9694b9fad81bdb60bfd51be9
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@ CHANGELOG
|
|
|
2
2
|
---------
|
|
3
3
|
- **Unreleased**
|
|
4
4
|
|
|
5
|
+
- **December.03.25**: 4.4.1
|
|
6
|
+
- [PR #482](https://github.com/caxlsx/caxlsx/pull/482) Suppress Zip64 when it't not necessary
|
|
7
|
+
|
|
5
8
|
- **September.01.25**: 4.4.0
|
|
6
9
|
- [PR #477](https://github.com/caxlsx/caxlsx/pull/477) Add package-level encryption and password protection.
|
|
7
10
|
- [PR #476](https://github.com/caxlsx/caxlsx/pull/476) Add Excel for Windows integration testing.
|
|
@@ -9,6 +9,10 @@ module Axlsx
|
|
|
9
9
|
# The 4_096 was chosen somewhat arbitrary, however, it was difficult to see any obvious improvement with larger
|
|
10
10
|
# buffer sizes.
|
|
11
11
|
BUFFER_SIZE = 4_096
|
|
12
|
+
# The suppress_extra_fields method was introduced in rubyzip 3.2
|
|
13
|
+
# Between rubyzip 3.0 and 3.2, it automatically writes zip64 support to the xlsx files
|
|
14
|
+
# See: https://github.com/caxlsx/caxlsx/issues/481
|
|
15
|
+
SUPPRESS_ZIP64 = Zip::OutputStream.method(:open).parameters.any? { |_, key| key == :suppress_extra_fields } ? { suppress_extra_fields: :zip64 } : {}
|
|
12
16
|
|
|
13
17
|
def initialize(zos)
|
|
14
18
|
@zos = zos
|
|
@@ -19,7 +23,7 @@ module Axlsx
|
|
|
19
23
|
#
|
|
20
24
|
# The directory and its contents are removed at the end of the block.
|
|
21
25
|
def self.open(file_name, encrypter = nil)
|
|
22
|
-
Zip::OutputStream.open(file_name, encrypter: encrypter) do |zos|
|
|
26
|
+
Zip::OutputStream.open(file_name, encrypter: encrypter, **SUPPRESS_ZIP64) do |zos|
|
|
23
27
|
bzos = new(zos)
|
|
24
28
|
yield(bzos)
|
|
25
29
|
ensure
|
|
@@ -28,7 +32,7 @@ module Axlsx
|
|
|
28
32
|
end
|
|
29
33
|
|
|
30
34
|
def self.write_buffer(io = ::StringIO.new, encrypter = nil)
|
|
31
|
-
Zip::OutputStream.write_buffer(io, encrypter: encrypter) do |zos|
|
|
35
|
+
Zip::OutputStream.write_buffer(io, encrypter: encrypter, **SUPPRESS_ZIP64) do |zos|
|
|
32
36
|
bzos = new(zos)
|
|
33
37
|
yield(bzos)
|
|
34
38
|
ensure
|
data/lib/axlsx/version.rb
CHANGED