yard-timekeeper 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e753bfac157725878d7a334ac98ae7f100d13f1486f7570aba9825cc4217c3cd
4
- data.tar.gz: 777f4f1ab0ac6b67dfa52cd5541044f978cfb8e2d16fe0440f64af9760e3a4cf
3
+ metadata.gz: 865e7e350c522be374670622f6f78849725e0c34e4f70e9736cf0d0d95d93ecb
4
+ data.tar.gz: ca58d1226036bf5f64ce43815d54f6f628640bb470462e56f5340808df3c508c
5
5
  SHA512:
6
- metadata.gz: da6713d421163af55191b03c9c9615ad8a9f8cde48db0283c25d531c7b6aecb8435057759ff389d031b8ed8be2723a0f3d8087ef20fe176c32f2434ca6800f48
7
- data.tar.gz: a991ad2c05fd37bbcdf44ee38bfb81634e6d39ed800cac61af284f057349b49a5f2eaceac507f031a03926bc5f716a637d2ce2eb342e56470a766cfefc99f4f2
6
+ metadata.gz: 6648fe7c779062819edaee95af6e456663b1fb73d45e05b9385308d8ae09d1766165af924a21eb2b4f1dea347770dec80f68a9e23818bfc276b9a2c362c2ba38
7
+ data.tar.gz: 895058166ceba097ea730336d5deef19e2b20ea73cead4cd21222c2090fee4a9424adb3cbf3f38b016bf6c80628b66a49a919f0d416335d369bf2caf6401f580
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,58 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [0.2.1] - 2026-06-04
34
+
35
+ - TAG: [v0.2.1][0.2.1t]
36
+ - COVERAGE: 98.80% -- 82/83 lines in 2 files
37
+ - BRANCH COVERAGE: 93.33% -- 28/30 branches in 2 files
38
+ - 20.83% documented
39
+
40
+ ### Fixed
41
+
42
+ - Treated YARD generator version and Ruby version footer changes as generated
43
+ documentation churn, so footer-only docs diffs are restored even when the
44
+ toolchain version changes.
45
+
46
+ ## [0.2.0] - 2026-06-03
47
+
48
+ - TAG: [v0.2.0][0.2.0t]
49
+ - COVERAGE: 100.00% -- 72/72 lines in 2 files
50
+ - BRANCH COVERAGE: 96.15% -- 25/26 branches in 2 files
51
+ - 15.00% documented
52
+
53
+ ### Added
54
+
55
+ - Added generated CI coverage for `rdoc` `~> 6.11` and `>= 7.0`.
56
+ - Added release checksum files for the `v0.1.0` gem package.
57
+ - Added generated StructuredMerge git driver configuration and repo-local
58
+ template metadata under `.structuredmerge/`.
59
+ - Added generated documentation pages for IRP and YAML citation metadata.
60
+
61
+ ### Changed
62
+
63
+ - Refreshed generated CI workflows, including coverage report verification,
64
+ configurable coverage summary thresholds, and updated Ruby/Appraisal matrix
65
+ wiring.
66
+ - Updated generated documentation dependencies to require `yard` >= 0.9.44,
67
+ `yard-fence` >= 0.9.2, and `yard-yaml` >= 0.2.0.
68
+ - Updated generated development, test, style, and coverage dependency floors,
69
+ including `kettle-dev` >= 2.0.8, `kettle-test` >= 2.0.3,
70
+ `kettle-soup-cover` >= 2.0.1, `gitmoji-regex` >= 2.0.1, and current
71
+ RuboCop-LTS style dependencies.
72
+ - Updated local workspace dependency wiring to use released `nomono` and
73
+ generated local override Gemfiles.
74
+
75
+ ### Removed
76
+
77
+ - Removed generated binstubs that are now resolved through the active bundle.
78
+ - Removed the legacy TruffleRuby 23.1 and CodeQL workflow files from generated
79
+ CI.
80
+
81
+ ### Fixed
82
+
83
+ - Pinned the auto-assign workflow action to the immutable v4 SHA.
84
+
33
85
  ## [0.1.0] - 2026-05-23
34
86
 
35
87
  - TAG: [v0.1.0][0.1.0t]
@@ -41,6 +93,10 @@ Please file a bug if you notice a violation of semantic versioning.
41
93
 
42
94
  - Initial release
43
95
 
44
- [Unreleased]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.1.0...HEAD
96
+ [Unreleased]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.2.1...HEAD
97
+ [0.2.1]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.2.0...v0.2.1
98
+ [0.2.1t]: https://github.com/galtzo-floss/yard-timekeeper/releases/tag/v0.2.1
99
+ [0.2.0]: https://github.com/galtzo-floss/yard-timekeeper/compare/v0.1.0...v0.2.0
100
+ [0.2.0t]: https://github.com/galtzo-floss/yard-timekeeper/releases/tag/v0.2.0
45
101
  [0.1.0]: https://github.com/galtzo-floss/yard-timekeeper/compare/bffde1dbf4ceb71a29a72b5b2dfb79622a14417b...v0.1.0
46
102
  [0.1.0t]: https://github.com/galtzo-floss/yard-timekeeper/releases/tag/v0.1.0
data/CONTRIBUTING.md CHANGED
@@ -50,6 +50,22 @@ There are many Rake tasks available as well. You can see them by running:
50
50
  bin/rake -T
51
51
  ```
52
52
 
53
+ ## Code quality checks
54
+
55
+ Run the Reek task when you want a smell check that fails on current findings:
56
+
57
+ ```shell
58
+ bin/rake reek
59
+ ```
60
+
61
+ Refresh the checked-in `REEK` backlog through the rake task, not by redirecting
62
+ the raw `reek` executable output. The rake task uses the project bundle and
63
+ avoids stale generated binstubs shadowing the Reek gem executable:
64
+
65
+ ```shell
66
+ bin/rake reek:update
67
+ ```
68
+
53
69
  ## Environment Variables for Local Development
54
70
 
55
71
  Below are the primary environment variables recognized by stone_checksums (and its integrated tools). Unless otherwise noted, set boolean values to the string "true" to enable.
@@ -86,11 +102,32 @@ Git hooks and commit message helpers (exe/kettle-commit-msg)
86
102
  - GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
87
103
  - GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
88
104
 
105
+ Git diff driver setup
106
+ - Local setup writes repository `.gitattributes` entries and local Git `diff.smorg-*` command config so this checkout uses StructuredMerge semantic diffs.
107
+ - Global setup registers `diff.smorg-*` commands once in the user Git config; use it when you work across several StructuredMerge-enabled repositories.
108
+ - Include-file setup writes `.git/smorg/config` and includes it from local Git config, keeping command registrations out of the repository files.
109
+ - Git hosting forges generally ignore external diff drivers, so pull request views may still show raw textual diffs even when local `git diff` uses semantic drivers.
110
+
111
+ ```console
112
+ K_JEM_TEMPLATING=true bundle exec kettle-jem install
113
+ ```
114
+
115
+ Troubleshooting Git diffs
116
+ - Use `git diff --no-ext-diff` to compare against Git's built-in diff output.
117
+ - Use `git diff --no-textconv` when a textconv projection obscures the raw file bytes you need to inspect.
118
+ - If Git reports a missing `smorg-*` executable, rerun `bundle install` and the setup command above, then check `git config --local --get-regexp '^diff\.smorg-'`.
119
+ - To remove managed local entries, run `K_JEM_TEMPLATING=true bundle exec kettle-jem install --undo`; remove global command registrations with `git config --global --unset-all diff.smorg-ruby.command`.
120
+
89
121
  For a quick starting point, this repository’s `mise.toml` defines the shared defaults, and `.env.local` can override them locally. Copy `.env.local.example` to `.env.local`, use `KEY=value` lines, and either activate `mise` in your shell or run commands through `mise exec -C /path/to/project -- ...`.
90
122
 
91
123
  ## Appraisals
92
124
 
93
125
  From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
126
+ Generated appraisal and CI workflow floors are controlled by `ruby.test_minimum`
127
+ in `.structuredmerge/kettle-jem.yml`; this project was templated with `ruby.test_minimum: 3.2.0`.
128
+ That value describes the lowest Ruby version expected to run the test/development
129
+ toolchain, and it may be higher than the gemspec runtime floor.
130
+
94
131
  They are created and updated with the commands:
95
132
 
96
133
  ```console
data/README.md CHANGED
@@ -1,17 +1,10 @@
1
- [![Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0][🖼️galtzo-floss-i]][🖼️galtzo-floss] [![ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5][🖼️ruby-lang-i]][🖼️ruby-lang] [![yard-timekeeper Logo by Aboling0, CC BY-SA 4.0][🖼️galtzo-floss-yard-timekeeper-i]][🖼️galtzo-floss-yard-timekeeper]
2
-
3
- [🖼️galtzo-floss-i]: https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg
4
- [🖼️galtzo-floss]: https://discord.gg/3qme4XHNKN
5
- [🖼️ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg
6
- [🖼️ruby-lang]: https://www.ruby-lang.org/
7
- [🖼️galtzo-floss-yard-timekeeper-i]: https://logos.galtzo.com/assets/images/galtzo-floss/yard-timekeeper/avatar-192px.svg
8
- [🖼️galtzo-floss-yard-timekeeper]: https://github.com/galtzo-floss/yard-timekeeper
1
+ <a href="https://github.com/galtzo-floss/yard-timekeeper"><img alt="yard-timekeeper Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/galtzo-floss/yard-timekeeper/avatar-128px.svg" width="14%" align="right"/></a>
9
2
 
10
3
  # 🕰️ Yard::Timekeeper
11
4
 
12
- [![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] [![CodeQL][🖐codeQL-img]][🖐codeQL] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
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]
13
6
 
14
- `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][🖼️galtzo-floss], as I may have missed the [discord notification][🖼️galtzo-floss].
7
+ `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][✉️discord-invite], as I may have missed the [discord notification][✉️discord-invite].
15
8
 
16
9
  ---
17
10
 
@@ -26,16 +19,18 @@ I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-ta
26
19
 
27
20
  </details>
28
21
 
29
- ## 🌻 Synopsis
22
+ ## 🌻 Synopsis <a href="https://discord.gg/3qme4XHNKN"><img alt="Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px.svg" width="8%" align="right"/></a> <a href="https://ruby-toolbox.com"><img alt="ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5" src="https://logos.galtzo.com/assets/images/ruby-lang/avatar-128px.svg" width="8%" align="right"/></a>
30
23
 
31
24
  `yard-timekeeper` keeps checked-in YARD HTML stable by restoring files whose
32
- only change is the generated footer timestamp.
25
+ only changes are generated footer churn.
33
26
 
34
27
  Just the important bits:
35
28
 
36
29
  - It postprocesses generated `docs/**/*.html` files after YARD finishes.
37
30
  - It only restores files that are already tracked in git and only when the diff
38
- is timestamp-only.
31
+ is limited to generated footer metadata.
32
+ - It treats YARD footer timestamp, YARD version, and Ruby version changes as
33
+ generated churn, because those do not represent documentation content changes.
39
34
  - Real content changes are preserved.
40
35
  - The supported workflow is `rake yard`; raw `yard` / `bin/yard` does not run
41
36
  the explicit postprocess hook.
@@ -59,13 +54,15 @@ Just the important bits:
59
54
  ### Compatibility
60
55
 
61
56
  Compatible with MRI Ruby 3.2.0+, and concordant releases of JRuby, and TruffleRuby.
57
+ CI workflows and Appraisals are generated for MRI Ruby 3.2.0+.
58
+ This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
59
+ may be higher than the gem's runtime compatibility floor when legacy Rubies are
60
+ not practical for the current toolchain.
62
61
 
63
62
  | 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
64
63
  |------------------------------------------------|--------------------------------------------------------|
65
64
  | 👟 Check it out! | ✨ [github.com/appraisal-rb/appraisal2][💎appraisal2] ✨ |
66
65
 
67
-
68
-
69
66
  ### Federated DVCS
70
67
 
71
68
  <details markdown="1">
@@ -132,20 +129,32 @@ Yard::Timekeeper.install_rake_tasks!(:yard)
132
129
  ```
133
130
 
134
131
  `yard-timekeeper` runs after YARD generates HTML and checks git diffs for tracked
135
- files under `docs/`. If a file's only change is the footer line:
132
+ files under `docs/`. If a file's only changes are generated footer metadata:
136
133
 
137
134
  ```text
138
135
  Generated on ...
136
+ 0.9.44 (ruby-4.0.5).
139
137
  ```
140
138
 
141
139
  then the plugin restores that file from git so the docs site does not churn for
142
- timestamp-only changes.
140
+ toolchain-only changes.
141
+
142
+ This protects against the common case where rebuilding docs changes only:
143
+
144
+ - the generation timestamp
145
+ - the YARD generator version
146
+ - the Ruby version in the YARD footer
147
+
148
+ Those values are useful when the page content changes, but they are not useful
149
+ as standalone repository diffs.
143
150
 
144
151
  Notes:
145
152
 
146
153
  - It only affects files already tracked in git.
147
154
  - It is most useful for checked-in `docs/` sites.
148
155
  - Files with any real content changes keep their fresh timestamp.
156
+ - Files with source, README, changelog, API, or rendered markup changes are not
157
+ restored just because their footer also changed.
149
158
 
150
159
  Environment toggles:
151
160
 
@@ -159,6 +168,10 @@ Generate docs through rake so the postprocess runs after YARD finishes:
159
168
  bin/rake yard
160
169
  ```
