minicrest 1.0.20 → 1.0.21

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: 58f5e87992e24bee1a51f8f51ce095394c64f6900b4dbbbb4bdbde2010432343
4
- data.tar.gz: b5b8bc6eed685cbcd6e8b07292c141dcafcb10475e6162df7c54b4c736ccb434
3
+ metadata.gz: e4f95caa61017fb53e3c2469918c1bd28d351b524da833c3634fb5631d1fa0de
4
+ data.tar.gz: '09a959642ed37be0cf39da96f99620b572eed7ee0d5575172ed929bf26ec0f94'
5
5
  SHA512:
6
- metadata.gz: 277c1b9a9bd11b6443cd55ce20b3444a951cea80b0f1bda89c052dbf5bb2d0cfa36e01cc03c9532bacc7ca903b81912bba60442a1c017232237a2b1a9f67835a
7
- data.tar.gz: 25adcc959dde84205306c2bd6d56d83164534b8607cfcd0f64716afec17da97b206d15e4202d861531b3092476e6a6febf2fc3c1b74c14bfd77d18e860d17a0e
6
+ metadata.gz: 2b6a5361aa25a593d7fecab4d668c6f3e6a2fb3fe7b4c721f77a56868926a21f8c510fb133573603689d3e620121d0b73d10091231c6462715408a0980d6a432
7
+ data.tar.gz: 5f692e08fd96f10f2040a228c5383bdcc33277d88c5ac7521c27a9a5b28b97dba31f60a76587735f24cdd353e499e98d872acaf14211080b3df0c6d9ef7946c6
data/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.0.21] - 2026-01-18
11
+
12
+ ### Fixed
13
+ - Improved `docs:fix` task to handle more YARD-transformed filenames (like `README_md.html`, `USAGE_md.html`, etc.) and ensure they are correctly mapped to their final `file.*.html` counterparts.
14
+
10
15
  ## [1.0.20] - 2026-01-18
11
16
 
12
17
  ### Changed
data/Rakefile CHANGED
@@ -63,6 +63,10 @@ namespace :docs do
63
63
  # 2. Convert all relative links to absolute links in HTML files and inject version
64
64
  puts "Converting relative links to absolute and injecting version #{version} in #{doc_dir}..."
65
65
 
66
+ extra_files_mapping = {
67
+ 'USAGE_md.html' => 'file.USAGE.html',
68
+ }
69
+
66
70
  Find.find(doc_dir) do |path|
67
71
  next unless path.end_with?('.html')
68
72
 
@@ -81,11 +85,27 @@ namespace :docs do
81
85
  attr = $1
82
86
  url = $2
83
87
 
84
- # Skip absolute URLs, anchors, and data URIs
85
- if url.start_with?('http://', 'https://', '#', 'data:') || url.empty?
88
+ # If it's an absolute URL starting with our base_url, we might need to fix it
89
+ if url.start_with?(base_url)
90
+ relative_part = url.sub(base_url, '')
91
+ if extra_files_mapping.key?(relative_part)
92
+ "#{attr}=\"#{base_url}#{extra_files_mapping[relative_part]}\""
93
+ else
94
+ match
95
+ end
96
+ # Skip other absolute URLs, anchors, and data URIs
97
+ elsif url.start_with?('http://', 'https://', '#', 'data:') || url.empty?
86
98
  match
87
99
  else
88
- absolute_file_path = File.expand_path(url, File.dirname(path))
100
+ # Fix links to extra files that YARD renames
101
+ target_url = extra_files_mapping[url] || url
102
+
103
+ # If it's one of our extra files, it's at the root of doc/
104
+ if extra_files_mapping.key?(url)
105
+ absolute_file_path = File.join(File.expand_path(doc_dir), target_url)
106
+ else
107
+ absolute_file_path = File.expand_path(target_url, File.dirname(path))
108
+ end
89
109
 
90
110
  if absolute_file_path.start_with?(File.expand_path(doc_dir))
91
111
  relative_to_doc_root = absolute_file_path.sub(File.expand_path(doc_dir) + '/', '')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Minicrest
4
- VERSION = '1.0.20'
4
+ VERSION = '1.0.21'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minicrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillermo Gutierrez Almazor