Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Require Ruby 3.1 + lint with cookstyle #278

Merged
merged 5 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ 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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: "Test"
name: "Lint, Unit & Integration Tests"

"on":
pull_request:
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
default: true
MD004: false
MD012: false
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
require:
- chefstyle
- cookstyle/chefstyle

AllCops:
TargetRubyVersion: 3.1
Expand Down
3 changes: 0 additions & 3 deletions CONTRIBUTING.md

This file was deleted.

4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion kitchen-azurerm.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/kitchen/driver/azurerm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading