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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae6dcfe51810b9a986f61743a22d04c210ec80567f13e53cd7461322d2290cc6
4
- data.tar.gz: fd0c2eb3f21d73945441e73f20c4df546139705ea86f8fca0f2f915651a65662
3
+ metadata.gz: 2998be93b0d3bcc24cfcd15f35718cbbc102817f54f887122543885a251cb0aa
4
+ data.tar.gz: 41ea9e2d8bcaecd42bd9a2c1b60f875f59c8995fb9ed94013e2d5d5636e2c36c
5
5
  SHA512:
6
- metadata.gz: e8017948750e46d8e03b3f117f773adf57372fab04ee0832fb2749791ef0639abc1ab4cfa59b4b657d234b796a2e087f31a3ebd2666d7d8b414743a7ecb4f516
7
- data.tar.gz: 7bd63162c94f5d6dd7f282b894229447214462d4c4ceed734c386376203831a5b0932c066ad89101b8f4aced9ed505543c9e31a9f3b1de73175625ddea00f63f
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
- ## [Unreleased]
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kamisaku (0.4.4)
4
+ kamisaku (0.4.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
- raise Error, "Invalid template name '#{@category}'" unless validator_klass
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kamisaku
4
- VERSION = "0.4.4"
4
+ VERSION = "0.4.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamisaku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sinaru Gunawardena