This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Ruby 3.0 and Kitchen 3.0 (#458)
* Simplify gems.rb * Refresh Guardfile with plugin template suggestions * Drop guard-bundler This plugin doesn't support gems.rb :( * Update RSpec to ~> 3.10 * Add implicit yard dependency on webrick * Update dry-validation to ~> 1.6 * Add Ruby 3.0 to supported versions * Add Ruby 3.0 to tested versions * Use Ruby 3.0 as development version * Use positional standard_output yield param RSpec 3.10 has an incompatibility with Ruby 3.0 for mocks that yield keyword arguments * Update config attributes for dry-validation ~> 1.6 * Use Ruby 3.0 in kitchen-tests * Drop obsolete Ruby directories from CC * Increase file-lines threshold to 300 * Clarify HashOfSymbolsAndStrings errors * Apply rufo * Move code coverage to Ruby 3.0 * Add support for test-kitchen 3.0 * Fix line lengths in CHANGELOG * Update CI testing information * Fix release info line length * Add support for delegate 2.0 * Add Ruby 3.0 to CHANGELOG * Add Kitchen 3.0 to CHANGELOG * Add path filters to GHA workflows
- Loading branch information
1 parent
e87e502
commit 0871af5
Showing
64 changed files
with
1,157 additions
and
1,030 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
name: RSpec Tests | ||
|
||
on: pull_request | ||
on: | ||
pull_request: | ||
paths: | ||
- '.rspec' | ||
- 'gems.rb' | ||
- 'kitchen-terraform.gemspec' | ||
- 'lib/**' | ||
- 'Rakefile' | ||
- 'spec/**' | ||
|
||
jobs: | ||
rspec-tests: | ||
|
@@ -10,6 +18,7 @@ jobs: | |
ruby-version: | ||
- '2.6' | ||
- '2.7' | ||
- '3.0' | ||
runs-on: ubuntu-latest | ||
env: | ||
CC_TEST_REPORTER_ID: 7574433e1beed630cb9a171c688bb9e010d5028f00f7218d6e845fe138c65168 | ||
|
@@ -24,10 +33,10 @@ jobs: | |
bundler: '2.1.4' | ||
bundler-cache: true | ||
- name: Run RSpec Tests | ||
if: ${{ matrix.ruby-version != '2.7' }} | ||
if: ${{ matrix.ruby-version != '3.0' }} | ||
run: bundle exec rake test:rspec | ||
- name: Run RSpec Tests with Code Coverage | ||
if: ${{ matrix.ruby-version == '2.7' }} | ||
if: ${{ matrix.ruby-version == '3.0' }} | ||
uses: paambaati/[email protected] | ||
with: | ||
coverageCommand: bundle exec rake test:rspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
require "guard/rspec/dsl" | ||
|
||
directories ["lib", "spec"] | ||
|
||
group :red_green_refactor, halt_on_fail: true do | ||
::Guard::RSpec::Dsl.new(self).tap do |dsl| | ||
guard :bundler do | ||
watch "kitchen-terraform.gemspec" | ||
end | ||
guard :yard, cli: "--reload" do | ||
watch /lib\/.+\.rb/ | ||
end | ||
|
||
guard :yard, cli: "--reload" do | ||
watch /lib\/.+\.rb/ | ||
guard( | ||
:rspec, | ||
all_after_pass: true, | ||
all_on_start: true, | ||
bundler_env: :inherit, | ||
cmd: "bundle exec rspec", | ||
failure_mode: :focus, | ||
) do | ||
require "guard/rspec/dsl" | ||
dsl = Guard::RSpec::Dsl.new self | ||
|
||
# RSpec files | ||
rspec = dsl.rspec | ||
watch rspec.spec_helper do | ||
rspec.spec_dir | ||
end | ||
|
||
guard( | ||
:rspec, | ||
all_after_pass: true, | ||
all_on_start: true, | ||
bundler_env: :inherit, | ||
cmd: "bundle exec rspec", | ||
failure_mode: :focus, | ||
) do | ||
watch dsl.rspec.spec_files | ||
|
||
watch dsl.rspec.spec_helper do dsl.rspec.spec_dir end | ||
|
||
watch dsl.rspec.spec_support do dsl.rspec.spec_dir end | ||
|
||
dsl.watch_spec_files_for dsl.ruby.lib_files | ||
watch rspec.spec_support do | ||
rspec.spec_dir | ||
end | ||
watch rspec.spec_files | ||
|
||
# Ruby files | ||
ruby = dsl.ruby | ||
dsl.watch_spec_files_for ruby.lib_files | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ require "rubygems" | |
specification.email = "[email protected]" | ||
specification.homepage = "https://newcontext-oss.github.io/kitchen-terraform/" | ||
specification.license = "Apache-2.0" | ||
specification.add_development_dependency "guard-bundler", "~> 2.1" | ||
specification.add_development_dependency "guard-rspec", "~> 4.7" | ||
specification.add_development_dependency "guard-yard", "~> 2.2" | ||
specification.add_development_dependency "guard", "~> 2.14" | ||
|
@@ -30,21 +29,23 @@ require "rubygems" | |
specification.add_development_dependency "middleman-syntax", "~> 3.0" | ||
specification.add_development_dependency "middleman", "~> 4.2" | ||
specification.add_development_dependency "rake", "~> 13.0" | ||
specification.add_development_dependency "rspec", "~> 3.4" | ||
specification.add_development_dependency "rspec", "~> 3.10" | ||
specification.add_development_dependency "rufo", "~> 0.7" | ||
specification.add_development_dependency "simplecov", "~> 0.16.1" | ||
specification.add_development_dependency "travis", "~> 1.8" | ||
specification.add_development_dependency "yard", "~> 0.9" | ||
specification.add_development_dependency "reek", "~> 6.0.2" | ||
specification.add_runtime_dependency "delegate", "~> 0.1.0" | ||
specification.add_runtime_dependency "dry-validation", "~> 0.13" | ||
# webrick is implicitly required by yard | ||
specification.add_development_dependency "webrick", "~> 1.7" | ||
specification.add_runtime_dependency "delegate", ">= 0.1.0", "< 0.3.0" | ||
specification.add_runtime_dependency "dry-validation", "~> 1.6" | ||
specification.add_runtime_dependency "mixlib-shellout", "~> 3.0" | ||
specification.add_runtime_dependency "inspec", ">= 3", "< 5", "!= 4.24.26", "!= 4.24.28", "!= 4.24.32" | ||
specification.add_runtime_dependency "json", "~> 2.3" | ||
specification.add_runtime_dependency "test-kitchen", "~> 2.1" | ||
specification.add_runtime_dependency "test-kitchen", ">= 2.1", "< 4.0" | ||
specification.add_runtime_dependency "tty-which", "~> 0.4.0" | ||
specification.cert_chain = ["certs/gem-public_cert.pem"] | ||
specification.required_ruby_version = [">= 2.6", "< 3.0"] | ||
specification.required_ruby_version = [">= 2.6", "< 4.0"] | ||
specification.requirements = ["Terraform >= v0.11.4, < v1.1.0"] | ||
specification.signing_key = "certs/gem-private_key.pem" if $PROGRAM_NAME =~ /gem\z/ | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.