yard-fence 0.8.0 → 0.8.2
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 +55 -1
- data/README.md +31 -8
- data/lib/yard/fence/rake_task.rb +67 -0
- data/lib/yard/fence/version.rb +1 -1
- data/lib/yard/fence.rb +54 -5
- data.tar.gz.sig +2 -1
- metadata +28 -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: 90ced668922aea260b30e6505493afb8bd6b457ad67e598edf5c0a3ca8fec331
|
|
4
|
+
data.tar.gz: 3f177b2d225ca2a737e257b445449206f5d71ca6d307eb90506928bae8e1c0e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb125c673df6de4eac631cb1678a09a084ec082229dfbd1045975636191823ad2c2ecfb68302ac339885db25294b54e7503ed4ffe980266b222283ca6f836145
|
|
7
|
+
data.tar.gz: cbc8e3b9db77e6267db67b8bb4d266c322382f09667260c0e1cba71fb4ffb39bb309f9ac96ee61d61d1f41d9fed53bae9adbd7ef49cab4343d9a2a2d13016112
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,56 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [0.8.2] - 2025-12-30
|
|
34
|
+
|
|
35
|
+
- TAG: [v0.8.2][0.8.2t]
|
|
36
|
+
- COVERAGE: 100.00% -- 130/130 lines in 4 files
|
|
37
|
+
- BRANCH COVERAGE: 100.00% -- 40/40 branches in 4 files
|
|
38
|
+
- 50.00% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- `Yard::Fence::RakeTask` - New rake task class that provides `yard:fence:prepare` and `yard:fence:clean` tasks
|
|
43
|
+
- Automatically enhances the `:yard` task when defined
|
|
44
|
+
- Auto-registers when Rake is available at gem load time
|
|
45
|
+
- `Yard::Fence.prepare_for_yard` - New method to prepare for YARD documentation generation
|
|
46
|
+
- Combines `clean_docs_directory` and `prepare_tmp_files` into a single call
|
|
47
|
+
- Intended to be called from rake tasks, not at load time
|
|
48
|
+
|
|
49
|
+
### Deprecated
|
|
50
|
+
|
|
51
|
+
- `Yard::Fence.at_load_hook` - Now does nothing; use `prepare_for_yard` via rake task instead
|
|
52
|
+
|
|
53
|
+
### Removed
|
|
54
|
+
|
|
55
|
+
- **BREAKING**: Removed load-time execution of `clean_docs_directory` and `prepare_tmp_files`
|
|
56
|
+
- Previously, these ran when yard-fence was loaded, causing `docs/` to be cleared during unrelated rake tasks like `build` and `release`
|
|
57
|
+
- Now all preparation happens via the `yard:fence:prepare` rake task, which runs as a prerequisite to the `:yard` task
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- Fixed `docs/` directory being cleared during `rake build` and `rake release` commands
|
|
62
|
+
- The root cause was `at_load_hook` running at gem load time instead of only when generating documentation
|
|
63
|
+
- Now docs cleanup and tmp file preparation only occur when the `yard` task actually runs
|
|
64
|
+
|
|
65
|
+
## [0.8.1] - 2025-12-29
|
|
66
|
+
|
|
67
|
+
- TAG: [v0.8.1][0.8.1t]
|
|
68
|
+
- COVERAGE: 100.00% -- 129/129 lines in 4 files
|
|
69
|
+
- BRANCH COVERAGE: 100.00% -- 40/40 branches in 4 files
|
|
70
|
+
- 40.00% documented
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
|
|
74
|
+
- `YARD_FENCE_CLEAN_DOCS` environment variable to optionally clear the `docs/` directory before regeneration
|
|
75
|
+
- Set to `true` to enable; prevents stale HTML files from persisting when markdown source files are deleted
|
|
76
|
+
|
|
77
|
+
### Changed
|
|
78
|
+
|
|
79
|
+
- `prepare_tmp_files` now clears the `tmp/yard-fence/` staging directory before regenerating files
|
|
80
|
+
- This prevents stale preprocessed files from persisting when source markdown files are deleted
|
|
81
|
+
- Previously, files added manually or by other processes to `tmp/yard-fence/` would remain and get included in documentation
|
|
82
|
+
|
|
33
83
|
## [0.8.0] - 2025-11-08
|
|
34
84
|
|
|
35
85
|
- TAG: [v0.8.0][0.8.0t]
|
|
@@ -132,7 +182,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
132
182
|
|
|
133
183
|
- Initial release
|
|
134
184
|
|
|
135
|
-
[Unreleased]: https://github.com/galtzo-floss/yard-fence/compare/v0.8.
|
|
185
|
+
[Unreleased]: https://github.com/galtzo-floss/yard-fence/compare/v0.8.2...HEAD
|
|
186
|
+
[0.8.2]: https://github.com/galtzo-floss/yard-fence/compare/v0.8.1...v0.8.2
|
|
187
|
+
[0.8.2t]: https://github.com/galtzo-floss/yard-fence/releases/tag/v0.8.2
|
|
188
|
+
[0.8.1]: https://github.com/galtzo-floss/yard-fence/compare/v0.8.0...v0.8.1
|
|
189
|
+
[0.8.1t]: https://github.com/galtzo-floss/yard-fence/releases/tag/v0.8.1
|
|
136
190
|
[0.8.0]: https://github.com/galtzo-floss/yard-fence/compare/v0.7.0...v0.8.0
|
|
137
191
|
[0.8.0t]: https://github.com/galtzo-floss/yard-fence/releases/tag/v0.8.0
|
|
138
192
|
[0.7.0]: https://github.com/galtzo-floss/yard-fence/compare/v0.6.0...v0.7.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
|
|
|
@@ -80,7 +82,7 @@ See the configuration and usage sections for more details.
|
|
|
80
82
|
| Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
|
|
81
83
|
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
82
84
|
| Works with JRuby | [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
|
|
83
|
-
| Works with Truffle Ruby | [![Truffle Ruby
|
|
85
|
+
| Works with Truffle Ruby | [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] |
|
|
84
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] |
|
|
85
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] |
|
|
86
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] |
|
|
@@ -219,7 +221,30 @@ Recommended .yardopts (noise‑free):
|
|
|
219
221
|
|
|
220
222
|
Why tmp/yard-fence/?
|
|
221
223
|
|
|
222
|
-
- 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.
|
|
223
248
|
|
|
224
249
|
## 🔧 Basic Usage
|
|
225
250
|
|
|
@@ -365,7 +390,7 @@ the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
|
|
|
365
390
|
For example:
|
|
366
391
|
|
|
367
392
|
```ruby
|
|
368
|
-
spec.add_dependency("yard-fence", "~> 0.
|
|
393
|
+
spec.add_dependency("yard-fence", "~> 0.8")
|
|
369
394
|
```
|
|
370
395
|
|
|
371
396
|
<details markdown="1">
|
|
@@ -539,8 +564,6 @@ Thanks for RTFM. ☺️
|
|
|
539
564
|
[🚎6-s-wfi]: https://github.com/galtzo-floss/yard-fence/actions/workflows/supported.yml/badge.svg
|
|
540
565
|
[🚎8-ho-wf]: https://github.com/galtzo-floss/yard-fence/actions/workflows/hoary.yml
|
|
541
566
|
[🚎8-ho-wfi]: https://github.com/galtzo-floss/yard-fence/actions/workflows/hoary.yml/badge.svg
|
|
542
|
-
[🚎9-t-wf]: https://github.com/galtzo-floss/yard-fence/actions/workflows/truffle.yml
|
|
543
|
-
[🚎9-t-wfi]: https://github.com/galtzo-floss/yard-fence/actions/workflows/truffle.yml/badge.svg
|
|
544
567
|
[🚎10-j-wf]: https://github.com/galtzo-floss/yard-fence/actions/workflows/jruby.yml
|
|
545
568
|
[🚎10-j-wfi]: https://github.com/galtzo-floss/yard-fence/actions/workflows/jruby.yml/badge.svg
|
|
546
569
|
[🚎11-c-wf]: https://github.com/galtzo-floss/yard-fence/actions/workflows/current.yml
|
|
@@ -594,7 +617,7 @@ Thanks for RTFM. ☺️
|
|
|
594
617
|
[📌gitmoji]: https://gitmoji.dev
|
|
595
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
|
|
596
619
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
597
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
620
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.130-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
598
621
|
[🔐security]: SECURITY.md
|
|
599
622
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
600
623
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "rake"
|
|
4
|
+
require "rake/tasklib"
|
|
5
|
+
|
|
6
|
+
module Yard
|
|
7
|
+
module Fence
|
|
8
|
+
# Rake task to prepare for YARD documentation generation.
|
|
9
|
+
# This handles both cleaning the docs directory (if YARD_FENCE_CLEAN_DOCS=true)
|
|
10
|
+
# and preparing the tmp/yard-fence files with sanitized markdown.
|
|
11
|
+
#
|
|
12
|
+
# This is separated from the gem's load-time to ensure these operations only
|
|
13
|
+
# happen when explicitly running documentation tasks, not during other
|
|
14
|
+
# rake tasks like `build` or `release`.
|
|
15
|
+
#
|
|
16
|
+
# @example Usage in Rakefile
|
|
17
|
+
# require "yard/fence/rake_task"
|
|
18
|
+
# Yard::Fence::RakeTask.new
|
|
19
|
+
#
|
|
20
|
+
# # This creates a `yard:fence:prepare` task that is automatically added
|
|
21
|
+
# # as a prerequisite to the yard task.
|
|
22
|
+
#
|
|
23
|
+
class RakeTask < ::Rake::TaskLib
|
|
24
|
+
# @return [String] the name of the prepare task (default: "yard:fence:prepare")
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# Initialize the rake task.
|
|
28
|
+
#
|
|
29
|
+
# @param name [String, Symbol] the task name (default: "yard:fence:prepare")
|
|
30
|
+
# @yield [task] optional block to configure the task
|
|
31
|
+
def initialize(name = "yard:fence:prepare")
|
|
32
|
+
super()
|
|
33
|
+
@name = name.to_s
|
|
34
|
+
|
|
35
|
+
yield self if block_given?
|
|
36
|
+
|
|
37
|
+
define_tasks
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
private
|
|
41
|
+
|
|
42
|
+
def define_tasks
|
|
43
|
+
namespace(:yard) do
|
|
44
|
+
namespace(:fence) do
|
|
45
|
+
desc("Prepare for YARD documentation (clean docs/, prepare tmp/yard-fence/)")
|
|
46
|
+
task(:prepare) do
|
|
47
|
+
require "yard/fence"
|
|
48
|
+
Yard::Fence.prepare_for_yard
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Keep a separate clean task for those who want to clean without preparing
|
|
52
|
+
desc("Clean docs/ directory only (yard-fence)")
|
|
53
|
+
task(:clean) do
|
|
54
|
+
require "yard/fence"
|
|
55
|
+
Yard::Fence.clean_docs_directory
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Auto-enhance the yard task if it exists
|
|
61
|
+
if ::Rake::Task.task_defined?(:yard)
|
|
62
|
+
::Rake::Task[:yard].enhance(["yard:fence:prepare"])
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
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))
|
|
@@ -208,21 +214,50 @@ module Yard
|
|
|
208
214
|
false
|
|
209
215
|
end
|
|
210
216
|
|
|
211
|
-
|
|
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
|
+
|
|
231
|
+
# Prepare for YARD documentation generation.
|
|
232
|
+
# This method should be called from a rake task BEFORE yard runs, not at load time.
|
|
233
|
+
# It cleans the docs directory (if YARD_FENCE_CLEAN_DOCS=true) and prepares tmp files.
|
|
234
|
+
def prepare_for_yard
|
|
212
235
|
if ENV.fetch("YARD_FENCE_DISABLE", "false").casecmp?("true")
|
|
213
236
|
# :nocov:
|
|
214
|
-
warn("[yard/fence]
|
|
237
|
+
warn("[yard/fence] prepare_for_yard disabled via YARD_FENCE_DISABLE")
|
|
215
238
|
# :nocov:
|
|
216
239
|
else
|
|
240
|
+
Yard::Fence.clean_docs_directory
|
|
217
241
|
Yard::Fence.prepare_tmp_files
|
|
218
242
|
end
|
|
219
243
|
rescue => e
|
|
220
|
-
warn("Yard::Fence: failed to prepare
|
|
244
|
+
warn("Yard::Fence: failed to prepare for YARD: #{e.class}: #{e.message}")
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# @deprecated Use prepare_for_yard instead. This method is kept for backward compatibility
|
|
248
|
+
# but does nothing at load time. Call prepare_for_yard from a rake task.
|
|
249
|
+
def at_load_hook
|
|
250
|
+
# INTENTIONALLY EMPTY
|
|
251
|
+
# Previously this ran at load time, but that caused docs/ to be cleared
|
|
252
|
+
# during unrelated rake tasks like `build` and `release`.
|
|
253
|
+
# All preparation now happens via the yard:fence:prepare rake task.
|
|
254
|
+
nil
|
|
221
255
|
end
|
|
222
256
|
end
|
|
223
257
|
|
|
224
|
-
#
|
|
225
|
-
|
|
258
|
+
# NOTE: at_load_hook is intentionally NOT called at load time.
|
|
259
|
+
# Use the yard:fence:prepare rake task instead.
|
|
260
|
+
# Yard::Fence.at_load_hook # REMOVED - was causing docs/ to be cleared during `rake build`
|
|
226
261
|
end
|
|
227
262
|
|
|
228
263
|
# Extend the Version with VersionGem::Basic to provide semantic version helpers.
|
|
@@ -230,6 +265,20 @@ Yard::Fence::Version.class_eval do
|
|
|
230
265
|
extend VersionGem::Basic
|
|
231
266
|
end
|
|
232
267
|
|
|
268
|
+
# Auto-register rake tasks when Rake is available.
|
|
269
|
+
# This allows upgrading yard-fence to get the fix without also upgrading kettle-dev.
|
|
270
|
+
# The rake task defines yard:fence:prepare which enhances the :yard task if it exists.
|
|
271
|
+
# :nocov:
|
|
272
|
+
if defined?(Rake::Task)
|
|
273
|
+
begin
|
|
274
|
+
require_relative "fence/rake_task"
|
|
275
|
+
Yard::Fence::RakeTask.new unless Rake::Task.task_defined?("yard:fence:prepare")
|
|
276
|
+
rescue LoadError
|
|
277
|
+
# Rake::TaskLib may not be available in all contexts
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
# :nocov:
|
|
281
|
+
|
|
233
282
|
# :nocov:
|
|
234
283
|
# Not checking coverage of the at_exit hook, because it would require a forked process.
|
|
235
284
|
unless ENV["YARD_FENCE_SKIP_AT_EXIT"] == "1"
|
data.tar.gz.sig
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
3�I��M���ߨ����C�P��<����[��3'�����M��y�MîI��K�z�?ҧ�TM:b.`�i씦���Tӯ'�r�Ŏ��Yi7>y��ݛ��r�J����ނ��;���c�A}�u���=�k�0���D����J�h^�f�;����N���<�\�+���d'�;�G?�M�R��!eZf�`'�-��5��`�՜�r�y��/�[��_�������p��D�� `�Oc�m߇��g�q\�lM���?2m�:Z�\}��a*�c5�!<gϔ��D3���U´����iv�� B�m��T˦�<I�オ���� /y,g�b���a1�����@D��
|
|
2
|
+
$��Y ]�Y
|
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.8.
|
|
4
|
+
version: 0.8.2
|
|
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
|
|
@@ -308,6 +328,7 @@ files:
|
|
|
308
328
|
- lib/yard/fence.rb
|
|
309
329
|
- lib/yard/fence/hoist.rb
|
|
310
330
|
- lib/yard/fence/kramdown_gfm_document.rb
|
|
331
|
+
- lib/yard/fence/rake_task.rb
|
|
311
332
|
- lib/yard/fence/version.rb
|
|
312
333
|
- sig/kramdown.rbs
|
|
313
334
|
- sig/yard/fence.rbs
|
|
@@ -316,10 +337,10 @@ licenses:
|
|
|
316
337
|
- MIT
|
|
317
338
|
metadata:
|
|
318
339
|
homepage_uri: https://yard-fence.galtzo.com/
|
|
319
|
-
source_code_uri: https://github.com/galtzo-floss/yard-fence/tree/v0.8.
|
|
320
|
-
changelog_uri: https://github.com/galtzo-floss/yard-fence/blob/v0.8.
|
|
340
|
+
source_code_uri: https://github.com/galtzo-floss/yard-fence/tree/v0.8.2
|
|
341
|
+
changelog_uri: https://github.com/galtzo-floss/yard-fence/blob/v0.8.2/CHANGELOG.md
|
|
321
342
|
bug_tracker_uri: https://github.com/galtzo-floss/yard-fence/issues
|
|
322
|
-
documentation_uri: https://www.rubydoc.info/gems/yard-fence/0.8.
|
|
343
|
+
documentation_uri: https://www.rubydoc.info/gems/yard-fence/0.8.2
|
|
323
344
|
funding_uri: https://github.com/sponsors/pboling
|
|
324
345
|
wiki_uri: https://github.com/galtzo-floss/yard-fence/wiki
|
|
325
346
|
news_uri: https://www.railsbling.com/tags/yard-fence
|
|
@@ -348,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
348
369
|
- !ruby/object:Gem::Version
|
|
349
370
|
version: '0'
|
|
350
371
|
requirements: []
|
|
351
|
-
rubygems_version:
|
|
372
|
+
rubygems_version: 4.0.3
|
|
352
373
|
specification_version: 4
|
|
353
374
|
summary: "\U0001F93A A brace converter for the markdown fences in your YARD"
|
|
354
375
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|