From 87be52119aa44ae91b574d6f3274621ccc9a645f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 21 Aug 2026 21:17:27 -0700 Subject: [PATCH 1/4] Require Ruby 3.1+ and modernize CI - Set required_ruby_version to ">= 3.1" in the gemspec - Standardize .rubocop.yml on cookstyle/chefstyle with TargetRubyVersion 3.1 (the standalone `chefstyle` gem no longer loads, which broke linting) - Run unit tests on every Ruby release from 3.1 to 4.0 and run cookstyle --chefstyle on Ruby 3.1 - Add the cookstyle bundler group where it was missing so `bundle exec cookstyle` resolves in CI - Apply cookstyle --chefstyle autocorrections - Drop dead linters (cane, tailor, finstyle, standalone chefstyle) that are superseded by cookstyle and fail on modern Ruby Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Tim Smith --- .rubocop.yml | 3 ++- Gemfile | 4 ++++ lib/kitchen/driver/hyperv.rb | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 9909d8e..ea9207d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,9 @@ --- require: - - chefstyle + - cookstyle/chefstyle AllCops: + TargetRubyVersion: 3.1 Include: - "**/*.rb" Exclude: diff --git a/Gemfile b/Gemfile index 2fbbe01..58da785 100644 --- a/Gemfile +++ b/Gemfile @@ -27,3 +27,7 @@ group :docs do gem "yard" end + +group :cookstyle do + gem "cookstyle" +end diff --git a/lib/kitchen/driver/hyperv.rb b/lib/kitchen/driver/hyperv.rb index 6e475f5..9fe8bd5 100644 --- a/lib/kitchen/driver/hyperv.rb +++ b/lib/kitchen/driver/hyperv.rb @@ -323,10 +323,10 @@ def connection backend = remote_hyperv ? "winrm" : "local" train = Train.create(backend, { - host: config[:hyperv_server], - user: config[:hyperv_username], - password: config[:hyperv_password], - ssl: config[:hyperv_ssl], + host: config[:hyperv_server], + user: config[:hyperv_username], + password: config[:hyperv_password], + ssl: config[:hyperv_ssl], self_signed: config[:hyperv_insecure], }) @connection = train.connection From 893913576cbe80c12851f829ea9b6fd49c733fe6 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 21 Aug 2026 21:37:07 -0700 Subject: [PATCH 2/4] Fix markdown and YAML lint failures - Add the standard .markdownlint.yaml / .yamllint configs where missing (repos without them fell back to strict defaults and failed CI) - Exclude CHANGELOG files from markdown-lint in the shared workflow, matching test-kitchen; generated changelogs cannot satisfy the rules and are rewritten on each release - Fix real YAML indentation (sequences must be indented under their key); verified the parsed YAML is unchanged - Remove dead .travis.yml / appveyor.yml configs, which were also the main yamllint offenders - README cleanup: drop obsolete heading anchors and dead travis-ci.org badges, modernize .png badge URLs, fix heading levels, add code-fence languages, repair broken lists, strip trailing whitespace Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Tim Smith --- .yamllint | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .yamllint diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..ecfdffb --- /dev/null +++ b/.yamllint @@ -0,0 +1,6 @@ +--- +extends: default +rules: + line-length: + max: 256 + level: warning From a522af3040dcbf30940f0f4c8320670bf8898b44 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 21 Aug 2026 22:28:38 -0700 Subject: [PATCH 3/4] Remove remaining dead linting config and add the gem version badge - Drop the chefstyle bundler group / dev dependency. chefstyle pins an old rubocop, which resolves cookstyle down to 7.x where "cookstyle --chefstyle" is not a valid option. Cookstyle supersedes it. - Remove .cane config files; cane is unmaintained and calls File.exists?, removed in Ruby 4.0 - Remove the bundler dev dependency; bundler ships with Ruby and pinning it only constrains resolution - Add the gem version badge to READMEs that were missing one Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Tim Smith --- Gemfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Gemfile b/Gemfile index 58da785..1e3e478 100644 --- a/Gemfile +++ b/Gemfile @@ -19,10 +19,6 @@ group :development do gem "pry-stack_explorer" end -group :chefstyle do - gem "chefstyle" -end - group :docs do gem "yard" end From 849da56a15ddd832573ef3538a069e5584f8aa73 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 21 Aug 2026 22:46:59 -0700 Subject: [PATCH 4/4] Fix the test task and remove the last dead linting setup - Point Rakefiles at cookstyle/chefstyle instead of the standalone chefstyle gem, which no longer resolves; several required it unguarded, so rake aborted outright - Remove Guardfiles and guard-* dev dependencies (guard-kitchen keeps its own, since guard is what it integrates with) - Remove the last cane and .cane config remnants - Give repos that have tests but no test task one, so `rake test` works - kitchen-habitat: move fakefs from :development to :test; CI runs with BUNDLE_WITHOUT=development, so the spec could not load it Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Tim Smith --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 45e3349..902b0de 100644 --- a/Rakefile +++ b/Rakefile @@ -12,13 +12,13 @@ desc "Run all test suites" task test: :unit begin - require "chefstyle" + require "cookstyle/chefstyle" require "rubocop/rake_task" RuboCop::RakeTask.new(:style) do |task| task.options += ["--display-cop-names", "--no-color"] end rescue LoadError - puts "chefstyle is not available. (sudo) gem install chefstyle to do style checking." + puts "cookstyle/chefstyle is not available. (sudo) gem install cookstyle to do style checking." end desc "Run all quality tasks"