xlsxrb 0.1.7 → 0.1.9
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 +26 -2
- data/README.md +125 -36
- data/Rakefile +36 -7
- data/benchmark.rb +32 -4
- data/docs/ARCHITECTURE.md +32 -30
- data/docs/DEVELOPMENT.md +11 -3
- data/docs/QUALITY_ASSURANCE.md +3 -4
- data/docs/SPEC_SOURCES.md +7 -1
- data/docs/visual/VisualGallery.md +157 -157
- data/docs/wasm/ruby.wasm +0 -0
- data/lib/ruby_lsp/xlsxrb/addon.rb +1 -1
- data/lib/ruby_lsp/xlsxrb/completion_listener.rb +11 -13
- data/lib/xlsxrb/elements/coordinate_access.rb +101 -0
- data/lib/xlsxrb/elements/row.rb +2 -2
- data/lib/xlsxrb/elements/workbook.rb +20 -2
- data/lib/xlsxrb/elements/worksheet.rb +94 -124
- data/lib/xlsxrb/elements.rb +1 -0
- data/lib/xlsxrb/ooxml/cfb.rb +490 -0
- data/lib/xlsxrb/ooxml/crypto/agile.rb +285 -0
- data/lib/xlsxrb/ooxml/crypto/standard.rb +152 -0
- data/lib/xlsxrb/ooxml/crypto.rb +60 -0
- data/lib/xlsxrb/ooxml/worksheet_parser.rb +21 -15
- data/lib/xlsxrb/stream_row.rb +181 -0
- data/lib/xlsxrb/version.rb +1 -1
- data/lib/xlsxrb.rb +271 -122
- data/sig/generated/xlsxrb/elements/coordinate_access.rbs +70 -0
- data/sig/generated/xlsxrb/elements/worksheet.rbs +119 -14
- data/sig/generated/xlsxrb/ooxml/cfb.rbs +121 -0
- data/sig/generated/xlsxrb/ooxml/crypto/agile.rbs +46 -0
- data/sig/generated/xlsxrb/ooxml/crypto/standard.rbs +28 -0
- data/sig/generated/xlsxrb/ooxml/crypto.rbs +17 -0
- data/sig/generated/xlsxrb/ooxml/worksheet_parser.rbs +2 -0
- data/sig/generated/xlsxrb/stream_row.rbs +127 -0
- data/sig/generated/xlsxrb.rbs +135 -71
- data/vendor/sdk_runner/Program.cs +3 -1
- metadata +13 -1
data/docs/DEVELOPMENT.md
CHANGED
|
@@ -14,17 +14,25 @@ To run the different tiers of our testing strategy:
|
|
|
14
14
|
```bash
|
|
15
15
|
bundle exec rake test:contract
|
|
16
16
|
```
|
|
17
|
-
3. **
|
|
17
|
+
3. **Property-Based Tests (PBT):**
|
|
18
|
+
```bash
|
|
19
|
+
bundle exec rake test:pbt
|
|
20
|
+
```
|
|
21
|
+
4. **Memory & Performance Tests:**
|
|
22
|
+
```bash
|
|
23
|
+
bundle exec rake test:perf
|
|
24
|
+
```
|
|
25
|
+
5. **Interoperability (E2E) Tests:**
|
|
18
26
|
Requires .NET SDK to be installed (pre-configured in Dev Container).
|
|
19
27
|
```bash
|
|
20
28
|
bundle exec rake test:e2e
|
|
21
29
|
```
|
|
22
|
-
|
|
30
|
+
6. **Visual Regression Tests (VRT):**
|
|
23
31
|
Requires LibreOffice, ImageMagick, and `poppler-utils`.
|
|
24
32
|
```bash
|
|
25
33
|
bundle exec rake test:visual
|
|
26
34
|
```
|
|
27
|
-
|
|
35
|
+
7. **Run All Tests:**
|
|
28
36
|
```bash
|
|
29
37
|
bundle exec rake test
|
|
30
38
|
```
|
data/docs/QUALITY_ASSURANCE.md
CHANGED
|
@@ -14,13 +14,12 @@ Below is an overview of the inspection mechanisms, when they run, the quality at
|
|
|
14
14
|
| **Dependabot** | `.github/dependabot.yml` | - | - | ⭕ | Currency / Maintenance | Repository Monitoring | Outdated dependencies or CI actions. |
|
|
15
15
|
| **Unit & Contract Tests** | `rake test:unit test:contract` | ⭕ | ⭕ | - | Accuracy / Functional Reqs | Dynamic Analysis (Assertions) | Method specification violations, unexpected return values, edge-case failures. |
|
|
16
16
|
| **Runtime Type Validation (RBS::Test)** | `rake test:rbs` | △ (Opt-in) | ⭕ | - | Type Safety (Dynamic) | Dynamic Analysis (Runtime Hooks) | Type errors slipping past static checks, divergence between RBS docs and implementation. |
|
|
17
|
-
| **Property-Based Testing (PBT)** |
|
|
18
|
-
|
|
17
|
+
| **Property-Based Testing (PBT)** | `rake test:pbt` | ⭕ | ⭕ | - | Robustness / Exhaustiveness | Automated Random Generation | Crashes caused by "unexpected inputs" (e.g., empty strings, huge numbers, special symbols like `=`). |
|
|
19
18
|
| **Security Validation (DoS Protection)** | Included in `rake test:unit` | ⭕ | ⭕ | - | Availability / Safety | Dynamic Analysis (Malicious Input) | Memory/disk exhaustion from ZIP bombs, infinite parsing loops from malformed files. |
|
|
20
19
|
| **Concurrency Validation (Thread/Ractor)** | Included in `rake test:unit` | ⭕ | ⭕ | - | Thread Safety | Dynamic Analysis (Parallel Execution) | Global variable pollution, data mixing during concurrent request processing. |
|
|
21
20
|
| **XSD Schema Validation** | Included in `rake test:unit` | ⭕ | ⭕ | - | Compatibility / Compliance | Structural Validation | "We found a problem with some content in it" errors when opening in Excel. |
|
|
22
21
|
| **E2E Interoperability Tests** | `rake test:e2e` | △ (Opt-in) | ⭕ | - | Compatibility (Real-world) | 3rd-party SDK Execution | Structural defects so severe that the official .NET SDK cannot read them. |
|
|
23
|
-
| **
|
|
24
|
-
| **
|
|
22
|
+
| **Memory & Performance Tests** | `rake test:perf` / Action: `performance.yml` | ⭕ | ⭕ | - | Performance / Stability | Continuous Profiling (10k+ rows) | Out of Memory (OOM) leaks or unbounded memory retention in streaming mode. |
|
|
23
|
+
| **Ecosystem Benchmarks** | `ruby benchmark.rb` | ⭕ | - | - | Performance Comparison | Multi-Gem Isolated Profiling (1M cells) | Throughput and allocation comparison against competing libraries. |
|
|
25
24
|
| **Visual Regression Testing (VRT)** | `rake test:visual` | - | ⭕ | - | Visual Accuracy (UI/UX) | Headless Rendering / Pixel Diff | Visual bugs like "cell background colors dropping" or "chart layouts breaking" after code changes. |
|
|
26
25
|
|
data/docs/SPEC_SOURCES.md
CHANGED
|
@@ -22,8 +22,11 @@ To address gaps between the official ECMA standard and actual implementations in
|
|
|
22
22
|
- **Role:** Identifies how Excel actually reads/writes files, including deviations and compatibility behaviors.
|
|
23
23
|
- **Referenced Version:** July 2024 / Version 12.0 (or current release).
|
|
24
24
|
3. **[[MS-OFFCRYPTO]: Office Document Cryptography Structure](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-offcrypto/)**
|
|
25
|
-
- **Role:** Provides details on encryption, passwords, and hashing algorithms used for document/sheet protection.
|
|
25
|
+
- **Role:** Provides details on encryption, passwords, and hashing algorithms used for document/sheet protection (Agile Encryption and Standard Encryption).
|
|
26
26
|
- **Referenced Version:** July 2024 / Version 12.0 (or current release).
|
|
27
|
+
4. **[[MS-CFB]: Compound File Binary File Format](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/)**
|
|
28
|
+
- **Role:** Container format (OLE structured storage) wrapping encrypted Office documents (`EncryptionInfo` and `EncryptedPackage` streams).
|
|
29
|
+
- **Referenced Version:** July 2024 / Version 14.0 (or current release).
|
|
27
30
|
|
|
28
31
|
### ISO/IEC 29500 Note
|
|
29
32
|
ISO/IEC 29500 is contents-wise equivalent to ECMA-376. However, ISO/IEC 29500 requires paid purchase in general, whereas ECMA-376 is freely available. Therefore, we primarily cite ECMA-376 sections.
|
|
@@ -40,3 +43,6 @@ When implementing features or fixing bugs that depend on specific behaviors defi
|
|
|
40
43
|
| Shared Strings | ECMA-376 Part 1 | §18.4 (Shared String Table) | Handling of `<sst>` and `<si>` for cell value reuse |
|
|
41
44
|
| Styles & Formatting | ECMA-376 Part 1 | §18.8 (Styles) | Cell style XF indexes, font, fill, border mappings |
|
|
42
45
|
| Hyperlinks | ECMA-376 Part 1 | §18.3.1.48 (hyperlink) | Worksheet hyperlinks referencing external URLs or internal targets |
|
|
46
|
+
| Document Encryption (Agile) | [MS-OFFCRYPTO] | §2.3.4 (Agile Encryption) | AES-256-CBC, PBKDF2/SHA-512, HMAC-SHA512 data integrity |
|
|
47
|
+
| Document Encryption (Standard) | [MS-OFFCRYPTO] | §2.3.6 (Standard Encryption) | AES-128-ECB, SHA-1 with CryptoAPI 50,000-spin key derivation |
|
|
48
|
+
| Encryption Container | [MS-CFB] | §2 (Compound File Structure) | Mini Stream, FAT/MiniFAT sectors, and Red-Black tree directory |
|