kamisaku 0.4.4 → 0.4.5
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 +6 -1
- data/Gemfile.lock +1 -1
- data/lib/kamisaku/pdf.rb +9 -3
- data/lib/kamisaku/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: 2998be93b0d3bcc24cfcd15f35718cbbc102817f54f887122543885a251cb0aa
|
|
4
|
+
data.tar.gz: 41ea9e2d8bcaecd42bd9a2c1b60f875f59c8995fb9ed94013e2d5d5636e2c36c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2576f1805c9e72c8a668e0f70360febb6c763123117b28b55a49da062106fe750e094c2e5089ce4062198fbd0cd9bcad5c857a4d9faeb995a8035f8441ed8f54
|
|
7
|
+
data.tar.gz: a7ba350009aabc7bcd259d4c451059a31c602edf409a59c1204fc8bfb531984d7ab42a820a8b22cbcb19d000c996fb6746a409e70cfb39687fd57440dd4aa24f
|
data/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [0.4.5] - 2026.01.03
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Fix `Kamisaku::PDF` validation for category and template
|
|
12
|
+
|
|
13
|
+
## [0.4.4] - 2026.01.01
|
|
9
14
|
|
|
10
15
|
### Changed
|
|
11
16
|
- Improve error handling in `yaml_str_to_content_hash` and `BaseContentValidator`
|
data/Gemfile.lock
CHANGED
data/lib/kamisaku/pdf.rb
CHANGED
|
@@ -14,11 +14,17 @@ module Kamisaku
|
|
|
14
14
|
@category = category.to_sym
|
|
15
15
|
@template = template.to_sym
|
|
16
16
|
|
|
17
|
-
raise Error, "Invalid template name '#{template}'" unless template.is_a?(String)
|
|
18
17
|
validator_klass = CONTENT_VALIDATOR_MAP[@category]
|
|
19
|
-
|
|
18
|
+
|
|
19
|
+
unless validator_klass
|
|
20
|
+
raise Error, "Invalid category '#{@category}'"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
unless validator_klass::TEMPLATES.include?(@template)
|
|
24
|
+
raise Error, "Invalid template '#{@template}'"
|
|
25
|
+
end
|
|
26
|
+
|
|
20
27
|
validator_klass.new(content_hash:).validate!
|
|
21
|
-
raise Error, "Invalid template name '#{@template}'" unless validator_klass::TEMPLATES.include?(@template)
|
|
22
28
|
end
|
|
23
29
|
|
|
24
30
|
def write_to(pdf_location)
|
data/lib/kamisaku/version.rb
CHANGED