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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97d26d1c2165080987473b430781c434b27f62510950ce0c27792058ab493bbf
4
- data.tar.gz: 6d9f1f55b9b6602d86e2f6e30ce5e0589ac811bf49f8991f7dbc7f8fec42e6e3
3
+ metadata.gz: dcbb7e84632bd4649224e5d86f862f8f72a4782213f26a93b8b526e6fd303c23
4
+ data.tar.gz: bba54de54404af1abad6be6a853a69d8702222dbe1e7f7abfffdd397ade6afeb
5
5
  SHA512:
6
- metadata.gz: fd8f19deac0273ac8f59aca129190fc395b23077e34bfaafaa50dc48b9e6565430b94c7bbac8f19fd7272edacf0cac04438a2dc464b22670a575be75259cb2fe
7
- data.tar.gz: 92ef32593a1ba1132b2b53ae08ecd82eb7e538edfdbb5e764fb325c57f6a2c66b56de6b67e04a48aa3dde5b663468a06d876292103f22fcf456b0da6563df967
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Axlsx
4
4
  # The current version
5
- VERSION = "4.4.0"
5
+ VERSION = "4.4.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caxlsx
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Randy Morgan