From c27295096a0071ad3d17eb05bce4af13dc42d6cf Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 2 Dec 2024 19:22:38 -0800 Subject: [PATCH 1/4] Require Ruby 3.1 + lint with cookstyle Sync this repo with how things are done in other TK repos Signed-off-by: Tim Smith --- .github/dependabot.yml | 13 +++++++------ .rubocop.yml | 2 +- CONTRIBUTING.md | 3 --- Gemfile | 4 ++-- Rakefile | 4 ++-- kitchen-azurerm.gemspec | 2 +- lib/kitchen/driver/azurerm.rb | 2 +- 7 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml index df9ca58..d79d97f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,9 +4,10 @@ updates: - package-ecosystem: bundler directory: "/" schedule: - interval: daily - open-pull-requests-limit: 10 - ignore: - - dependency-name: chefstyle - versions: - - 1.7.4 + interval: weekly + open-pull-requests-limit: 5 + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + diff --git a/.rubocop.yml b/.rubocop.yml index 8fd406e..ea9207d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,6 @@ --- require: - - chefstyle + - cookstyle/chefstyle AllCops: TargetRubyVersion: 3.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 4b440b7..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,3 +0,0 @@ -# Contributing - -Please refer to diff --git a/Gemfile b/Gemfile index d79972d..48bdfa6 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,6 @@ group :debug do gem "pry" end -group :chefstyle do - gem "chefstyle", "2.2.3" +group :linting do + gem "cookstyle", "7.32.8" end diff --git a/Rakefile b/Rakefile index 2dc6a2f..cfbbc30 100644 --- a/Rakefile +++ b/Rakefile @@ -3,13 +3,13 @@ require "rspec/core/rake_task" RSpec::Core::RakeTask.new(:test) 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 task default: %i{test style} diff --git a/kitchen-azurerm.gemspec b/kitchen-azurerm.gemspec index 7ad8562..85c883c 100644 --- a/kitchen-azurerm.gemspec +++ b/kitchen-azurerm.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.files = Dir["LICENSE", "lib/**/*", "templates/**/*"] spec.require_paths = ["lib"] - spec.required_ruby_version = ">= 2.6" + spec.required_ruby_version = ">= 3.1" spec.add_dependency "azure_mgmt_network2", "~> 1.0.1", ">= 1.0.1" spec.add_dependency "azure_mgmt_resources2", "~> 1.0.1", ">= 1.0.1" diff --git a/lib/kitchen/driver/azurerm.rb b/lib/kitchen/driver/azurerm.rb index 43081d3..832d6b2 100644 --- a/lib/kitchen/driver/azurerm.rb +++ b/lib/kitchen/driver/azurerm.rb @@ -300,7 +300,7 @@ def create(state) end options = Kitchen::Driver::AzureCredentials.new(subscription_id: config[:subscription_id], - environment: config[:azure_environment]).azure_options + environment: config[:azure_environment]).azure_options debug "Azure environment: #{config[:azure_environment]}" @resource_management_client = ::Azure::Resources2::Profiles::Latest::Mgmt::Client.new(options) From a38ba8b406b2f45966dcd95bd3517144f0aeddfb Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 2 Dec 2024 19:33:02 -0800 Subject: [PATCH 2/4] Rename file to match other repos Signed-off-by: Tim Smith --- .github/workflows/{publish.yaml => publish.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{publish.yaml => publish.yml} (100%) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yml similarity index 100% rename from .github/workflows/publish.yaml rename to .github/workflows/publish.yml From 397d0e5de345a5229922fffc13d69cf723b47144 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 2 Dec 2024 19:33:16 -0800 Subject: [PATCH 3/4] More syncs from other repos Signed-off-by: Tim Smith --- .github/workflows/lint.yml | 2 +- .markdownlint.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 925ce2d..c80c7c6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,5 @@ --- -name: "Test" +name: "Lint, Unit & Integration Tests" "on": pull_request: diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 4973e68..9fd2375 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,3 +1,4 @@ +--- default: true MD004: false MD012: false From 819175e89747cbbc4c8dda83b41a78031d965a97 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 2 Dec 2024 19:53:13 -0800 Subject: [PATCH 4/4] Remove empty line Signed-off-by: Tim Smith --- .github/dependabot.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d79d97f..a36f2a8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,4 +10,3 @@ updates: directory: "/" schedule: interval: weekly -