yard-timekeeper 0.2.3 → 0.2.5
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 +114 -1
- data/LICENSE.md +1 -1
- data/README.md +20 -18
- data/lib/yard/timekeeper/version.rb +4 -1
- data/lib/yard/timekeeper.rb +94 -6
- data/sig/yard/timekeeper.rbs +4 -0
- data.tar.gz.sig +0 -0
- metadata +47 -44
- metadata.gz.sig +0 -0
- data/CITATION.cff +0 -20
- data/CODE_OF_CONDUCT.md +0 -134
- data/CONTRIBUTING.md +0 -275
- data/FUNDING.md +0 -70
- data/MIT.md +0 -21
- data/RUBOCOP.md +0 -71
- data/SECURITY.md +0 -21
- data/certs/pboling.pem +0 -27
- data/sig/yard/timekeeper/version.rbs +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4e4f0b10b7e982e6ca41496a00714c2802b80df364d1e4c6c5e22f061873bfb4
|
|
4
|
+
data.tar.gz: e4a71ec443199a3fe8628d1877948648db8557ef92c3fa83135c3c198d150902
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef547cf043bfc767cd14a587879ba6d1193d664dfe547adc5ee3507a542e701e0bf1ee97e669959c432c5bc0bc9fb6d8327628a4646b7e26cd9f18f43969dd80
|
|
7
|
+
data.tar.gz: 442843de47dd880a7292ff252fd9ac28cd7333d6ea5aabc7bb0ceb639d649ea6cf0d7b8e5119e1cc614c70ef589cc30bbdd2cf9661c1dc5cf4d619dd566f2bb7
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,115 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [0.2.5] - 2026-07-31
|
|
34
|
+
|
|
35
|
+
- TAG: [v0.2.5][0.2.5t]
|
|
36
|
+
- COVERAGE: 95.52% -- 128/134 lines in 3 files
|
|
37
|
+
- BRANCH COVERAGE: 87.93% -- 51/58 branches in 3 files
|
|
38
|
+
- 20.59% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- Documentation linting now has its generated `yard-lint` dependency and severity config available in the local bundle.
|
|
43
|
+
|
|
44
|
+
- kettle-jem-template-20260726-001 - Projects now include YARD lint
|
|
45
|
+
configuration and documentation dependencies so documentation issues fail
|
|
46
|
+
before generated docs are refreshed.
|
|
47
|
+
|
|
48
|
+
- kettle-jem-template-20260727-001 - Spec harness documentation now lists the
|
|
49
|
+
RSpec helpers provided by `kettle-test`.
|
|
50
|
+
|
|
51
|
+
- kettle-jem-template-20260729-005 - Gemspec metadata now publishes this
|
|
52
|
+
project's RubyForum tag as `mailing_list_uri`, and support docs link to the
|
|
53
|
+
tagged RubyForum community alongside Discord.
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- kettle-jem-template-20260716-001 - Shim gemspec manifests now include
|
|
58
|
+
`LICENSE.md` instead of nonexistent `LICENSE.txt`.
|
|
59
|
+
- kettle-jem-template-20260716-002 - Generated gemspec manifests now ship fewer
|
|
60
|
+
repository-only files by default to reduce downstream distro packaging churn.
|
|
61
|
+
- kettle-jem-template-20260720-001 - Generated READMEs can now render
|
|
62
|
+
template-managed corporate sponsor logos from project or family config.
|
|
63
|
+
- kettle-jem-template-20260720-002 - Generated development Gemfiles now use the
|
|
64
|
+
released `tree_sitter_language_pack` gem 1.13.3 or newer by default.
|
|
65
|
+
- kettle-jem-template-20260720-003 - Generated StructuredMerge Git diff driver
|
|
66
|
+
config now uses the installed `smorg-rb` Ruby driver name.
|
|
67
|
+
- kettle-jem-template-20260720-004 - Generated multi-engine workflow files now
|
|
68
|
+
omit JRuby and TruffleRuby jobs when project config declares MRI-only engines.
|
|
69
|
+
- kettle-jem-template-20260720-005 - Generated README Support & Community rows
|
|
70
|
+
now include a RubyForum help badge.
|
|
71
|
+
- kettle-jem-template-20260725-001 - Generated JRuby and TruffleRuby workflow
|
|
72
|
+
files now run when pull request head branches start with `feature/release`,
|
|
73
|
+
so release CI monitoring does not report intentionally skipped engine
|
|
74
|
+
workflows as failures.
|
|
75
|
+
|
|
76
|
+
- kettle-jem-template-20260725-002 - Generated gemspec templates now include
|
|
77
|
+
`anonymous_loader` as a development dependency, and version specs use it to
|
|
78
|
+
execute generated `version.rb` files for coverage without redefining package
|
|
79
|
+
constants. Managed version specs are removed when `version_gem` is disabled
|
|
80
|
+
or incompatible with the project's runtime Ruby floor.
|
|
81
|
+
|
|
82
|
+
- kettle-jem-template-20260728-001 - Generated Ruby workflows now use clearer
|
|
83
|
+
setup-ruby-flash planning and can prepare appraisal-only jobs without
|
|
84
|
+
installing the main Gemfile bundle.
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
|
|
88
|
+
- Generated YARD title metadata normalization now replaces only the generated
|
|
89
|
+
`Documentation by YARD ...` text when it appears inline with real HTML markup,
|
|
90
|
+
preventing `_index.html` content wrapper deletion during docs regeneration.
|
|
91
|
+
|
|
92
|
+
- kettle-jem-template-20260726-002 - Generated version files now document their
|
|
93
|
+
version namespace and constants, reducing warning-only YARD lint output.
|
|
94
|
+
|
|
95
|
+
- kettle-jem-template-20260726-003 - Coverage upload steps now treat Coveralls,
|
|
96
|
+
QLTY, and Codecov as optional, so provider outages do not fail CI when local
|
|
97
|
+
coverage thresholds still pass.
|
|
98
|
+
- kettle-jem-template-20260728-002 - Generated RuboCop configs now ignore the
|
|
99
|
+
same `gemfiles/vendor/bundle` tree as `.gitignore`, so vendored dependency
|
|
100
|
+
installs are not reported as project lint debt.
|
|
101
|
+
- kettle-jem-template-20260728-003 - Generated dep-heads workflows now run
|
|
102
|
+
TruffleRuby jobs with current RubyGems and Bundler, avoiding setup failures
|
|
103
|
+
before the test suite starts.
|
|
104
|
+
|
|
105
|
+
- kettle-jem-template-20260728-004 - Generated dep-heads workflows now use the
|
|
106
|
+
setup-ruby Bundler install path for direct appraisal Gemfiles, avoiding rv
|
|
107
|
+
lockfile parser failures on Git and path dependencies.
|
|
108
|
+
|
|
109
|
+
- kettle-jem-template-20260728-005 - VersionGem bootstrap now creates the
|
|
110
|
+
missing canonical version spec when a project only has shim namespace version
|
|
111
|
+
specs.
|
|
112
|
+
|
|
113
|
+
- kettle-jem-template-20260729-001 - Generated JRuby 9.4 workflows now use the
|
|
114
|
+
legacy manual bundle install path, avoiding setup-time Bundler full-index
|
|
115
|
+
failures against `gem.coop`.
|
|
116
|
+
|
|
117
|
+
- kettle-jem-template-20260729-002 - VersionGem bootstrap now preserves
|
|
118
|
+
and templates dedicated `version_gem.rb` entrypoints even when the gemspec
|
|
119
|
+
dependency is intentionally omitted, and generated anonymous-loader specs
|
|
120
|
+
cover both `version.rb` and `version_gem.rb`.
|
|
121
|
+
|
|
122
|
+
- kettle-jem-template-20260729-003 - Old-Ruby gems below the VersionGem runtime
|
|
123
|
+
floor now get managed minimal `version.rb` files and anonymous-loader version
|
|
124
|
+
specs without adding `version_gem`.
|
|
125
|
+
- kettle-jem-template-20260730-001 - Gemspec package file enumeration now runs
|
|
126
|
+
relative to the gemspec directory, so packaged template assets are included
|
|
127
|
+
even when the gemspec is loaded from another working directory.
|
|
128
|
+
|
|
129
|
+
## [0.2.4] - 2026-07-18
|
|
130
|
+
|
|
131
|
+
- TAG: [v0.2.4][0.2.4t]
|
|
132
|
+
- COVERAGE: 95.20% -- 119/125 lines in 3 files
|
|
133
|
+
- BRANCH COVERAGE: 86.54% -- 45/52 branches in 3 files
|
|
134
|
+
- 15.62% documented
|
|
135
|
+
|
|
136
|
+
### Fixed
|
|
137
|
+
|
|
138
|
+
- Restored generated YARD title/header metadata from git when rebuilding docs
|
|
139
|
+
with a newer YARD version, including when the file also has real content
|
|
140
|
+
changes that should be preserved.
|
|
141
|
+
|
|
33
142
|
## [0.2.3] - 2026-07-02
|
|
34
143
|
|
|
35
144
|
- TAG: [v0.2.3][0.2.3t]
|
|
@@ -119,7 +228,11 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
119
228
|
|
|
120
229
|
- Initial release
|
|
121
230
|
|
|
122
|
-
[Unreleased]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.2.
|
|
231
|
+
[Unreleased]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.2.5...HEAD
|
|
232
|
+
[0.2.5]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.2.4...v0.2.5
|
|
233
|
+
[0.2.5t]: https://github.com/galtzo-floss/yard-timekeeper/releases/tag/v0.2.5
|
|
234
|
+
[0.2.4]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.2.3...v0.2.4
|
|
235
|
+
[0.2.4t]: https://github.com/galtzo-floss/yard-timekeeper/releases/tag/v0.2.4
|
|
123
236
|
[0.2.3]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.2.2...v0.2.3
|
|
124
237
|
[0.2.3t]: https://github.com/galtzo-floss/yard-timekeeper/releases/tag/v0.2.3
|
|
125
238
|
[0.2.2]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.2.1...v0.2.2
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# 🕰️ Yard::Timekeeper
|
|
4
4
|
|
|
5
|
-
[![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![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] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
|
|
5
|
+
[![Version][👽versioni]][👽version] [![Ruby Users Forum][✉️ruby-forum-top-img]][✉️ruby-forum] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![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] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![CI JRuby][🚎10-j-wfi]][🚎10-j-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
|
|
6
6
|
|
|
7
|
-
`if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][✉️discord-invite], as I may have missed the
|
|
7
|
+
`if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know on Discord][✉️discord-invite] or [RubyForum][✉️ruby-forum], as I may have missed the notification.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -43,8 +43,8 @@ Just the important bits:
|
|
|
43
43
|
| Works with Truffle Ruby | [![Truffle Ruby 24.2 Compat][💎truby-24.2i]][🚎truby-24.2-wf] [![Truffle Ruby 25.0 Compat][💎truby-25.0i]][🚎truby-25.0-wf] [![Truffle Ruby 33.0 Compat][💎truby-33.0i]][🚎truby-33.0-wf] [![Truffle Ruby current Compat][💎truby-c-i]][🚎9-t-wf] [![Truffle Ruby HEAD Compat][💎truby-headi]][🚎3-hd-wf]|
|
|
44
44
|
| Works with MRI Ruby 4 | [![Ruby current Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf]|
|
|
45
45
|
| Works with MRI Ruby 3 | [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎ruby-3.2-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎ruby-3.3-wf] [![Ruby 3.4 Compat][💎ruby-3.4i]][🚎ruby-3.4-wf]|
|
|
46
|
-
| 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] |
|
|
47
|
-
| Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on
|
|
46
|
+
| Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Get help from RubyForum][✉️ruby-forum-img]][✉️ruby-forum] [![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] |
|
|
47
|
+
| 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] |
|
|
48
48
|
| Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![Maintainer Blog][🚂maint-blog-img]][🚂maint-blog] [![GitLab Wiki][📜gl-wiki-img]][📜gl-wiki] [![GitHub Wiki][📜gh-wiki-img]][📜gh-wiki] |
|
|
49
49
|
| Compliance | [![License: MIT][📄license-img]][📄license] [![Apache license compatibility: Category A][📄license-compat-img]][📄license-compat] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] |
|
|
50
50
|
| Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] [![Compatibility appraised by: appraisal2][💎appraisal2-img]][💎appraisal2] |
|
|
@@ -84,17 +84,14 @@ The _amazing_ test matrix is powered by the kettle-dev stack.
|
|
|
84
84
|
<details markdown="1">
|
|
85
85
|
<summary>Find this repo on federated forges (Coming soon!)</summary>
|
|
86
86
|
|
|
87
|
-
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI |
|
|
88
|
-
|
|
89
|
-
| 🧪 [galtzo-floss/yard-timekeeper on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix |
|
|
90
|
-
| 🧊 [galtzo-floss/yard-timekeeper on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix |
|
|
91
|
-
| 🐙 [galtzo-floss/yard-timekeeper on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix |
|
|
92
|
-
| 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |
|
|
87
|
+
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI |
|
|
88
|
+
|-------------------------------------------------|-------------------------------------------|-------------------|------------------|-----------------|----------------|
|
|
89
|
+
| 🧪 [galtzo-floss/yard-timekeeper on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix |
|
|
90
|
+
| 🧊 [galtzo-floss/yard-timekeeper on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix |
|
|
91
|
+
| 🐙 [galtzo-floss/yard-timekeeper on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix |
|
|
93
92
|
|
|
94
93
|
</details>
|
|
95
94
|
|
|
96
|
-
[gh-discussions]: https://github.com/galtzo-floss/yard-timekeeper/discussions
|
|
97
|
-
|
|
98
95
|
### Enterprise Support [](https://tidelift.com/subscription/pkg/rubygems-yard-timekeeper?utm_source=rubygems-yard-timekeeper&utm_medium=referral&utm_campaign=readme)
|
|
99
96
|
|
|
100
97
|
Available as part of the Tidelift Subscription.
|
|
@@ -112,6 +109,7 @@ The maintainers of this and thousands of other packages are working with Tidelif
|
|
|
112
109
|
|
|
113
110
|
Alternatively:
|
|
114
111
|
|
|
112
|
+
- [![Ruby Users Forum][✉️ruby-forum-img]][✉️ruby-forum]
|
|
115
113
|
- [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
|
|
116
114
|
- [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork]
|
|
117
115
|
- [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor]
|
|
@@ -342,7 +340,7 @@ See [CHANGELOG.md][📌changelog] for a list of releases.
|
|
|
342
340
|
## 📄 License
|
|
343
341
|
|
|
344
342
|
The gem is available as open source under the terms of
|
|
345
|
-
the [MIT](MIT.md) [![License: MIT][📄license-img]][📄license-ref].
|
|
343
|
+
the [MIT](https://github.com/galtzo-floss/yard-timekeeper/blob/main/MIT.md) [![License: MIT][📄license-img]][📄license-ref].
|
|
346
344
|
|
|
347
345
|
### © Copyright
|
|
348
346
|
|
|
@@ -364,11 +362,12 @@ I'm hoping to be able to pay for my kids' health insurance this month,
|
|
|
364
362
|
so if you value the work I am doing, I need your support.
|
|
365
363
|
Please consider sponsoring me or the project.
|
|
366
364
|
|
|
367
|
-
To join the community or get help
|
|
365
|
+
To join the community or get help, use the RubyForum or Discord.
|
|
368
366
|
|
|
367
|
+
[![Ruby Users Forum][✉️ruby-forum-img]][✉️ruby-forum]
|
|
369
368
|
[![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
|
|
370
369
|
|
|
371
|
-
To say "thanks!" ☝️ Join the
|
|
370
|
+
To say "thanks!" ☝️ Join the community or 👇️ send money.
|
|
372
371
|
|
|
373
372
|
[![Sponsor galtzo-floss/yard-timekeeper on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal]
|
|
374
373
|
|
|
@@ -409,6 +408,9 @@ Thanks for RTFM. ☺️
|
|
|
409
408
|
[✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord
|
|
410
409
|
[✉️ruby-friends-img]: https://img.shields.io/badge/daily.dev-%F0%9F%92%8E_Ruby_Friends-0A0A0A?style=for-the-badge&logo=dailydotdev&logoColor=white
|
|
411
410
|
[✉️ruby-friends]: https://app.daily.dev/squads/rubyfriends
|
|
411
|
+
[✉️ruby-forum-top-img]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fwww.rubyforum.org&style=flat&logo=discourse&label=Ruby%20Users%20Forum
|
|
412
|
+
[✉️ruby-forum-img]: https://img.shields.io/discourse/topics?server=https%3A%2F%2Fwww.rubyforum.org&style=for-the-badge&logo=discourse&label=Ruby%20Users%20Forum
|
|
413
|
+
[✉️ruby-forum]: https://www.rubyforum.org/tag/galtzo-floss
|
|
412
414
|
|
|
413
415
|
[✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
|
|
414
416
|
[⛳️gem-namespace]: https://github.com/galtzo-floss/yard-timekeeper
|
|
@@ -454,7 +456,7 @@ Thanks for RTFM. ☺️
|
|
|
454
456
|
[📜src-gl]: https://gitlab.com/galtzo-floss/yard-timekeeper
|
|
455
457
|
[📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
|
|
456
458
|
[📜src-cb]: https://codeberg.org/galtzo-floss/yard-timekeeper
|
|
457
|
-
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=
|
|
459
|
+
[📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=GitHub&logoColor=green
|
|
458
460
|
[📜src-gh]: https://github.com/galtzo-floss/yard-timekeeper
|
|
459
461
|
[📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
460
462
|
[📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
|
|
@@ -540,12 +542,12 @@ Thanks for RTFM. ☺️
|
|
|
540
542
|
[📌gitmoji]: https://gitmoji.dev
|
|
541
543
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
542
544
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
543
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
545
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.134-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
544
546
|
[🔐security]: https://github.com/galtzo-floss/yard-timekeeper/blob/main/SECURITY.md
|
|
545
547
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
546
548
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
547
549
|
[📄license]: LICENSE.md
|
|
548
|
-
[📄license-ref]: MIT.md
|
|
550
|
+
[📄license-ref]: https://github.com/galtzo-floss/yard-timekeeper/blob/main/MIT.md
|
|
549
551
|
[📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
|
|
550
552
|
[📄license-compat]: https://www.apache.org/legal/resolved.html#category-a
|
|
551
553
|
[📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-%E2%9C%93-259D6C.svg?style=flat&logo=Apache
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Yard
|
|
4
4
|
module Timekeeper
|
|
5
|
+
# Version namespace for this gem.
|
|
5
6
|
module Version
|
|
6
|
-
|
|
7
|
+
# Current gem version.
|
|
8
|
+
VERSION = "0.2.5"
|
|
7
9
|
end
|
|
10
|
+
# Current gem version exposed at the traditional constant location.
|
|
8
11
|
VERSION = Version::VERSION # Traditional Constant Location
|
|
9
12
|
end
|
|
10
13
|
end
|
data/lib/yard/timekeeper.rb
CHANGED
|
@@ -14,13 +14,22 @@ module Yard
|
|
|
14
14
|
RAKE_INTEGRATIONS = {}
|
|
15
15
|
RAKE_INTEGRATIONS_MUTEX = Mutex.new
|
|
16
16
|
|
|
17
|
+
TITLE_GENERATOR_DIFF_LINE_RE = /\A[+-].*Documentation by YARD \d+(?:\.\d+)+(?:[.\w-][.\w-]*)?\s*\z/
|
|
17
18
|
TIMESTAMP_DIFF_LINE_RE = /\A[+-]\s{2}Generated on .+ by\s*\z/
|
|
18
|
-
|
|
19
|
+
FOOTER_GENERATOR_VERSION_DIFF_LINE_RE = /
|
|
19
20
|
\A[+-]\s{2}
|
|
20
21
|
\d+(?:\.\d+)+(?:[.\w-][.\w-]*)?
|
|
21
22
|
\s\(ruby-[^)]+\)\.\s*
|
|
22
23
|
\z
|
|
23
24
|
/x
|
|
25
|
+
TITLE_GENERATOR_LINE_RE = /Documentation by YARD \d+(?:\.\d+)+(?:[.\w-][.\w-]*)?/
|
|
26
|
+
TIMESTAMP_LINE_RE = /\A\s{2}Generated on .+ by\s*\z/
|
|
27
|
+
FOOTER_GENERATOR_VERSION_LINE_RE = /
|
|
28
|
+
\A\s{2}
|
|
29
|
+
\d+(?:\.\d+)+(?:[.\w-][.\w-]*)?
|
|
30
|
+
\s\(ruby-[^)]+\)\.\s*
|
|
31
|
+
\z
|
|
32
|
+
/x
|
|
24
33
|
DIFF_METADATA_PREFIXES = [
|
|
25
34
|
"diff --git ",
|
|
26
35
|
"index ",
|
|
@@ -41,9 +50,12 @@ module Yard
|
|
|
41
50
|
|
|
42
51
|
changed_docs_files(root).each do |relative_path|
|
|
43
52
|
next unless relative_path.end_with?(".html")
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
diff = git_diff(relative_path, root)
|
|
54
|
+
if timestamp_only_diff?(diff)
|
|
55
|
+
restore_file(relative_path, root)
|
|
56
|
+
else
|
|
57
|
+
normalize_generated_metadata(relative_path, root)
|
|
58
|
+
end
|
|
47
59
|
end
|
|
48
60
|
rescue => e
|
|
49
61
|
warn("Yard::Timekeeper.postprocess_html_docs failed: #{e.class}: #{e.message}")
|
|
@@ -126,7 +138,9 @@ module Yard
|
|
|
126
138
|
end
|
|
127
139
|
|
|
128
140
|
def footer_churn_line?(line)
|
|
129
|
-
line.match?(
|
|
141
|
+
line.match?(TITLE_GENERATOR_DIFF_LINE_RE) ||
|
|
142
|
+
line.match?(TIMESTAMP_DIFF_LINE_RE) ||
|
|
143
|
+
line.match?(FOOTER_GENERATOR_VERSION_DIFF_LINE_RE)
|
|
130
144
|
end
|
|
131
145
|
|
|
132
146
|
def balanced_footer_churn?(change_lines)
|
|
@@ -140,12 +154,86 @@ module Yard
|
|
|
140
154
|
end
|
|
141
155
|
|
|
142
156
|
def footer_churn_kind(line)
|
|
157
|
+
return :title_generator if line.match?(TITLE_GENERATOR_DIFF_LINE_RE)
|
|
143
158
|
return :timestamp if line.match?(TIMESTAMP_DIFF_LINE_RE)
|
|
144
|
-
return :
|
|
159
|
+
return :footer_generator_version if line.match?(FOOTER_GENERATOR_VERSION_DIFF_LINE_RE)
|
|
145
160
|
|
|
146
161
|
:unknown
|
|
147
162
|
end
|
|
148
163
|
|
|
164
|
+
def normalize_generated_metadata(path, root)
|
|
165
|
+
original = tracked_file_content(path, root)
|
|
166
|
+
return false unless original
|
|
167
|
+
|
|
168
|
+
absolute_path = File.join(root, path)
|
|
169
|
+
return false unless File.file?(absolute_path)
|
|
170
|
+
|
|
171
|
+
replacement_lines = generated_metadata_lines(original)
|
|
172
|
+
return false if replacement_lines.empty?
|
|
173
|
+
|
|
174
|
+
current = File.read(absolute_path)
|
|
175
|
+
changed = false
|
|
176
|
+
normalized_lines = current.lines.map do |line|
|
|
177
|
+
kind = generated_metadata_kind(line)
|
|
178
|
+
replacement = replacement_lines[kind]
|
|
179
|
+
normalized_line = replacement ? normalize_generated_metadata_line(line, kind, replacement) : line
|
|
180
|
+
if replacement && line != normalized_line
|
|
181
|
+
changed = true
|
|
182
|
+
normalized_line
|
|
183
|
+
else
|
|
184
|
+
line
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
return false unless changed
|
|
189
|
+
|
|
190
|
+
File.write(absolute_path, normalized_lines.join)
|
|
191
|
+
true
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
def tracked_file_content(path, root)
|
|
195
|
+
stdout, status = Open3.capture2("git", "show", "HEAD:#{path}", chdir: root)
|
|
196
|
+
return unless status.success?
|
|
197
|
+
|
|
198
|
+
stdout
|
|
199
|
+
rescue Errno::ENOENT
|
|
200
|
+
nil
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
def generated_metadata_lines(content)
|
|
204
|
+
content.lines.each_with_object({}) do |line, replacements|
|
|
205
|
+
kind = generated_metadata_kind(line)
|
|
206
|
+
replacements[kind] ||= generated_metadata_value(line, kind) if kind
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
def generated_metadata_value(line, kind)
|
|
211
|
+
case kind
|
|
212
|
+
when :title_generator
|
|
213
|
+
line[TITLE_GENERATOR_LINE_RE]
|
|
214
|
+
else
|
|
215
|
+
line
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
def normalize_generated_metadata_line(line, kind, replacement)
|
|
220
|
+
case kind
|
|
221
|
+
when :title_generator
|
|
222
|
+
line.sub(TITLE_GENERATOR_LINE_RE, replacement.to_s)
|
|
223
|
+
else
|
|
224
|
+
replacement
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
def generated_metadata_kind(line)
|
|
229
|
+
stripped_line = line.strip
|
|
230
|
+
return :title_generator if stripped_line.match?(TITLE_GENERATOR_LINE_RE)
|
|
231
|
+
return :timestamp if line.match?(TIMESTAMP_LINE_RE)
|
|
232
|
+
return :footer_generator_version if line.match?(FOOTER_GENERATOR_VERSION_LINE_RE)
|
|
233
|
+
|
|
234
|
+
nil
|
|
235
|
+
end
|
|
236
|
+
|
|
149
237
|
def restore_file(path, root)
|
|
150
238
|
_stdout, _stderr, status = Open3.capture3("git", "checkout", "--", path, chdir: root)
|
|
151
239
|
status.success?
|
data/sig/yard/timekeeper.rbs
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|