jekyll-pandoc-exports 0.2.0 → 0.2.1

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: 70da42a9e14e74c755a0e9cda4cc17a5fbe348075214d1d1820f3a06d40da60b
4
- data.tar.gz: a862b3fab61784e2d37501f1e73982ab6e68495a6c90f7fadebd352abcaa7a5c
3
+ metadata.gz: 757b5de130bc97bc0eb7c9146b1f87345fdffc957f7b3d7b029338d0cf331a95
4
+ data.tar.gz: 360baac256fd516a6b3fedc103cd73ecc4a665ee59cc04967167d4cb112115d7
5
5
  SHA512:
6
- metadata.gz: 402bf541eaa772936ef7b2cc8691f557020c1d830a0bfeedf7d5b798ad5ffc6a7c2679fe4643115195651743d80ef0cb42b5064ee1f3594cec4ca172ce970baa
7
- data.tar.gz: 07e74c42a95154d183431db6164546aa589e09fc71d28f77f37315dbf8e32175c84b84a324f77607ef83e623999a9c8168785858adc11a587478596e6622eade
6
+ metadata.gz: 8755cec232203510747948c978d19057c2342077a8b78b89c85cd6cd7a18bbafaace943b9099d49dae160093bf8edb206464cb63791a9c097f63d2879855cf0c
7
+ data.tar.gz: 98f420fbed0de5d9df040632eafe86d31ba585bbe4dc2147efc455490ffd5b58eb058418f1abe9196b4d77477eecae1e3822e05cedf64abd7dafb5b01d3cedfc
data/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2026-05-07
11
+
12
+ ### Added
13
+ - Schema validation now accepts `subsections` array field on experience entries
14
+ - Validates each subsection object has `title` (string) and `text` (string)
15
+ - Entries without `subsections`, `details`, or `summary` now report a validation error
16
+ - 18 new unit tests for subsections schema validation (test/test_schema_subsections.rb)
17
+
18
+ ### Changed
19
+ - Version bump to 0.2.1 (patch: backward-compatible validation enhancement)
20
+
10
21
  ## [0.2.0] - 2026-05-06
11
22
 
12
23
  ### Added
@@ -110,6 +110,35 @@ module Jekyll
110
110
  errors << "Experience ##{i + 1} missing 'role'" unless exp['role']
111
111
  errors << "Experience ##{i + 1} missing 'company'" unless exp['company']
112
112
  errors << "Experience ##{i + 1} missing 'time'" unless exp['time']
113
+
114
+ # Require at least one content field
115
+ has_summary = exp['summary'].is_a?(String) && !exp['summary'].strip.empty?
116
+ has_details = exp['details'].is_a?(String) && !exp['details'].strip.empty?
117
+ has_subsections = exp['subsections'].is_a?(Array) && !exp['subsections'].empty?
118
+
119
+ unless has_summary || has_details || has_subsections
120
+ errors << "Experience ##{i + 1} ('#{exp['role']}') must have at least one of: 'summary', 'details', or 'subsections'"
121
+ end
122
+
123
+ # Validate subsections structure if present
124
+ if exp['subsections']
125
+ unless exp['subsections'].is_a?(Array)
126
+ errors << "Experience ##{i + 1} ('#{exp['role']}') 'subsections' must be an array"
127
+ else
128
+ exp['subsections'].each_with_index do |sub, j|
129
+ unless sub.is_a?(Hash)
130
+ errors << "Experience ##{i + 1} ('#{exp['role']}') subsection ##{j + 1} must be an object"
131
+ next
132
+ end
133
+ unless sub['title'].is_a?(String) && !sub['title'].strip.empty?
134
+ errors << "Experience ##{i + 1} ('#{exp['role']}') subsection ##{j + 1} missing or invalid 'title' (must be a non-empty string)"
135
+ end
136
+ unless sub['text'].is_a?(String) && !sub['text'].strip.empty?
137
+ errors << "Experience ##{i + 1} ('#{exp['role']}') subsection ##{j + 1} missing or invalid 'text' (must be a non-empty string)"
138
+ end
139
+ end
140
+ end
141
+ end
113
142
  end
114
143
  end
115
144
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module PandocExports
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-pandoc-exports
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael McGarrah
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-06 00:00:00.000000000 Z
11
+ date: 2026-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll