receipts 3.0.1 → 3.0.2
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 +4 -0
- data/lib/receipts/pdf/table.rb +2 -0
- data/lib/receipts/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: bc21a875e12a60a763da6248b1b771aca91f8fba3b6274bf2c40b9fc13418fa8
|
|
4
|
+
data.tar.gz: bf3b01f48954ad552db84f954ee8bf48b91f2e88cc44e68734775d0a8174ad13
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bff6057bc91a915ddb9f347769529e8807835136aa5753da06d96f89522ac047cc39f9babfc46a425bd85318effcb4351a80cea8db96bf5b9bd8a169b8a6c23c
|
|
7
|
+
data.tar.gz: 4d2eb007c98393fd7d73b54891b9fabd751cb9e72f4a7add3c80cc7cec0adab0712a475640b924d77c6bd25c56a97bc61bccaeeda59b69314fbdc02684ca5c1d
|
data/CHANGELOG.md
CHANGED
data/lib/receipts/pdf/table.rb
CHANGED
|
@@ -202,6 +202,8 @@ module Receipts
|
|
|
202
202
|
when Numeric then (0...count).map { |i| [i, @column_widths] }.to_h
|
|
203
203
|
else {}
|
|
204
204
|
end
|
|
205
|
+
# Negative indexes count from the last column, like column(-1). Widths for columns the table doesn't have are ignored.
|
|
206
|
+
fixed = fixed.map { |i, width| [(i < 0) ? i + count : i, width] }.select { |i, _| i >= 0 && i < count }.to_h
|
|
205
207
|
|
|
206
208
|
widths = natural.dup
|
|
207
209
|
fixed.each { |i, width| widths[i] = width }
|
data/lib/receipts/version.rb
CHANGED