kettle-drift 1.0.20 → 1.0.21
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 +14 -1
- data/README.md +4 -1
- data/lib/kettle/drift/plugin.rb +10 -0
- data/lib/kettle/drift/version.rb +1 -1
- data/lib/kettle/drift.rb +21 -1
- data.tar.gz.sig +0 -0
- metadata +8 -8
- 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: 552a19dd937b15661ec00b642db90b912cac3875b1d74ce252ae0d187a6256e8
|
|
4
|
+
data.tar.gz: e443d28f3ed1566a7b20475ef80a1d6fb75a9d0d98c80585fa68d4eefc38ba12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 95c5a3d3c191b79d0ec3879519a658508b771f2e21432ec69656140665afdad21ba30abd40132a6cb753c03832b04cc1d0eec62e18f0c00cee7ece21c1ba4edd
|
|
7
|
+
data.tar.gz: a9af592d3f9aa08eabdabfd738909b5baf2d30cca78559916e5f1c4a70e2bb9c5cafe99f16ec335a34c1fbaa3d87ba542506a32a3fb81c72a599233047b0b716
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,17 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [1.0.21] - 2026-11-29
|
|
34
|
+
|
|
35
|
+
- TAG: [v1.0.21][1.0.21t]
|
|
36
|
+
- COVERAGE: 81.83% -- 473/578 lines in 14 files
|
|
37
|
+
- BRANCH COVERAGE: 66.81% -- 157/235 branches in 14 files
|
|
38
|
+
- 35.78% documented
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- Moved canonical drift lockfile from `.kettle-drift.lock` to `.kettle/drift.lock` with one-time automatic migration (`Kettle::Drift.migrate_lockfile!` and `Kettle::Drift::Plugin.migrate_lockfile`) that removes the legacy root lockfile (#34).
|
|
43
|
+
|
|
33
44
|
## [1.0.20] - 2026-11-27
|
|
34
45
|
|
|
35
46
|
- TAG: [v1.0.20][1.0.20t]
|
|
@@ -437,7 +448,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
437
448
|
|
|
438
449
|
- Initial release
|
|
439
450
|
|
|
440
|
-
[Unreleased]: https://github.com/kettle-dev/kettle-drift/compare/v1.0.
|
|
451
|
+
[Unreleased]: https://github.com/kettle-dev/kettle-drift/compare/v1.0.21...HEAD
|
|
452
|
+
[1.0.21]: https://github.com/kettle-dev/kettle-drift/compare/v1.0.20...v1.0.21
|
|
453
|
+
[1.0.21t]: https://github.com/kettle-dev/kettle-drift/releases/tag/v1.0.21
|
|
441
454
|
[1.0.20]: https://github.com/kettle-dev/kettle-drift/compare/v1.0.19...v1.0.20
|
|
442
455
|
[1.0.20t]: https://github.com/kettle-dev/kettle-drift/releases/tag/v1.0.20
|
|
443
456
|
[1.0.19]: https://github.com/kettle-dev/kettle-drift/compare/v1.0.18...v1.0.19
|
data/README.md
CHANGED
|
@@ -110,6 +110,9 @@ gem install kettle-drift
|
|
|
110
110
|
|
|
111
111
|
## ⚙️ Configuration
|
|
112
112
|
|
|
113
|
+
By default, acknowledged drift is stored in `.kettle/drift.lock` (legacy root
|
|
114
|
+
`.kettle-drift.lock` files are migrated automatically on run and removed).
|
|
115
|
+
|
|
113
116
|
The injected rake tasks and the standalone CLI expose the same three operating
|
|
114
117
|
modes, but they differ in default scan scope:
|
|
115
118
|
|
|
@@ -425,7 +428,7 @@ Thanks for RTFM. ☺️
|
|
|
425
428
|
[📌gitmoji]: https://gitmoji.dev
|
|
426
429
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
427
430
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
428
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
431
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.578-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
429
432
|
[🔐security]: https://github.com/kettle-dev/kettle-drift/blob/main/SECURITY.md
|
|
430
433
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
431
434
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/lib/kettle/drift/plugin.rb
CHANGED
|
@@ -32,10 +32,20 @@ module Kettle
|
|
|
32
32
|
|
|
33
33
|
def register!(registrar)
|
|
34
34
|
registrar.after_phase(:remaining_files) do |context:, **|
|
|
35
|
+
migrate_lockfile(context)
|
|
35
36
|
inject_rakefile_tasks(context)
|
|
36
37
|
end
|
|
37
38
|
end
|
|
38
39
|
|
|
40
|
+
def migrate_lockfile(context)
|
|
41
|
+
result = Kettle::Drift.migrate_lockfile!(project_root: context.project_root)
|
|
42
|
+
return unless result[:migrated]
|
|
43
|
+
|
|
44
|
+
context.helpers.record_template_result(result[:target], :replace) if File.exist?(result[:target])
|
|
45
|
+
context.helpers.record_template_result(result[:source], :delete)
|
|
46
|
+
context.out.report_detail("[kettle-drift] Migrated #{Kettle::Drift::LEGACY_LOCKFILE} to #{Kettle::Drift::DEFAULT_LOCKFILE}")
|
|
47
|
+
end
|
|
48
|
+
|
|
39
49
|
def inject_rakefile_tasks(context)
|
|
40
50
|
rakefile_path = File.join(context.project_root, "Rakefile")
|
|
41
51
|
return unless File.exist?(rakefile_path)
|
data/lib/kettle/drift/version.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Kettle
|
|
|
5
5
|
# Version namespace for this gem.
|
|
6
6
|
module Version
|
|
7
7
|
# Current gem version.
|
|
8
|
-
VERSION = "1.0.
|
|
8
|
+
VERSION = "1.0.21"
|
|
9
9
|
end
|
|
10
10
|
# Current gem version exposed at the traditional constant location.
|
|
11
11
|
VERSION = Version::VERSION # Traditional Constant Location
|
data/lib/kettle/drift.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "fileutils"
|
|
3
4
|
require "version_gem"
|
|
4
5
|
require_relative "drift/version"
|
|
5
6
|
|
|
@@ -16,7 +17,8 @@ module Kettle
|
|
|
16
17
|
autoload :Process, "kettle/drift/process"
|
|
17
18
|
autoload :Serializer, "kettle/drift/serializer"
|
|
18
19
|
|
|
19
|
-
DEFAULT_LOCKFILE = ".kettle
|
|
20
|
+
DEFAULT_LOCKFILE = ".kettle/drift.lock"
|
|
21
|
+
LEGACY_LOCKFILE = ".kettle-drift.lock"
|
|
20
22
|
EXCLUDED_PATH_SEGMENTS = Set.new(%w[
|
|
21
23
|
.bundle
|
|
22
24
|
.git
|
|
@@ -100,6 +102,21 @@ module Kettle
|
|
|
100
102
|
basename == "Gemfile.lock" || basename.end_with?(".gemfile.lock") || basename == "package-lock.json"
|
|
101
103
|
end
|
|
102
104
|
|
|
105
|
+
def migrate_lockfile!(project_root:, target_path: nil, legacy_path: nil, **_options)
|
|
106
|
+
root = File.expand_path(project_root)
|
|
107
|
+
legacy = legacy_path ? File.expand_path(legacy_path, root) : File.join(root, LEGACY_LOCKFILE)
|
|
108
|
+
target = target_path ? File.expand_path(target_path, root) : File.join(root, DEFAULT_LOCKFILE)
|
|
109
|
+
return {migrated: false, source: legacy, target: target} unless File.file?(legacy) && legacy != target
|
|
110
|
+
|
|
111
|
+
if File.file?(target)
|
|
112
|
+
File.delete(legacy)
|
|
113
|
+
else
|
|
114
|
+
FileUtils.mkdir_p(File.dirname(target))
|
|
115
|
+
FileUtils.mv(legacy, target)
|
|
116
|
+
end
|
|
117
|
+
{migrated: true, source: legacy, target: target}
|
|
118
|
+
end
|
|
119
|
+
|
|
103
120
|
def run(
|
|
104
121
|
project_root:,
|
|
105
122
|
files: nil,
|
|
@@ -113,6 +130,9 @@ module Kettle
|
|
|
113
130
|
expanded_project_root = File.expand_path(project_root)
|
|
114
131
|
expanded_template_dir = template_dir.to_s.strip.empty? ? nil : File.expand_path(template_dir, expanded_project_root)
|
|
115
132
|
expanded_lock_path = File.expand_path(lock_path, expanded_project_root)
|
|
133
|
+
if expanded_lock_path == File.join(expanded_project_root, DEFAULT_LOCKFILE)
|
|
134
|
+
migrate_lockfile!(project_root: expanded_project_root, target_path: expanded_lock_path)
|
|
135
|
+
end
|
|
116
136
|
selected_files = Array(files || target_files(project_root: expanded_project_root, template_dir: expanded_template_dir))
|
|
117
137
|
baseline_set = expanded_template_dir ? Kettle::Drift::DuplicateLineValidator.baseline(template_dir: expanded_template_dir, min_chars: min_chars) : Set.new
|
|
118
138
|
results = Kettle::Drift::DuplicateLineValidator.scan(files: selected_files, min_chars: min_chars)
|
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.
|
|
4
|
+
version: 1.0.21
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -72,7 +72,7 @@ dependencies:
|
|
|
72
72
|
-
|
|
73
73
|
- ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 3.1.
|
|
75
|
+
version: 3.1.35
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -84,7 +84,7 @@ dependencies:
|
|
|
84
84
|
-
|
|
85
85
|
- ">="
|
|
86
86
|
- !ruby/object:Gem::Version
|
|
87
|
-
version: 3.1.
|
|
87
|
+
version: 3.1.35
|
|
88
88
|
- !ruby/object:Gem::Dependency
|
|
89
89
|
name: bundler-audit
|
|
90
90
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -200,7 +200,7 @@ dependencies:
|
|
|
200
200
|
-
|
|
201
201
|
- ">="
|
|
202
202
|
- !ruby/object:Gem::Version
|
|
203
|
-
version: 2.0.
|
|
203
|
+
version: 2.0.31
|
|
204
204
|
type: :development
|
|
205
205
|
prerelease: false
|
|
206
206
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -212,7 +212,7 @@ dependencies:
|
|
|
212
212
|
-
|
|
213
213
|
- ">="
|
|
214
214
|
- !ruby/object:Gem::Version
|
|
215
|
-
version: 2.0.
|
|
215
|
+
version: 2.0.31
|
|
216
216
|
- !ruby/object:Gem::Dependency
|
|
217
217
|
name: turbo_tests2
|
|
218
218
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -333,10 +333,10 @@ licenses:
|
|
|
333
333
|
- AGPL-3.0-only
|
|
334
334
|
metadata:
|
|
335
335
|
homepage_uri: "https://kettle-drift.galtzo.com"
|
|
336
|
-
source_code_uri: "https://github.com/kettle-dev/kettle-drift/tree/v1.0.
|
|
337
|
-
changelog_uri: "https://github.com/kettle-dev/kettle-drift/blob/v1.0.
|
|
336
|
+
source_code_uri: "https://github.com/kettle-dev/kettle-drift/tree/v1.0.21"
|
|
337
|
+
changelog_uri: "https://github.com/kettle-dev/kettle-drift/blob/v1.0.21/CHANGELOG.md"
|
|
338
338
|
bug_tracker_uri: "https://github.com/kettle-dev/kettle-drift/issues"
|
|
339
|
-
documentation_uri: "https://www.rubydoc.info/gems/kettle-drift/1.0.
|
|
339
|
+
documentation_uri: "https://www.rubydoc.info/gems/kettle-drift/1.0.21"
|
|
340
340
|
funding_uri: "https://github.com/sponsors/pboling"
|
|
341
341
|
wiki_uri: "https://github.com/kettle-dev/kettle-drift/wiki"
|
|
342
342
|
news_uri: "https://www.railsbling.com/tags/kettle-drift"
|
metadata.gz.sig
CHANGED
|
Binary file
|