yard-fence 0.7.0 → 0.8.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +39 -1
- data/README.md +39 -8
- 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 +38 -5
- data/sig/yard/fence.rbs +15 -0
- data.tar.gz.sig +0 -0
- metadata +27 -7
- 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: bc262c091f78581d3821583ece2da12cd358b65c7d0acf746d4d6707716e954e
|
|
4
|
+
data.tar.gz: '0942c781301e6bd8797d6f2469536f7fb78f9ec94c0925f392dfc3ea4b85291f'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55f59d786ae901ffce17587bd780277dfad50937d2a4e3ebb3d1c7bd7c20f0509c1ca24ee2de9dd614aa206179bae4919257399d398e5c4b997e2d5874669e72
|
|
7
|
+
data.tar.gz: 974da0442ee2e4f4cbb42a7c0cf9100226d05a0ffe58b53a86ee6436bc198dc9807261b44daa9ad5d708a4ee1fbff16ab93c9ed413747e2e7f65340d7cac6ce9
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,40 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [0.8.1] - 2025-12-29
|
|
34
|
+
|
|
35
|
+
- TAG: [v0.8.1][0.8.1t]
|
|
36
|
+
- COVERAGE: 100.00% -- 129/129 lines in 4 files
|
|
37
|
+
- BRANCH COVERAGE: 100.00% -- 40/40 branches in 4 files
|
|
38
|
+
- 40.00% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- `YARD_FENCE_CLEAN_DOCS` environment variable to optionally clear the `docs/` directory before regeneration
|
|
43
|
+
- Set to `true` to enable; prevents stale HTML files from persisting when markdown source files are deleted
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- `prepare_tmp_files` now clears the `tmp/yard-fence/` staging directory before regenerating files
|
|
48
|
+
- This prevents stale preprocessed files from persisting when source markdown files are deleted
|
|
49
|
+
- Previously, files added manually or by other processes to `tmp/yard-fence/` would remain and get included in documentation
|
|
50
|
+
|
|
51
|
+
## [0.8.0] - 2025-11-08
|
|
52
|
+
|
|
53
|
+
- TAG: [v0.8.0][0.8.0t]
|
|
54
|
+
- COVERAGE: 100.00% -- 121/121 lines in 4 files
|
|
55
|
+
- BRANCH COVERAGE: 100.00% -- 36/36 branches in 4 files
|
|
56
|
+
- 37.93% documented
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- Allow disabling of yard-fence via YARD_FENCE_DISABLE=true (default false)
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- Usage instructions in README.md
|
|
65
|
+
- Include `--markup-provider kramdown`
|
|
66
|
+
|
|
33
67
|
## [0.7.0] - 2025-11-08
|
|
34
68
|
|
|
35
69
|
- TAG: [v0.7.0][0.7.0t]
|
|
@@ -116,7 +150,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
116
150
|
|
|
117
151
|
- Initial release
|
|
118
152
|
|
|
119
|
-
[Unreleased]: https://github.com/galtzo-floss/yard-fence/compare/v0.
|
|
153
|
+
[Unreleased]: https://github.com/galtzo-floss/yard-fence/compare/v0.8.1...HEAD
|
|
154
|
+
[0.8.1]: https://github.com/galtzo-floss/yard-fence/compare/v0.8.0...v0.8.1
|
|
155
|
+
[0.8.1t]: https://github.com/galtzo-floss/yard-fence/releases/tag/v0.8.1
|
|
156
|
+
[0.8.0]: https://github.com/galtzo-floss/yard-fence/compare/v0.7.0...v0.8.0
|
|
157
|
+
[0.8.0t]: https://github.com/galtzo-floss/yard-fence/releases/tag/v0.8.0
|
|
120
158
|
[0.7.0]: https://github.com/galtzo-floss/yard-fence/compare/v0.6.0...v0.7.0
|
|
121
159
|
[0.7.0t]: https://github.com/galtzo-floss/yard-fence/releases/tag/v0.7.0
|
|
122
160
|
[0.6.0]: https://github.com/galtzo-floss/yard-fence/compare/v0.5.0...v0.6.0
|
data/README.md
CHANGED
|
@@ -27,16 +27,18 @@
|
|
|
27
27
|
[gem-server]: https://github.com/galtzo-floss/gem-server
|
|
28
28
|
[reinteractive-podcast]: https://youtu.be/_H4qbtC5qzU?si=BvuBU90R2wAqD2E6
|
|
29
29
|
|
|
30
|
-
[![Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0][🖼️galtzo-i]][🖼️galtzo-discord] [![ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5][🖼️ruby-lang-i]][🖼️ruby-lang]
|
|
30
|
+
[![Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0][🖼️galtzo-i]][🖼️galtzo-discord] [![ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5][🖼️ruby-lang-i]][🖼️ruby-lang] [![yard-fence Logo by Aboling0, CC BY-SA 4.0][🖼️yard-fence-i]][🖼️yard-fence]
|
|
31
31
|
|
|
32
32
|
[🖼️galtzo-i]: https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg
|
|
33
33
|
[🖼️galtzo-discord]: https://discord.gg/3qme4XHNKN
|
|
34
34
|
[🖼️ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg
|
|
35
35
|
[🖼️ruby-lang]: https://www.ruby-lang.org/
|
|
36
|
+
[🖼️yard-fence-i]: https://logos.galtzo.com/assets/images/galtzo-floss/yard-fence/avatar-192px.svg
|
|
37
|
+
[🖼️yard-fence]: https://github.com/galtzo-floss/yard-fence
|
|
36
38
|
|
|
37
39
|
# 🤺 Yard::Fence
|
|
38
40
|
|
|
39
|
-
[![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov] [![QLTY Maintainability][🏀qlty-mnti]][🏀qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![
|
|
41
|
+
[![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov] [![QLTY Maintainability][🏀qlty-mnti]][🏀qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
|
|
40
42
|
|
|
41
43
|
`if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][🖼️galtzo-discord], as I may have missed the [discord notification][🖼️galtzo-discord].
|
|
42
44
|
|
|
@@ -63,7 +65,9 @@ Create a `.yardopts` file like this:
|
|
|
63
65
|
--plugin fence
|
|
64
66
|
-e yard/fence/hoist.rb
|
|
65
67
|
--readme tmp/yard-fence/README.md
|
|
68
|
+
--charset utf-8
|
|
66
69
|
--markup markdown
|
|
70
|
+
--markup-provider kramdown
|
|
67
71
|
--output docs
|
|
68
72
|
'lib/**/*.rb'
|
|
69
73
|
-
|
|
@@ -78,7 +82,7 @@ See the configuration and usage sections for more details.
|
|
|
78
82
|
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
79
83
|
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
80
84
|
| Works with JRuby | [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
|
|
81
|
-
| Works with Truffle Ruby | [![Truffle Ruby
|
|
85
|
+
| Works with Truffle Ruby | [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] |
|
|
82
86
|
| Works with MRI Ruby 3 | [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] |
|
|
83
87
|
| Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork] [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor] |
|
|
84
88
|
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
|
|
@@ -205,7 +209,9 @@ Recommended .yardopts (noise‑free):
|
|
|
205
209
|
--plugin fence
|
|
206
210
|
-e yard/fence/hoist.rb
|
|
207
211
|
--readme tmp/yard-fence/README.md
|
|
212
|
+
--charset utf-8
|
|
208
213
|
--markup markdown
|
|
214
|
+
--markup-provider kramdown
|
|
209
215
|
--output docs
|
|
210
216
|
'lib/**/*.rb'
|
|
211
217
|
-
|
|
@@ -215,7 +221,30 @@ Recommended .yardopts (noise‑free):
|
|
|
215
221
|
|
|
216
222
|
Why tmp/yard-fence/?
|
|
217
223
|
|
|
218
|
-
- The plugin converts ASCII `{ }` to fullwidth `{ }` only in `tmp/yard-fence/` so YARD won
|
|
224
|
+
- The plugin converts ASCII `{ }` to fullwidth `{ }` only in `tmp/yard-fence/` so YARD won't treat brace content as reference tags and emit `InvalidLink` warnings. After docs are generated, the HTML is restored back to normal ASCII braces for easy copy/paste.
|
|
225
|
+
|
|
226
|
+
### Environment Variables
|
|
227
|
+
|
|
228
|
+
| Variable | Default | Description |
|
|
229
|
+
|----------|---------|-------------|
|
|
230
|
+
| `YARD_FENCE_DISABLE` | `false` | Set to `true` to disable all yard-fence processing |
|
|
231
|
+
| `YARD_FENCE_CLEAN_DOCS` | `false` | Set to `true` to clear `docs/` directory before regeneration (prevents stale files) |
|
|
232
|
+
| `YARD_FENCE_SKIP_AT_EXIT` | `0` | Set to `1` to skip the at_exit hook that restores ASCII braces in HTML |
|
|
233
|
+
| `YARD_DEBUG` | `false` | Set to `true` to enable debug output |
|
|
234
|
+
|
|
235
|
+
#### Preventing Stale Files
|
|
236
|
+
|
|
237
|
+
When markdown files are removed from your project, their corresponding HTML files may remain in `docs/`. To ensure a clean build:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# Option 1: Use the YARD_FENCE_CLEAN_DOCS environment variable
|
|
241
|
+
YARD_FENCE_CLEAN_DOCS=true bundle exec yard
|
|
242
|
+
|
|
243
|
+
# Option 2: Manually clear the docs directory before running yard
|
|
244
|
+
rm -rf docs/ && bundle exec yard
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
The `tmp/yard-fence/` staging directory is always cleared automatically before regeneration to prevent stale preprocessed files.
|
|
219
248
|
|
|
220
249
|
## 🔧 Basic Usage
|
|
221
250
|
|
|
@@ -226,6 +255,10 @@ yard doc \
|
|
|
226
255
|
--plugin fence \
|
|
227
256
|
-e yard/fence/hoist.rb \
|
|
228
257
|
--readme tmp/yard-fence/README.md \
|
|
258
|
+
--charset utf-8 \
|
|
259
|
+
--markup markdown \
|
|
260
|
+
--markup-provider kramdown \
|
|
261
|
+
--output docs \
|
|
229
262
|
lib/**/*.rb - tmp/yard-fence/*.md tmp/yard-fence/*.txt
|
|
230
263
|
```
|
|
231
264
|
|
|
@@ -357,7 +390,7 @@ the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
|
|
|
357
390
|
For example:
|
|
358
391
|
|
|
359
392
|
```ruby
|
|
360
|
-
spec.add_dependency("yard-fence", "~> 0.
|
|
393
|
+
spec.add_dependency("yard-fence", "~> 0.8")
|
|
361
394
|
```
|
|
362
395
|
|
|
363
396
|
<details markdown="1">
|
|
@@ -531,8 +564,6 @@ Thanks for RTFM. ☺️
|
|
|
531
564
|
[🚎6-s-wfi]: https://github.com/galtzo-floss/yard-fence/actions/workflows/supported.yml/badge.svg
|
|
532
565
|
[🚎8-ho-wf]: https://github.com/galtzo-floss/yard-fence/actions/workflows/hoary.yml
|
|
533
566
|
[🚎8-ho-wfi]: https://github.com/galtzo-floss/yard-fence/actions/workflows/hoary.yml/badge.svg
|
|
534
|
-
[🚎9-t-wf]: https://github.com/galtzo-floss/yard-fence/actions/workflows/truffle.yml
|
|
535
|
-
[🚎9-t-wfi]: https://github.com/galtzo-floss/yard-fence/actions/workflows/truffle.yml/badge.svg
|
|
536
567
|
[🚎10-j-wf]: https://github.com/galtzo-floss/yard-fence/actions/workflows/jruby.yml
|
|
537
568
|
[🚎10-j-wfi]: https://github.com/galtzo-floss/yard-fence/actions/workflows/jruby.yml/badge.svg
|
|
538
569
|
[🚎11-c-wf]: https://github.com/galtzo-floss/yard-fence/actions/workflows/current.yml
|
|
@@ -586,7 +617,7 @@ Thanks for RTFM. ☺️
|
|
|
586
617
|
[📌gitmoji]: https://gitmoji.dev
|
|
587
618
|
[📌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
619
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
589
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
620
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.129-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
590
621
|
[🔐security]: SECURITY.md
|
|
591
622
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
592
623
|
[📄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
|
@@ -144,9 +144,15 @@ module Yard
|
|
|
144
144
|
end
|
|
145
145
|
|
|
146
146
|
# Copy top-level *.md/*.txt into tmp/yard-fence/ with the above sanitization applied.
|
|
147
|
+
# Clears the staging directory first to prevent stale files from persisting.
|
|
147
148
|
def prepare_tmp_files
|
|
148
149
|
root = Dir.pwd
|
|
149
150
|
outdir = File.join(root, "tmp", "yard-fence")
|
|
151
|
+
|
|
152
|
+
# Clear existing staging directory to prevent stale files from persisting.
|
|
153
|
+
# This ensures that if a markdown file is deleted from the project root,
|
|
154
|
+
# it won't remain in tmp/yard-fence/ and get included in documentation.
|
|
155
|
+
FileUtils.rm_rf(outdir)
|
|
150
156
|
FileUtils.mkdir_p(outdir)
|
|
151
157
|
|
|
152
158
|
candidates = Dir.glob(File.join(root, GLOB_PATTERN))
|
|
@@ -167,10 +173,16 @@ module Yard
|
|
|
167
173
|
end
|
|
168
174
|
|
|
169
175
|
def postprocess_html_docs
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
176
|
+
if ENV.fetch("YARD_FENCE_DISABLE", "false").casecmp?("true")
|
|
177
|
+
# :nocov:
|
|
178
|
+
warn("[yard/fence] postprocess_html_docs disabled via YARD_FENCE_DISABLE")
|
|
179
|
+
# :nocov:
|
|
180
|
+
else
|
|
181
|
+
docs = File.join(Dir.pwd, "docs")
|
|
182
|
+
return unless Dir.exist?(docs)
|
|
183
|
+
Dir.glob(File.join(docs, "**", "*.html")).each do |html|
|
|
184
|
+
restore_ascii_braces_in_html_file(html)
|
|
185
|
+
end
|
|
174
186
|
end
|
|
175
187
|
rescue => e
|
|
176
188
|
warn("Yard::Fence.postprocess_html_docs failed: #{e.class}: #{e.message}")
|
|
@@ -202,8 +214,29 @@ module Yard
|
|
|
202
214
|
false
|
|
203
215
|
end
|
|
204
216
|
|
|
217
|
+
# Clear the docs output directory to remove stale generated files.
|
|
218
|
+
# Only runs when YARD_FENCE_CLEAN_DOCS=true is set.
|
|
219
|
+
# This ensures that if a markdown file is deleted from the project,
|
|
220
|
+
# its corresponding HTML file won't remain in docs/.
|
|
221
|
+
def clean_docs_directory
|
|
222
|
+
return unless ENV.fetch("YARD_FENCE_CLEAN_DOCS", "false").casecmp?("true")
|
|
223
|
+
|
|
224
|
+
docs = File.join(Dir.pwd, "docs")
|
|
225
|
+
return unless Dir.exist?(docs)
|
|
226
|
+
|
|
227
|
+
FileUtils.rm_rf(docs)
|
|
228
|
+
puts "[yard/fence] Cleared docs/ directory (YARD_FENCE_CLEAN_DOCS=true)"
|
|
229
|
+
end
|
|
230
|
+
|
|
205
231
|
def at_load_hook
|
|
206
|
-
|
|
232
|
+
if ENV.fetch("YARD_FENCE_DISABLE", "false").casecmp?("true")
|
|
233
|
+
# :nocov:
|
|
234
|
+
warn("[yard/fence] at_load_hook disabled via YARD_FENCE_DISABLE")
|
|
235
|
+
# :nocov:
|
|
236
|
+
else
|
|
237
|
+
Yard::Fence.clean_docs_directory
|
|
238
|
+
Yard::Fence.prepare_tmp_files
|
|
239
|
+
end
|
|
207
240
|
rescue => e
|
|
208
241
|
warn("Yard::Fence: failed to prepare tmp/yard-fence files: #{e.class}: #{e.message}")
|
|
209
242
|
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
|
Binary file
|
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.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -201,6 +201,26 @@ dependencies:
|
|
|
201
201
|
- - "~>"
|
|
202
202
|
- !ruby/object:Gem::Version
|
|
203
203
|
version: '3.0'
|
|
204
|
+
- !ruby/object:Gem::Dependency
|
|
205
|
+
name: kettle-soup-cover
|
|
206
|
+
requirement: !ruby/object:Gem::Requirement
|
|
207
|
+
requirements:
|
|
208
|
+
- - "~>"
|
|
209
|
+
- !ruby/object:Gem::Version
|
|
210
|
+
version: '1.1'
|
|
211
|
+
- - ">="
|
|
212
|
+
- !ruby/object:Gem::Version
|
|
213
|
+
version: 1.1.1
|
|
214
|
+
type: :development
|
|
215
|
+
prerelease: false
|
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
217
|
+
requirements:
|
|
218
|
+
- - "~>"
|
|
219
|
+
- !ruby/object:Gem::Version
|
|
220
|
+
version: '1.1'
|
|
221
|
+
- - ">="
|
|
222
|
+
- !ruby/object:Gem::Version
|
|
223
|
+
version: 1.1.1
|
|
204
224
|
- !ruby/object:Gem::Dependency
|
|
205
225
|
name: kettle-test
|
|
206
226
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -210,7 +230,7 @@ dependencies:
|
|
|
210
230
|
version: '1.0'
|
|
211
231
|
- - ">="
|
|
212
232
|
- !ruby/object:Gem::Version
|
|
213
|
-
version: 1.0.
|
|
233
|
+
version: 1.0.7
|
|
214
234
|
type: :development
|
|
215
235
|
prerelease: false
|
|
216
236
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -220,7 +240,7 @@ dependencies:
|
|
|
220
240
|
version: '1.0'
|
|
221
241
|
- - ">="
|
|
222
242
|
- !ruby/object:Gem::Version
|
|
223
|
-
version: 1.0.
|
|
243
|
+
version: 1.0.7
|
|
224
244
|
- !ruby/object:Gem::Dependency
|
|
225
245
|
name: ruby-progressbar
|
|
226
246
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -316,10 +336,10 @@ licenses:
|
|
|
316
336
|
- MIT
|
|
317
337
|
metadata:
|
|
318
338
|
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.
|
|
339
|
+
source_code_uri: https://github.com/galtzo-floss/yard-fence/tree/v0.8.1
|
|
340
|
+
changelog_uri: https://github.com/galtzo-floss/yard-fence/blob/v0.8.1/CHANGELOG.md
|
|
321
341
|
bug_tracker_uri: https://github.com/galtzo-floss/yard-fence/issues
|
|
322
|
-
documentation_uri: https://www.rubydoc.info/gems/yard-fence/0.
|
|
342
|
+
documentation_uri: https://www.rubydoc.info/gems/yard-fence/0.8.1
|
|
323
343
|
funding_uri: https://github.com/sponsors/pboling
|
|
324
344
|
wiki_uri: https://github.com/galtzo-floss/yard-fence/wiki
|
|
325
345
|
news_uri: https://www.railsbling.com/tags/yard-fence
|
|
@@ -348,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
348
368
|
- !ruby/object:Gem::Version
|
|
349
369
|
version: '0'
|
|
350
370
|
requirements: []
|
|
351
|
-
rubygems_version:
|
|
371
|
+
rubygems_version: 4.0.3
|
|
352
372
|
specification_version: 4
|
|
353
373
|
summary: "\U0001F93A A brace converter for the markdown fences in your YARD"
|
|
354
374
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|