From c0838bdc12b3f4a99de448d4f9bc79f4a5bf0483 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Wed, 5 Feb 2025 08:51:51 -0600 Subject: [PATCH 1/5] remove test-kitchen dependency Signed-off-by: Corey Hemminger --- kitchen-vagrant.gemspec | 2 -- 1 file changed, 2 deletions(-) diff --git a/kitchen-vagrant.gemspec b/kitchen-vagrant.gemspec index a1acea2..76a74f2 100644 --- a/kitchen-vagrant.gemspec +++ b/kitchen-vagrant.gemspec @@ -16,6 +16,4 @@ Gem::Specification.new do |gem| gem.require_paths = ["lib"] gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "test-kitchen", ">= 1.4", "< 4" end From 4e3182830c32de2c4e7c6f1607d0427e8a1aede7 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Fri, 7 Feb 2025 15:59:31 -0600 Subject: [PATCH 2/5] makes test-kitchen conditional Signed-off-by: Corey Hemminger --- Gemfile | 4 ++++ kitchen-vagrant.gemspec | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Gemfile b/Gemfile index 533b99b..cfbb79c 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,10 @@ source "https://rubygems.org" # Specify your gem"s dependencies in kitchen-vagrant.gemspec gemspec +if ENV['CHEF_TEST_KITCHEN_ENTERPRISE'] + gem "chef-test-kitchen-enterprise", git: "https://github.com/chef/test-kitchen", branch: "main" +end + group :test do gem "rake" gem "kitchen-inspec" diff --git a/kitchen-vagrant.gemspec b/kitchen-vagrant.gemspec index 76a74f2..4c99a00 100644 --- a/kitchen-vagrant.gemspec +++ b/kitchen-vagrant.gemspec @@ -16,4 +16,8 @@ Gem::Specification.new do |gem| gem.require_paths = ["lib"] gem.required_ruby_version = ">= 3.0" + + unless ENV['CHEF_TEST_KITCHEN_ENTERPRISE'] + gem.add_dependency "test-kitchen", ">= 1.4", "< 4" + end end From b33b2fddee00521b7ff511fbf59d59ecf3d26d0d Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Fri, 7 Feb 2025 16:05:59 -0600 Subject: [PATCH 3/5] fix: switch to cookstyle Signed-off-by: Corey Hemminger --- .rubocop.yml | 3 +-- Gemfile | 4 ++-- Rakefile | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 9909d8e..d642e15 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,5 @@ --- -require: - - chefstyle +TargetRubyVersion: 3.1 AllCops: Include: diff --git a/Gemfile b/Gemfile index cfbb79c..9af3145 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,6 @@ group :debug do gem "pry" end -group :chefstyle do - gem "chefstyle", "2.2.3" +group :cookstyle do + gem "cookstyle" end diff --git a/Rakefile b/Rakefile index 71cfd2b..2b21951 100644 --- a/Rakefile +++ b/Rakefile @@ -7,13 +7,13 @@ RSpec::Core::RakeTask.new(:test) do |t| end begin - require "chefstyle" + require "cookstyle" require "rubocop/rake_task" RuboCop::RakeTask.new(:style) do |task| - task.options += ["--display-cop-names", "--no-color"] + task.options += ["--chefstyle", "--display-cop-names", "--no-color"] end rescue LoadError - puts "chefstyle is not available. (sudo) gem install chefstyle to do style checking." + puts "cookstyle is not available. (sudo) gem install cookstyle to do style checking." end task default: %i{test style} From 3a7dd5f8d41415f8d1301e4a78ba54df7e2f7e2d Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 13 Feb 2025 12:11:28 -0600 Subject: [PATCH 4/5] fix rubocop.yml file Signed-off-by: Corey Hemminger --- .rubocop.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index d642e15..7955d9b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,6 @@ --- -TargetRubyVersion: 3.1 - AllCops: + TargetRubyVersion: 3.1 Include: - "**/*.rb" Exclude: From 1e9e0da57801453ef17a095d3da7f503258b10d9 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 13 Feb 2025 12:33:17 -0600 Subject: [PATCH 5/5] update virtbox version to 7.1 Signed-off-by: Corey Hemminger --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9cd3259..31a28d7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,7 +24,7 @@ jobs: echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list echo "deb [signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list sudo apt-get update - sudo apt-get install -y software-properties-common vagrant virtualbox-7.0 + sudo apt-get install -y software-properties-common vagrant virtualbox-7.1 - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: