kettle-drift 1.0.1 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66e6c1d163f35fa238c1b39db2f70408d852a138882b743b4406b9d42e312ae8
4
- data.tar.gz: b966b2faa94714d091e640002b8acb610dfaca2e6603d947ca2d594a8f04acc4
3
+ metadata.gz: d5fcd44d3230a87f30015bf2a4a8712f957fae6b16d3224bf944ff5ab8a1205e
4
+ data.tar.gz: 1d32fbb029578f6e803eb386228f0824a00da3b14c7eff442fd14225806edc58
5
5
  SHA512:
6
- metadata.gz: 11fdc0183e706bc250d45b09bf8741d7ed342a5d12dc57e5fb14c02e855c8a8ab567dff6a2fc69531c422fdc9d0e75dfd3af16a291b774caa6d3bf681794e849
7
- data.tar.gz: b494c1ccdbb84fc6e38b888d48e362703ad6a426c849cc83ad0ff4990b0f3004b46331550fcefa399d27754c219a5ccbc859906526f64b83084d7ef497be9d53
6
+ metadata.gz: 07d22f1a6ff858603dcb43e58b7398ce3b87f70349a876b4da8a89ddba3db535dc0dcd84dcef5f877fa2e8620fa478f1f435d42617f5dc52cbbc3f10c07dd30d
7
+ data.tar.gz: ae0d7068450c4c95c037238164fa4b6aaa584e5c3a3ad4d93bd28504e92e77705b894675494c0bacd329df860de2186728ee7b59d8b4798f7ce3e63bf48ac215
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -30,6 +30,18 @@ Please file a bug if you notice a violation of semantic versioning.
30
30
 
31
31
  ### Security
32
32
 
33
+ ## [1.0.2] - 2026-06-03
34
+
35
+ - TAG: [v1.0.2][1.0.2t]
36
+ - COVERAGE: 83.98% -- 430/512 lines in 13 files
37
+ - BRANCH COVERAGE: 65.84% -- 133/202 branches in 13 files
38
+ - 33.01% documented
39
+
40
+ ### Fixed
41
+
42
+ - Suppressed warning/report output when current duplicate drift exactly matches
43
+ the checked-in lockfile baseline.
44
+
33
45
  ## [1.0.1] - 2026-05-28
34
46
 
35
47
  - TAG: [v1.0.1][1.0.1t]
@@ -55,7 +67,9 @@ Please file a bug if you notice a violation of semantic versioning.
55
67
 
56
68
  - Initial release
57
69
 
58
- [Unreleased]: https://github.com/kettle-rb/kettle-drift/compare/v1.0.1...HEAD
70
+ [Unreleased]: https://github.com/kettle-rb/kettle-drift/compare/v1.0.2...HEAD
71
+ [1.0.2]: https://github.com/kettle-rb/kettle-drift/compare/v1.0.1...v1.0.2
72
+ [1.0.2t]: https://github.com/kettle-rb/kettle-drift/releases/tag/v1.0.2
59
73
  [1.0.1]: https://github.com/kettle-rb/kettle-drift/compare/v1.0.0...v1.0.1
60
74
  [1.0.1t]: https://github.com/kettle-rb/kettle-drift/releases/tag/v1.0.1
61
75
  [1.0.0]: https://github.com/kettle-rb/kettle-drift/compare/bd038cd14dc083203b58f8fee359e63d6feeaaca...v1.0.0
data/CONTRIBUTING.md CHANGED
@@ -102,13 +102,29 @@ Git hooks and commit message helpers (exe/kettle-commit-msg)
102
102
  - GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
103
103
  - GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
104
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
+
105
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 -- ...`.
106
122
 
107
123
  ## Appraisals
108
124
 
109
125
  From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
110
126
  Generated appraisal and CI workflow floors are controlled by `ruby.test_minimum`
111
- in `.kettle-jem.yml`; this project was templated with `ruby.test_minimum: 3.2.0`.
127
+ in `.structuredmerge/kettle-jem.yml`; this project was templated with `ruby.test_minimum: 3.2.0`.
112
128
  That value describes the lowest Ruby version expected to run the test/development
113
129
  toolchain, and it may be higher than the gemspec runtime floor.
114
130
 
data/README.md CHANGED
@@ -1,19 +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] [![kettle-rb Logo by Aboling0, CC BY-SA 4.0][🖼️kettle-rb-i]][🖼️kettle-rb] [![kettle-drift Logo by Aboling0, CC BY-SA 4.0][🖼️kettle-rb-kettle-drift-i]][🖼️kettle-rb-kettle-drift]
2
-
3
- [🖼️galtzo-floss-i]: https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px.svg
4
- [🖼️galtzo-floss]: https://discord.gg/3qme4XHNKN
5
- [🖼️ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-128px.svg
6
- [🖼️ruby-lang]: https://www.ruby-lang.org/
7
- [🖼️kettle-rb-i]: https://logos.galtzo.com/assets/images/kettle-rb/avatar-128px.svg
8
- [🖼️kettle-rb]: https://github.com/kettle-rb
9
- [🖼️kettle-rb-kettle-drift-i]: https://logos.galtzo.com/assets/images/kettle-rb/kettle-drift/avatar-128px.svg
10
- [🖼️kettle-rb-kettle-drift]: https://github.com/kettle-rb/kettle-drift
1
+ <a href="https://github.com/kettle-rb"><img alt="kettle-rb Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/kettle-rb/avatar-128px.svg" width="12%" align="right"/></a> <a href="https://github.com/kettle-rb/kettle-drift"><img alt="kettle-drift Logo by Aboling0, CC BY-SA 4.0" src="https://logos.galtzo.com/assets/images/kettle-rb/kettle-drift/avatar-128px.svg" width="12%" align="right"/></a>
11
2
 
12
3
  # 🍲 Kettle::Drift
13
4
 
14
- [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: AGPL-3.0-only][📄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]
5
+ [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: AGPL-3.0-only][📄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]
15
6
 
16
- `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].
17
8
 
18
9
  ---
19
10
 
@@ -28,7 +19,7 @@ I've summarized my thoughts in [this blog post](https://dev.to/galtzo/hostile-ta
28
19
 
29
20
  </details>
30
21
 
31
- ## 🌻 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>
32
23
 
33
24
  `kettle-drift` tracks repeated adjacent-line chunks that usually signal
34
25
  template drift or copy/paste corruption. When it is injected into a project by
@@ -284,6 +275,8 @@ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
284
275
 
285
276
  ### Please give the project a star ⭐ ♥.
286
277
 
278
+ 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.
279
+
287
280
  Thanks for RTFM. ☺️
288
281
 
289
282
  [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
@@ -386,8 +379,6 @@ Thanks for RTFM. ☺️
386
379
  [🏀codecovi]: https://codecov.io/gh/kettle-rb/kettle-drift/graph/badge.svg
387
380
  [🏀coveralls]: https://coveralls.io/github/kettle-rb/kettle-drift?branch=main
388
381
  [🏀coveralls-img]: https://coveralls.io/repos/github/kettle-rb/kettle-drift/badge.svg?branch=main
389
- [🖐codeQL]: https://github.com/kettle-rb/kettle-drift/security/code-scanning
390
- [🖐codeQL-img]: https://github.com/kettle-rb/kettle-drift/actions/workflows/codeql-analysis.yml/badge.svg
391
382
  [🚎ruby-3.2-wf]: https://github.com/kettle-rb/kettle-drift/actions/workflows/ruby-3.2.yml
392
383
  [🚎ruby-3.3-wf]: https://github.com/kettle-rb/kettle-drift/actions/workflows/ruby-3.3.yml
393
384
  [🚎ruby-3.4-wf]: https://github.com/kettle-rb/kettle-drift/actions/workflows/ruby-3.4.yml
@@ -448,7 +439,7 @@ Thanks for RTFM. ☺️
448
439
  [📌gitmoji]: https://gitmoji.dev
449
440
  [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
450
441
  [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
451
- [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.510-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
442
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.512-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
452
443
  [🔐security]: https://github.com/kettle-rb/kettle-drift/blob/main/SECURITY.md
453
444
  [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
454
445
  [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
@@ -474,9 +465,9 @@ Thanks for RTFM. ☺️
474
465
  | Field | Value |
475
466
  |---|---|
476
467
  | Package | kettle-drift |
477
- | Description | 🔮 Kettle::Drift tracks repeated adjacent-line chunks that usually signal template drift or copy/paste corruption. |
468
+ | Description | 🍲 Kettle::Drift tracks repeated adjacent-line chunks that usually signal template drift or copy/paste corruption. |
478
469
  | Homepage | https://github.com/kettle-rb/kettle-drift |
479
- | Source | https://github.com/kettle-rb/kettle-drift/tree/v1.0.0 |
470
+ | Source | https://github.com/kettle-rb/kettle-drift/tree/v1.0.1 |
480
471
  | License | `AGPL-3.0-only` |
481
472
  | Funding | https://github.com/sponsors/pboling, https://issuehunt.io/u/pboling, https://ko-fi.com/pboling, https://liberapay.com/pboling/donate, https://opencollective.com/kettle-rb, https://patreon.com/galtzo, https://polar.sh/pboling, https://thanks.dev/u/gh/pboling, https://tidelift.com/funding/github/rubygems/kettle-drift, https://www.buymeacoffee.com/pboling |
482
473
  <!-- kettle-jem:metadata:end -->
data/SECURITY.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Version | Supported |
6
6
  |----------|-----------|
7
- | 1.latest | ✅ |
7
+ | 1.0.latest | ✅ |
8
8
 
9
9
  ## Security contact information
10
10
 
@@ -20,8 +20,8 @@ module Kettle
20
20
  mode: options.fetch(:mode),
21
21
  )
22
22
 
23
- if outcome.clean?
24
- puts "[kettle-drift] ✅ No duplicate drift detected (min_chars=#{options[:min_chars]}, files=#{outcome.files.size}, baseline=#{outcome.baseline_set.size})"
23
+ if outcome.clean? || outcome.diff.state == :no_changes
24
+ puts "[kettle-drift] ✅ No new duplicate drift detected (min_chars=#{options[:min_chars]}, files=#{outcome.files.size}, baseline=#{outcome.baseline_set.size})"
25
25
  else
26
26
  puts "[kettle-drift] ⚠️ #{outcome.warning_count} drift warning(s) across #{outcome.results.size} unique chunk(s) (files=#{outcome.files.size}, baseline=#{outcome.baseline_set.size})"
27
27
  puts "[kettle-drift] 📄 Report: #{Kettle::Drift.display_path(outcome.json_path)}" if outcome.json_path
@@ -3,7 +3,7 @@
3
3
  module Kettle
4
4
  module Drift
5
5
  module Version
6
- VERSION = "1.0.1"
6
+ VERSION = "1.0.2"
7
7
  end
8
8
  VERSION = Version::VERSION # Traditional Constant Location
9
9
  end
data/lib/kettle/drift.rb CHANGED
@@ -113,8 +113,15 @@ module Kettle
113
113
  results = Kettle::Drift::DuplicateLineValidator.subtract_baseline(results, baseline_set: baseline_set)
114
114
  warning_count = Kettle::Drift::DuplicateLineValidator.warning_count(results)
115
115
 
116
+ process_result = Kettle::Drift::Process.new(
117
+ project_root: expanded_project_root,
118
+ lock_path: expanded_lock_path,
119
+ mode: mode,
120
+ results: results,
121
+ printer_class: printer_class,
122
+ ).run
116
123
  expanded_json_path = nil
117
- unless results.empty?
124
+ if write_json_report?(results, process_result.diff)
118
125
  expanded_json_path = if json_path
119
126
  File.expand_path(json_path, expanded_project_root)
120
127
  else
@@ -123,14 +130,6 @@ module Kettle
123
130
  Kettle::Drift::DuplicateLineValidator.write_json(results, expanded_json_path)
124
131
  end
125
132
 
126
- process_result = Kettle::Drift::Process.new(
127
- project_root: expanded_project_root,
128
- lock_path: expanded_lock_path,
129
- mode: mode,
130
- results: results,
131
- printer_class: printer_class,
132
- ).run
133
-
134
133
  Kettle::Drift::Outcome.new(
135
134
  project_root: expanded_project_root,
136
135
  files: selected_files,
@@ -145,6 +144,10 @@ module Kettle
145
144
  exit_code: process_result.exit_code,
146
145
  )
147
146
  end
147
+
148
+ def write_json_report?(results, diff)
149
+ !results.empty? && diff.state != :no_changes
150
+ end
148
151
  end
149
152
  end
150
153
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kettle-drift
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter H. Boling
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '2.0'
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 2.0.4
69
+ version: 2.0.8
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '2.0'
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 2.0.4
79
+ version: 2.0.8
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: bundler-audit
82
82
  requirement: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ dependencies:
154
154
  version: '2.0'
155
155
  - - ">="
156
156
  - !ruby/object:Gem::Version
157
- version: 2.0.1
157
+ version: 2.0.3
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
@@ -164,7 +164,27 @@ dependencies:
164
164
  version: '2.0'
165
165
  - - ">="
166
166
  - !ruby/object:Gem::Version
167
- version: 2.0.1
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
168
188
  - !ruby/object:Gem::Dependency
169
189
  name: ruby-progressbar
170
190
  requirement: !ruby/object:Gem::Requirement
@@ -208,7 +228,7 @@ dependencies:
208
228
  version: '2.0'
209
229
  - - ">="
210
230
  - !ruby/object:Gem::Version
211
- version: 2.0.0
231
+ version: 2.0.1
212
232
  type: :development
213
233
  prerelease: false
214
234
  version_requirements: !ruby/object:Gem::Requirement
@@ -218,7 +238,7 @@ dependencies:
218
238
  version: '2.0'
219
239
  - - ">="
220
240
  - !ruby/object:Gem::Version
221
- version: 2.0.0
241
+ version: 2.0.1
222
242
  description: "\U0001F372 Kettle::Drift tracks repeated adjacent-line chunks that usually
223
243
  signal template drift or copy/paste corruption."
224
244
  email:
@@ -269,10 +289,10 @@ licenses:
269
289
  - AGPL-3.0-only
270
290
  metadata:
271
291
  homepage_uri: https://structuredmerge.org
272
- source_code_uri: https://github.com/kettle-rb/kettle-drift/tree/v1.0.1
273
- changelog_uri: https://github.com/kettle-rb/kettle-drift/blob/v1.0.1/CHANGELOG.md
292
+ source_code_uri: https://github.com/kettle-rb/kettle-drift/tree/v1.0.2
293
+ changelog_uri: https://github.com/kettle-rb/kettle-drift/blob/v1.0.2/CHANGELOG.md
274
294
  bug_tracker_uri: https://github.com/kettle-rb/kettle-drift/issues
275
- documentation_uri: https://www.rubydoc.info/gems/kettle-drift/1.0.1
295
+ documentation_uri: https://www.rubydoc.info/gems/kettle-drift/1.0.2
276
296
  funding_uri: https://github.com/sponsors/pboling
277
297
  wiki_uri: https://github.com/kettle-rb/kettle-drift/wiki
278
298
  news_uri: https://www.railsbling.com/tags/kettle-drift
metadata.gz.sig CHANGED
Binary file