yard-fence 0.7.0 → 0.8.0
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
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +19 -1
- data/README.md +9 -1
- data/lib/yard/fence/hoist.rb +18 -6
- data/lib/yard/fence/kramdown_gfm_document.rb +0 -10
- data/lib/yard/fence/version.rb +1 -1
- data/lib/yard/fence.rb +17 -5
- data/sig/yard/fence.rbs +15 -0
- data.tar.gz.sig +1 -2
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: efcf6aabcf9abcf8dcf8e1878511c03251163a4badfd5b3bb70f14945586a60a
|
|
4
|
+
data.tar.gz: 3f2b3b47d984092fc321a8f20b93a0c61fb2df7a8693f00c1e321ddfd1378625
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e11299ec5ad361db6eeac761c165c4e46ec0d70b7fb176476a4a2a8236323a9dfe7df81a1bd3ea5ec94db3476caa24eb40f608bc19c76262c3eab25b52af1112
|
|
7
|
+
data.tar.gz: e0e1020769588c7f576b0c6d34e0effe4042803407b5ea5dd215fca1037ec114fe029ee8684608517011c8dfea5ce956f27c4288e3c03b757dbc85356eff23c6
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,22 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [0.8.0] - 2025-11-08
|
|
34
|
+
|
|
35
|
+
- TAG: [v0.8.0][0.8.0t]
|
|
36
|
+
- COVERAGE: 100.00% -- 121/121 lines in 4 files
|
|
37
|
+
- BRANCH COVERAGE: 100.00% -- 36/36 branches in 4 files
|
|
38
|
+
- 37.93% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- Allow disabling of yard-fence via YARD_FENCE_DISABLE=true (default false)
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- Usage instructions in README.md
|
|
47
|
+
- Include `--markup-provider kramdown`
|
|
48
|
+
|
|
33
49
|
## [0.7.0] - 2025-11-08
|
|
34
50
|
|
|
35
51
|
- TAG: [v0.7.0][0.7.0t]
|
|
@@ -116,7 +132,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
116
132
|
|
|
117
133
|
- Initial release
|
|
118
134
|
|
|
119
|
-
[Unreleased]: https://github.com/galtzo-floss/yard-fence/compare/v0.
|
|
135
|
+
[Unreleased]: https://github.com/galtzo-floss/yard-fence/compare/v0.8.0...HEAD
|
|
136
|
+
[0.8.0]: https://github.com/galtzo-floss/yard-fence/compare/v0.7.0...v0.8.0
|
|
137
|
+
[0.8.0t]: https://github.com/galtzo-floss/yard-fence/releases/tag/v0.8.0
|
|
120
138
|
[0.7.0]: https://github.com/galtzo-floss/yard-fence/compare/v0.6.0...v0.7.0
|
|
121
139
|
[0.7.0t]: https://github.com/galtzo-floss/yard-fence/releases/tag/v0.7.0
|
|
122
140
|
[0.6.0]: https://github.com/galtzo-floss/yard-fence/compare/v0.5.0...v0.6.0
|
data/README.md
CHANGED
|
@@ -63,7 +63,9 @@ Create a `.yardopts` file like this:
|
|
|
63
63
|
--plugin fence
|
|
64
64
|
-e yard/fence/hoist.rb
|
|
65
65
|
--readme tmp/yard-fence/README.md
|
|
66
|
+
--charset utf-8
|
|
66
67
|
--markup markdown
|
|
68
|
+
--markup-provider kramdown
|
|
67
69
|
--output docs
|
|
68
70
|
'lib/**/*.rb'
|
|
69
71
|
-
|
|
@@ -205,7 +207,9 @@ Recommended .yardopts (noise‑free):
|
|
|
205
207
|
--plugin fence
|
|
206
208
|
-e yard/fence/hoist.rb
|
|
207
209
|
--readme tmp/yard-fence/README.md
|
|
210
|
+
--charset utf-8
|
|
208
211
|
--markup markdown
|
|
212
|
+
--markup-provider kramdown
|
|
209
213
|
--output docs
|
|
210
214
|
'lib/**/*.rb'
|
|
211
215
|
-
|
|
@@ -226,6 +230,10 @@ yard doc \
|
|
|
226
230
|
--plugin fence \
|
|
227
231
|
-e yard/fence/hoist.rb \
|
|
228
232
|
--readme tmp/yard-fence/README.md \
|
|
233
|
+
--charset utf-8 \
|
|
234
|
+
--markup markdown \
|
|
235
|
+
--markup-provider kramdown \
|
|
236
|
+
--output docs \
|
|
229
237
|
lib/**/*.rb - tmp/yard-fence/*.md tmp/yard-fence/*.txt
|
|
230
238
|
```
|
|
231
239
|
|
|
@@ -586,7 +594,7 @@ Thanks for RTFM. ☺️
|
|
|
586
594
|
[📌gitmoji]: https://gitmoji.dev
|
|
587
595
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
588
596
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
589
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
597
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.121-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
590
598
|
[🔐security]: SECURITY.md
|
|
591
599
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
592
600
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/lib/yard/fence/hoist.rb
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
if
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
if ENV.fetch("YARD_FENCE_DISABLE", "false").casecmp?("true")
|
|
2
|
+
warn("[yard/fence/hoist] Hoist disabled via YARD_FENCE_DISABLE")
|
|
3
|
+
else
|
|
4
|
+
unless defined?(KramdownGfmDocument)
|
|
5
|
+
# Ensure YARD can resolve the provider constant at the top-level
|
|
6
|
+
# YARD does something akin to Object.const_get("::" + const), so it expects
|
|
7
|
+
# a top-level ::KramdownGfmDocument when const == "KramdownGfmDocument".
|
|
8
|
+
# Provide an alias to our namespaced implementation.
|
|
9
|
+
KramdownGfmDocument = Yard::Fence::KramdownGfmDocument
|
|
10
|
+
puts "[yard/fence/hoist] KramdownGfmDocument hoisted to top-level"
|
|
11
|
+
end
|
|
12
|
+
if defined?(Yard::Fence) && Yard::Fence.respond_to?(:use_kramdown_gfm!)
|
|
13
|
+
if Yard::Fence.use_kramdown_gfm!
|
|
14
|
+
puts "[yard/fence/hoist] Kramdown GFM provider registered"
|
|
15
|
+
else
|
|
16
|
+
warn "[yard/fence/hoist] Kramdown GFM provider registration failed"
|
|
17
|
+
end
|
|
4
18
|
else
|
|
5
|
-
warn
|
|
19
|
+
warn("[yard/fence/hoist] Yard::Fence.use_kramdown_gfm! not available; skipping")
|
|
6
20
|
end
|
|
7
|
-
else
|
|
8
|
-
warn("[yard/fence/hoist] Yard::Fence.use_kramdown_gfm! not available; skipping")
|
|
9
21
|
end
|
|
@@ -66,13 +66,3 @@ module Yard
|
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
|
-
|
|
70
|
-
# Ensure YARD can resolve the provider constant at the top-level
|
|
71
|
-
# YARD does something akin to Object.const_get("::" + const), so it expects
|
|
72
|
-
# a top-level ::KramdownGfmDocument when const == "KramdownGfmDocument".
|
|
73
|
-
# Provide an alias to our namespaced implementation.
|
|
74
|
-
# :nocov:
|
|
75
|
-
unless defined?(KramdownGfmDocument)
|
|
76
|
-
KramdownGfmDocument = Yard::Fence::KramdownGfmDocument
|
|
77
|
-
end
|
|
78
|
-
# :nocov:
|
data/lib/yard/fence/version.rb
CHANGED
data/lib/yard/fence.rb
CHANGED
|
@@ -167,10 +167,16 @@ module Yard
|
|
|
167
167
|
end
|
|
168
168
|
|
|
169
169
|
def postprocess_html_docs
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
if ENV.fetch("YARD_FENCE_DISABLE", "false").casecmp?("true")
|
|
171
|
+
# :nocov:
|
|
172
|
+
warn("[yard/fence] postprocess_html_docs disabled via YARD_FENCE_DISABLE")
|
|
173
|
+
# :nocov:
|
|
174
|
+
else
|
|
175
|
+
docs = File.join(Dir.pwd, "docs")
|
|
176
|
+
return unless Dir.exist?(docs)
|
|
177
|
+
Dir.glob(File.join(docs, "**", "*.html")).each do |html|
|
|
178
|
+
restore_ascii_braces_in_html_file(html)
|
|
179
|
+
end
|
|
174
180
|
end
|
|
175
181
|
rescue => e
|
|
176
182
|
warn("Yard::Fence.postprocess_html_docs failed: #{e.class}: #{e.message}")
|
|
@@ -203,7 +209,13 @@ module Yard
|
|
|
203
209
|
end
|
|
204
210
|
|
|
205
211
|
def at_load_hook
|
|
206
|
-
|
|
212
|
+
if ENV.fetch("YARD_FENCE_DISABLE", "false").casecmp?("true")
|
|
213
|
+
# :nocov:
|
|
214
|
+
warn("[yard/fence] at_load_hook disabled via YARD_FENCE_DISABLE")
|
|
215
|
+
# :nocov:
|
|
216
|
+
else
|
|
217
|
+
Yard::Fence.prepare_tmp_files
|
|
218
|
+
end
|
|
207
219
|
rescue => e
|
|
208
220
|
warn("Yard::Fence: failed to prepare tmp/yard-fence files: #{e.class}: #{e.message}")
|
|
209
221
|
end
|
data/sig/yard/fence.rbs
CHANGED
|
@@ -48,7 +48,22 @@ module Yard
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
class KramdownGfmDocument < ::Kramdown::Document
|
|
51
|
+
# From implementation: stores original source and forces GFM input by default
|
|
52
|
+
UNRENDERED_FENCE_PARAGRAPH: ::Regexp
|
|
53
|
+
DETAILS_MARKDOWN_1: ::Regexp
|
|
54
|
+
|
|
51
55
|
def initialize: (String source, ?Hash[Symbol, untyped] options) -> void
|
|
56
|
+
|
|
57
|
+
# Public API
|
|
58
|
+
def to_html: () -> String
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
62
|
+
def needs_fallback?: (String html) -> bool
|
|
63
|
+
def fallback_improved?: (String fb_html) -> bool
|
|
52
64
|
end
|
|
53
65
|
end
|
|
54
66
|
end
|
|
67
|
+
|
|
68
|
+
# Top-level alias used by YARD's constant resolution (see ruby implementation)
|
|
69
|
+
KramdownGfmDocument: Yard::Fence::KramdownGfmDocument
|
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
�
|
|
2
|
-
k\':�ݞ
|
|
1
|
+
NN�n�8*;��@{�h1�
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yard-fence
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -316,10 +316,10 @@ licenses:
|
|
|
316
316
|
- MIT
|
|
317
317
|
metadata:
|
|
318
318
|
homepage_uri: https://yard-fence.galtzo.com/
|
|
319
|
-
source_code_uri: https://github.com/galtzo-floss/yard-fence/tree/v0.
|
|
320
|
-
changelog_uri: https://github.com/galtzo-floss/yard-fence/blob/v0.
|
|
319
|
+
source_code_uri: https://github.com/galtzo-floss/yard-fence/tree/v0.8.0
|
|
320
|
+
changelog_uri: https://github.com/galtzo-floss/yard-fence/blob/v0.8.0/CHANGELOG.md
|
|
321
321
|
bug_tracker_uri: https://github.com/galtzo-floss/yard-fence/issues
|
|
322
|
-
documentation_uri: https://www.rubydoc.info/gems/yard-fence/0.
|
|
322
|
+
documentation_uri: https://www.rubydoc.info/gems/yard-fence/0.8.0
|
|
323
323
|
funding_uri: https://github.com/sponsors/pboling
|
|
324
324
|
wiki_uri: https://github.com/galtzo-floss/yard-fence/wiki
|
|
325
325
|
news_uri: https://www.railsbling.com/tags/yard-fence
|
metadata.gz.sig
CHANGED
|
Binary file
|