161
170
 
171
+ After generation, `yard-timekeeper` examines each changed tracked HTML file
172
+ under `docs/`. Footer-only churn is restored from git automatically. Pages with
173
+ real rendered content changes remain modified, including their fresh footer.
174
+
162
175
  If your project also exposes `bin/yard`, do not rely on it for the full docs
163
176
  workflow. It runs YARD, but it does not run
164
177
  `Yard::Timekeeper.install_rake_tasks!(:yard)`.
@@ -345,6 +358,8 @@ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
345
358
 
346
359
  ### Please give the project a star ⭐ ♥.
347
360
 
361
+ Many parts of this project are actively managed by a [kettle-jem](https://github.com/structuredmerge/structuredmerge-ruby/tree/main/gems/kettle-jem) smart template utilizing [StructuredMerge.org](https://structuredmerge.org) merge contracts.
362
+
348
363
  Thanks for RTFM. ☺️
349
364
 
350
365
  [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
@@ -447,8 +462,6 @@ Thanks for RTFM. ☺️
447
462
  [🏀codecovi]: https://codecov.io/gh/galtzo-floss/yard-timekeeper/graph/badge.svg
448
463
  [🏀coveralls]: https://coveralls.io/github/galtzo-floss/yard-timekeeper?branch=main
449
464
  [🏀coveralls-img]: https://coveralls.io/repos/github/galtzo-floss/yard-timekeeper/badge.svg?branch=main
450
- [🖐codeQL]: https://github.com/galtzo-floss/yard-timekeeper/security/code-scanning
451
- [🖐codeQL-img]: https://github.com/galtzo-floss/yard-timekeeper/actions/workflows/codeql-analysis.yml/badge.svg
452
465
  [🚎ruby-3.2-wf]: https://github.com/galtzo-floss/yard-timekeeper/actions/workflows/ruby-3.2.yml
453
466
  [🚎ruby-3.3-wf]: https://github.com/galtzo-floss/yard-timekeeper/actions/workflows/ruby-3.3.yml
454
467
  [🚎ruby-3.4-wf]: https://github.com/galtzo-floss/yard-timekeeper/actions/workflows/ruby-3.4.yml
@@ -493,7 +506,7 @@ Thanks for RTFM. ☺️
493
506
  [🤝cb-pulls]: https://codeberg.org/galtzo-floss/yard-timekeeper/pulls
494
507
  [🤝cb-donate]: https://donate.codeberg.org/
495
508
  [🤝contributing]: https://github.com/galtzo-floss/yard-timekeeper/blob/main/CONTRIBUTING.md
496
- [🏀codecov-g]: https://codecov.io/gh/galtzo-floss/yard-timekeeper/graphs/tree.svg
509
+ [🏀codecov-g]: https://codecov.io/gh/galtzo-floss/yard-timekeeper/graph/badge.svg
497
510
  [🖐contrib-rocks]: https://contrib.rocks
498
511
  [🖐contributors]: https://github.com/galtzo-floss/yard-timekeeper/graphs/contributors
499
512
  [🖐contributors-img]: https://contrib.rocks/image?repo=galtzo-floss/yard-timekeeper
@@ -511,7 +524,7 @@ Thanks for RTFM. ☺️
511
524
  [📌gitmoji]: https://gitmoji.dev
512
525
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
513
526
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
514
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.072-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
527
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.083-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
515
528
  [🔐security]: https://github.com/galtzo-floss/yard-timekeeper/blob/main/SECURITY.md
516
529
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
517
530
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -520,6 +533,7 @@ Thanks for RTFM. ☺️
520
533
  [📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
521
534
  [📄license-compat]: https://www.apache.org/legal/resolved.html#category-a
522
535
  [📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-✓-259D6C.svg?style=flat&logo=Apache
536
+
523
537
  [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
524
538
  [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
525
539
  [🚎yard-current]: http://rubydoc.info/gems/yard-timekeeper
@@ -538,7 +552,7 @@ Thanks for RTFM. ☺️
538
552
  | Package | yard-timekeeper |
539
553
  | Description | 🕰️ A YARD plugin that post-processes generated docs, detects timestamp-only diffs in tracked HTML files under docs/, and restores those files from git to prevent pointless churn while keeping the footer timestamp on genuinely changed pages. |
540
554
  | Homepage | https://github.com/galtzo-floss/yard-timekeeper |
541
- | Source | https://github.com/galtzo-floss/yard-timekeeper/tree/v0.1.0 |
555
+ | Source | https://github.com/galtzo-floss/yard-timekeeper/tree/v0.2.0 |
542
556
  | License | `MIT` |
543
557
  | Funding | https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/galtzo-floss, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/yard-timekeeper, https://www.buymeacoffee.com/pboling |
544
558
  <!-- kettle-jem:metadata:end -->
data/SECURITY.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Version | Supported |
6
6
  |----------|-----------|
7
- | 1.latest | ✅ |
7
+ | 0.latest | ✅ |
8
8
 
9
9
  ## Security contact information
10
10
 
@@ -3,7 +3,7 @@
3
3
  module Yard
4
4
  module Timekeeper
5
5
  module Version
6
- VERSION = "0.1.0"
6
+ VERSION = "0.2.1"
7
7
  end
8
8
  VERSION = Version::VERSION # Traditional Constant Location
9
9
  end
@@ -15,12 +15,18 @@ module Yard
15
15
  RAKE_INTEGRATIONS_MUTEX = Mutex.new
16
16
 
17
17
  TIMESTAMP_DIFF_LINE_RE = /\A[+-]\s{2}Generated on .+ by\s*\z/
18
+ GENERATOR_VERSION_DIFF_LINE_RE = /
19
+ \A[+-]\s{2}
20
+ \d+(?:\.\d+)+(?:[.\w-][.\w-]*)?
21
+ \s\(ruby-[^)]+\)\.\s*
22
+ \z
23
+ /x
18
24
  DIFF_METADATA_PREFIXES = [
19
25
  "diff --git ",
20
26
  "index ",
21
27
  "--- ",
22
28
  "+++ ",
23
- "@@ ",
29
+ "@@ "
24
30
  ].freeze
25
31
 
26
32
  class << self
@@ -39,7 +45,7 @@ module Yard
39
45
 
40
46
  restore_file(relative_path, root)
41
47
  end
42
- rescue StandardError => e
48
+ rescue => e
43
49
  warn("Yard::Timekeeper.postprocess_html_docs failed: #{e.class}: #{e.message}")
44
50
  end
45
51
 
@@ -97,7 +103,7 @@ module Yard
97
103
  "--unified=0",
98
104
  "--",
99
105
  path,
100
- chdir: root,
106
+ chdir: root
101
107
  )
102
108
  stdout
103
109
  end
@@ -111,14 +117,33 @@ module Yard
111
117
  next if DIFF_METADATA_PREFIXES.any? { |prefix| line.start_with?(prefix) }
112
118
  next if line.strip.empty?
113
119
 
114
- return false unless line.match?(TIMESTAMP_DIFF_LINE_RE)
120
+ return false unless footer_churn_line?(line)
115
121
 
116
122
  change_lines << line
117
123
  end
118
124
 
119
- change_lines.size == 2 &&
120
- change_lines.one? { |line| line.start_with?("-") } &&
121
- change_lines.one? { |line| line.start_with?("+") }
125
+ balanced_footer_churn?(change_lines)
126
+ end
127
+
128
+ def footer_churn_line?(line)
129
+ line.match?(TIMESTAMP_DIFF_LINE_RE) || line.match?(GENERATOR_VERSION_DIFF_LINE_RE)
130
+ end
131
+
132
+ def balanced_footer_churn?(change_lines)
133
+ removed_lines = change_lines.select { |line| line.start_with?("-") }
134
+ added_lines = change_lines.select { |line| line.start_with?("+") }
135
+
136
+ removed_lines.size == added_lines.size &&
137
+ removed_lines.size.between?(1, 2) &&
138
+ removed_lines.map { |line| footer_churn_kind(line) }.sort ==
139
+ added_lines.map { |line| footer_churn_kind(line) }.sort
140
+ end
141
+
142
+ def footer_churn_kind(line)
143
+ return :timestamp if line.match?(TIMESTAMP_DIFF_LINE_RE)
144
+ return :generator_version if line.match?(GENERATOR_VERSION_DIFF_LINE_RE)
145
+
146
+ :unknown
122
147
  end
123
148
 
124
149
  def restore_file(path, root)
@@ -6,4 +6,3 @@ module Yard
6
6
  VERSION: String
7
7
  end
8
8
  end
9
-
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard-timekeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -64,6 +64,9 @@ dependencies:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
66
  version: '2.0'
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 2.0.8
67
70
  type: :development
68
71
  prerelease: false
69
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,6 +74,9 @@ dependencies:
71
74
  - - "~>"
72
75
  - !ruby/object:Gem::Version
73
76
  version: '2.0'
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 2.0.8
74
80
  - !ruby/object:Gem::Dependency
75
81
  name: bundler-audit
76
82
  requirement: !ruby/object:Gem::Requirement
@@ -148,7 +154,7 @@ dependencies:
148
154
  version: '2.0'
149
155
  - - ">="
150
156
  - !ruby/object:Gem::Version
151
- version: 2.0.0
157
+ version: 2.0.3
152
158
  type: :development
153
159
  prerelease: false
154
160
  version_requirements: !ruby/object:Gem::Requirement
@@ -158,7 +164,27 @@ dependencies:
158
164
  version: '2.0'
159
165
  - - ">="
160
166
  - !ruby/object:Gem::Version
161
- version: 2.0.0
167
+ version: 2.0.3
168
+ - !ruby/object:Gem::Dependency
169
+ name: turbo_tests2
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: '3.1'
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: 3.1.1
178
+ type: :development
179
+ prerelease: false
180
+ version_requirements: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - "~>"
183
+ - !ruby/object:Gem::Version
184
+ version: '3.1'
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: 3.1.1
162
188
  - !ruby/object:Gem::Dependency
163
189
  name: ruby-progressbar
164
190
  requirement: !ruby/object:Gem::Requirement
@@ -199,20 +225,20 @@ dependencies:
199
225
  requirements:
200
226
  - - "~>"
201
227
  - !ruby/object:Gem::Version
202
- version: '1.0'
228
+ version: '2.0'
203
229
  - - ">="
204
230
  - !ruby/object:Gem::Version
205
- version: 1.0.3
231
+ version: 2.0.1
206
232
  type: :development
207
233
  prerelease: false
208
234
  version_requirements: !ruby/object:Gem::Requirement
209
235
  requirements:
210
236
  - - "~>"
211
237
  - !ruby/object:Gem::Version
212
- version: '1.0'
238
+ version: '2.0'
213
239
  - - ">="
214
240
  - !ruby/object:Gem::Version
215
- version: 1.0.3
241
+ version: 2.0.1
216
242
  description: "\U0001F570️ A YARD plugin that post-processes generated docs, detects
217
243
  timestamp-only diffs in tracked HTML files under docs/, and restores those files
218
244
  from git to prevent pointless churn while keeping the footer timestamp on genuinely
@@ -252,10 +278,10 @@ licenses:
252
278
  - MIT
253
279
  metadata:
254
280
  homepage_uri: https://yard-timekeeper.galtzo.com
255
- source_code_uri: https://github.com/galtzo-floss/yard-timekeeper/tree/v0.1.0
256
- changelog_uri: https://github.com/galtzo-floss/yard-timekeeper/blob/v0.1.0/CHANGELOG.md
281
+ source_code_uri: https://github.com/galtzo-floss/yard-timekeeper/tree/v0.2.1
282
+ changelog_uri: https://github.com/galtzo-floss/yard-timekeeper/blob/v0.2.1/CHANGELOG.md
257
283
  bug_tracker_uri: https://github.com/galtzo-floss/yard-timekeeper/issues
258
- documentation_uri: https://www.rubydoc.info/gems/yard-timekeeper/0.1.0
284
+ documentation_uri: https://www.rubydoc.info/gems/yard-timekeeper/0.2.1
259
285
  funding_uri: https://github.com/sponsors/pboling
260
286
  wiki_uri: https://github.com/galtzo-floss/yard-timekeeper/wiki
261
287
  news_uri: https://www.railsbling.com/tags/yard-timekeeper
@@ -285,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
285
311
  - !ruby/object:Gem::Version
286
312
  version: '0'
287
313
  requirements: []
288
- rubygems_version: 4.0.11
314
+ rubygems_version: 4.0.10
289
315
  specification_version: 4
290
316
  summary: "\U0001F570️ Preserve tracked YARD docs when only the generated timestamp
291
317
  changed."
metadata.gz.sig CHANGED
Binary file