fast_xlsx 1.1.0-x86_64-linux → 1.2.0-x86_64-linux
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 +16 -0
- data/README.md +1 -1
- data/SECURITY.md +3 -3
- data/lib/fast_xlsx/3.3/fast_xlsx.so +0 -0
- data/lib/fast_xlsx/3.4/fast_xlsx.so +0 -0
- data/lib/fast_xlsx/4.0/fast_xlsx.so +0 -0
- data/lib/fast_xlsx/version.rb +1 -1
- data/lib/fast_xlsx.rb +5 -2
- data/sig/fast_xlsx.rbs +3 -3
- 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: b7eb1cc3b07c8497d3b43ff7485d6e6268ad4623a575cea9363f1fd39bf0be91
|
|
4
|
+
data.tar.gz: 40cabf674a988e650368f40ceeff2f05db6fceddda0bdb0f45086028dfaa6c3a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cafd0768af9532ee98e66a31b4c74d98cd931962c170667a7d1e7e4c52186fe6d6eeff51745212cbbba363ef6c5ab08a80c55c33cf5d9117d24d8146dc04c375
|
|
7
|
+
data.tar.gz: 4c20e20e4f817c6f16ad6a06dda5e315e7eab74ef447390aab3866eb6775271d8fc50a193a5b9e54d1a38431c7f2d53f6864d2dfb45d78681905725050753ea9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.2.0] - 2026-11-19
|
|
4
|
+
|
|
5
|
+
Upgrading is recommended: 1.1.0 and earlier are affected by the issues under Security. A chart `title:`, `x_axis:`, `y_axis:` or series `name:` written as a cell reference String (`"Sheet1!$A$1"`) now raises; pass `FastXlsx::Formula.new("Sheet1!$A$1")` instead.
|
|
6
|
+
|
|
7
|
+
### Security
|
|
8
|
+
|
|
9
|
+
- `insert_image` raises `FastXlsx::Error` for an image that would be larger than a worksheet. The size comes from the image's own header, so a file of a few bytes could keep `save` and `to_xlsx` busy for minutes, and a `Timeout` could not interrupt it.
|
|
10
|
+
- Control characters (below U+0020 other than tab, newline and carriage return) now raise `ArgumentError` in worksheet names, table headers and `total_label:`, data validation titles and messages, `insert_image`'s `alt_text:`, `:text` conditional format values, `num_format:`, `font_name:`, URLs and `unprotect_range`'s `name:`. They were written into the file as is, and Excel could not open it. Cell text is not affected.
|
|
11
|
+
- A chart's `title:`, `x_axis:`, `y_axis:` and series `name:` are always text. A String such as `"Sheet1!A1"` or `"=(Sheet1!$A$1)"` was read as a cell reference or written as a formula; it now raises `ArgumentError`. To show a cell's content, pass a `FastXlsx::Formula`.
|
|
12
|
+
- A `:cell` conditional format value that starts and ends with a double quote and has another one inside (`'"x"&A2&"y"'`) is compared as that text, instead of continuing as formula text.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- `write` with a Hash format, and `conditional_format` called natively, keep their own copy of the format while the value is converted. The value's `to_s` (or another thread) could push the format out of the cache of Hash formats and let it be freed before it was used. No crash was reproduced.
|
|
17
|
+
- Updated rust_xlsxwriter to 0.102, which doubles a double quote in a `:text` conditional format value instead of ending the rule's formula there.
|
|
18
|
+
|
|
3
19
|
## [1.1.0] - 2026-11-03
|
|
4
20
|
|
|
5
21
|
### Added
|
data/README.md
CHANGED
|
@@ -395,7 +395,7 @@ ws.insert_chart(1, 4, type: :column,
|
|
|
395
395
|
title: "Q1", x_axis: "Month", y_axis: "Amount", width: 600, height: 360)
|
|
396
396
|
```
|
|
397
397
|
|
|
398
|
-
`type`: `:column`, `:column_stacked`, `:bar`, `:bar_stacked`, `:line`, `:line_stacked`, `:area`, `:area_stacked`, `:pie`, `:doughnut`, `:radar`, `:scatter`. Ranges use Excel syntax, so a chart can plot data from another worksheet. Sizes are in pixels (default 480 × 288).
|
|
398
|
+
`type`: `:column`, `:column_stacked`, `:bar`, `:bar_stacked`, `:line`, `:line_stacked`, `:area`, `:area_stacked`, `:pie`, `:doughnut`, `:radar`, `:scatter`. Ranges use Excel syntax, so a chart can plot data from another worksheet. `title:`, `x_axis:`, `y_axis:` and a series `name:` are text; pass a `FastXlsx::Formula` such as `FastXlsx::Formula.new("Sheet1!$A$1")` to show a cell's content instead. Sizes are in pixels (default 480 × 288).
|
|
399
399
|
|
|
400
400
|
Values are mapped by type:
|
|
401
401
|
|
data/SECURITY.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Supported versions
|
|
4
4
|
|
|
5
|
-
Security fixes go into the latest release of the newest minor version.
|
|
5
|
+
Security fixes go into the latest release of the newest minor version.
|
|
6
6
|
|
|
7
7
|
| Version | Supported |
|
|
8
8
|
|---|---|
|
|
9
|
-
|
|
|
10
|
-
| <
|
|
9
|
+
| 1.2.x | ✅ |
|
|
10
|
+
| < 1.2 | ❌ (upgrade to 1.2.x; the [changelog](CHANGELOG.md) lists every change) |
|
|
11
11
|
|
|
12
12
|
## Reporting a vulnerability
|
|
13
13
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/fast_xlsx/version.rb
CHANGED
data/lib/fast_xlsx.rb
CHANGED
|
@@ -391,7 +391,8 @@ module FastXlsx
|
|
|
391
391
|
# @option options [Integer] :x_offset, :y_offset pixels
|
|
392
392
|
# @option options [String] :alt_text
|
|
393
393
|
# @return [self]
|
|
394
|
-
# @raise [FastXlsx::Error] for data that isn't a supported image
|
|
394
|
+
# @raise [FastXlsx::Error] for data that isn't a supported image, or an
|
|
395
|
+
# image that would be larger than a worksheet
|
|
395
396
|
def insert_image(*args, **)
|
|
396
397
|
_insert_image(*image_args(args), { ** })
|
|
397
398
|
end
|
|
@@ -415,7 +416,9 @@ module FastXlsx
|
|
|
415
416
|
# :radar, :scatter, and the stacked variants
|
|
416
417
|
# @param series [Array<Hash>] { values:, categories:, name: } with ranges
|
|
417
418
|
# such as "Sheet1!$B$2:$B$13"
|
|
418
|
-
# @option options [String] :title, :x_axis, :y_axis
|
|
419
|
+
# @option options [String, Formula] :title, :x_axis, :y_axis text; these and a
|
|
420
|
+
# series name: take a {Formula} such as "Sheet1!$A$1" to show a cell instead
|
|
421
|
+
# @raise [ArgumentError] for text that Excel would read as a cell reference
|
|
419
422
|
# @option options [Integer] :width, :height pixels
|
|
420
423
|
# @return [self]
|
|
421
424
|
def insert_chart(*cell, type:, series:, **)
|
data/sig/fast_xlsx.rbs
CHANGED
|
@@ -149,13 +149,13 @@ module FastXlsx
|
|
|
149
149
|
?x_offset: Integer, ?y_offset: Integer, ?alt_text: String) -> self
|
|
150
150
|
def embed_image: (Integer row, Integer col, String | _Reader source, ?alt_text: String?, ?format: format?) -> self
|
|
151
151
|
| (String cell, String | _Reader source, ?alt_text: String?, ?format: format?) -> self
|
|
152
|
-
type chart_series = { values: String, ?categories: String, ?name: String }
|
|
152
|
+
type chart_series = { values: String, ?categories: String, ?name: String | Formula }
|
|
153
153
|
|
|
154
154
|
def insert_chart: (Integer row, Integer col, type: Symbol, series: Array[chart_series],
|
|
155
|
-
?title: String, ?x_axis: String, ?y_axis: String,
|
|
155
|
+
?title: String | Formula, ?x_axis: String | Formula, ?y_axis: String | Formula,
|
|
156
156
|
?width: Integer, ?height: Integer) -> self
|
|
157
157
|
| (String cell, type: Symbol, series: Array[chart_series],
|
|
158
|
-
?title: String, ?x_axis: String, ?y_axis: String,
|
|
158
|
+
?title: String | Formula, ?x_axis: String | Formula, ?y_axis: String | Formula,
|
|
159
159
|
?width: Integer, ?height: Integer) -> self
|
|
160
160
|
type table_column = String | { header: String, ?total: Symbol, ?total_label: String, ?format: format }
|
|
161
161
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fast_xlsx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Zac
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: 'Writes Excel .xlsx files from Ruby through a native Rust extension (rust_xlsxwriter):
|
|
14
14
|
20,000 rows in under 100 ms, and memory that stays flat for large exports. Formats,
|