liquid_xlsx 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: cdc976c8086895374758eae13fd1006379ffd15f37e3cad03cff012be6986065
4
+ data.tar.gz: de8e167af7057eb7dfad00991610a3171a30a13b67ed2eda1fa43b1f00bd9358
5
+ SHA512:
6
+ metadata.gz: c36433b43abf4b17f5a0fdbdcab009f6fb2a2d6d18c5c1c517c99a02f8a0207be1b3d3c2ba37187f57d96e1279083450666a3036d9281e5e7f9c3fa0f734ab34
7
+ data.tar.gz: 7c8f204d3284aba334ed3f942b0ee34ac3dde5953ad413d8a9847c5d6b588f1aaf754a82f0ada0cf15af0958b15bb3330f4ad49c917cb20644da4cbc3ff75b1b
data/CHANGELOG.md ADDED
@@ -0,0 +1,58 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-08-04)
4
+
5
+ First public release.
6
+
7
+ ### Templates
8
+
9
+ - Inline Liquid variable rendering
10
+ - Row-level `{% for %}` / `{% endfor %}` loops, with `for/else` for empty loops
11
+ - Row-level `{% if %}` / `{% elsif %}` / `{% else %}` / `{% endif %}` conditions
12
+ - Nested `for` and `if` blocks
13
+ - In-cell `{% if %}`, `{% unless %}`, `{% case %}`
14
+ - A single Liquid context per worksheet, so `{% assign %}` / `{% capture %}`
15
+ in one cell is visible in later cells
16
+ - Loop variables and `{% assign %}` shadow same-named top-level data keys,
17
+ matching Liquid scope semantics
18
+
19
+ ### Workbook fidelity
20
+
21
+ - Formula row shifting inside loops and total range expansion after loops
22
+ - Merged cells preservation and shifting
23
+ - Cell style preservation, multi-sheet support
24
+ - Shared strings reading; rendered text is written as `inlineStr`
25
+ - Cell type preservation: numbers and booleans stay numeric in Excel
26
+
27
+ ### Structure-generating tags
28
+
29
+ - `{% sheet %}` — dynamic sheets generated from data, including when the
30
+ global `data` is a Drop or a `#to_liquid` object (the per-op local variable
31
+ is injected through a dedicated `extra_scope` channel)
32
+ - `{% image_tag %}` — PNG, JPEG and GIF images with EMU sizing and SHA dedup
33
+
34
+ ### Data
35
+
36
+ - `data:` accepts a `Hash`, a `Liquid::Drop`, or any object responding to
37
+ `#to_liquid` (returning a Hash/Drop). Numeric/Boolean methods of a Drop keep
38
+ Excel cell types, so formulas and number formats continue to work.
39
+ `Integer`, `Float`, and `BigDecimal` are written as numeric `<v>`;
40
+ `Rational`, `Complex`, and non-finite `Float` fall back to string rendering
41
+ (they are not valid OOXML numeric lexemes).
42
+
43
+ ### Options and errors
44
+
45
+ - `recalculate_formulas`, `strict_variables`, `strict_filters`,
46
+ `dynamic_sheets`, `hide_control_sheets`, `hide_template_sheets`,
47
+ `remove_template_comments`, `images`, `liquid_resource_limits`
48
+ - Object API (`LiquidXlsx::Template`)
49
+ - Errors carry sheet/row/cell context. `Liquid::UndefinedVariable` and
50
+ `Liquid::UndefinedDropMethod` are re-raised as `MissingVariableError` in all
51
+ render paths (`{{ }}`, `{% if %}`, `{% sheet %}`, `{% image_tag %}`).
52
+
53
+ ### Compatibility
54
+
55
+ - Ruby >= 3.1
56
+ - rubyzip 2.x and 3.x (rubyzip 3 removed `Zip::File::CREATE`; the archive is
57
+ opened with whichever form the installed major supports)
58
+ - Liquid >= 5.4, < 6; Nokogiri >= 1.14, < 2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ivan Khlipitkin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.