Skip to content

Require Ruby 3.1+ and modernize CI - #44

Merged
tas50 merged 7 commits into
mainfrom
ruby-3.1-ci-modernization
Aug 22, 2026
Merged

Require Ruby 3.1+ and modernize CI#44
tas50 merged 7 commits into
mainfrom
ruby-3.1-ci-modernization

Conversation

@tas50

@tas50 tas50 commented Aug 22, 2026

Copy link
Copy Markdown
Member

Standardizes the Ruby requirement and CI across the test-kitchen org.

Changes

  • Ruby requirement: required_ruby_version = ">= 3.1" in the gemspec.
  • .rubocop.yml: standardized on cookstyle/chefstyle with TargetRubyVersion: 3.1, matching test-kitchen. Many repos still required the standalone chefstyle gem, which no longer loads — cookstyle could not run at all before this.
  • CI: unit tests on 3.1, 3.2, 3.3, 3.4, 4.0; cookstyle --chefstyle on 3.1.
  • Bundler: added the cookstyle group where missing, so bundle exec cookstyle resolves in CI.
  • Cookstyle: applied cookstyle --chefstyle -a autocorrections; cookstyle --chefstyle is now clean.
  • Dead linters removed where present (cane, tailor, finstyle, standalone chefstyle). These are unmaintained and fail on modern Ruby (cane calls File.exists?, removed in Ruby 4.0; tailor needs ostruct, no longer a default gem). Cookstyle supersedes them.

Comment/config changes plus mechanical style autocorrections; no intentional behavior changes.

tas50 and others added 7 commits August 22, 2026 12:21
- 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) <noreply@anthropic.com>
Signed-off-by: Tim Smith <tsmith84@proton.me>
- 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 <a name="..."></a> 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) <noreply@anthropic.com>
Signed-off-by: Tim Smith <tsmith84@proton.me>
- 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) <noreply@anthropic.com>
Signed-off-by: Tim Smith <tsmith84@proton.me>
- Remove countloc and the stats/loc rake tasks it backed; the gem is
  unmaintained and the tasks only printed line counts
- Remove the remaining cane and tailor dependencies (cane calls File.exists?,
  removed in Ruby 4.0; tailor needs ostruct, no longer a default gem)
- busser: drop the aruba `unescape` helper, removed in aruba 1.x, so the
  cucumber steps run again
- busser-cucumber: unpin aruba and cucumber and move to the aruba 2.x config API
- Give kitchen-cloudstack and kitchen-opennebula a test task so `rake test`
  resolves

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Tim Smith <tsmith84@proton.me>
- Declare rake in the Gemfile's :test group. Gemspec development dependencies
  land in bundler's :development group, which CI excludes via
  BUNDLE_WITHOUT=development, so `bundle exec rake` failed with
  "can't find executable rake for gem rake"
- Relax dev dependency pins that require Ruby >= 3.2 (minitest 6,
  pry-byebug 3.12); bundler resolves the whole Gemfile even for a single
  group, so these broke the Ruby 3.1 matrix entry outright
- kitchen-opennebula: depend on fog-opennebula instead of the fog metagem,
  which pulls fog-ovirt -> ovirt-engine-sdk and fails to build
- guard-kitchen: read the version in the gemspec without loading the library,
  which requires guard and is unavailable while bundler evaluates the gemspec

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Tim Smith <tsmith84@proton.me>
- Use `gemspec development_group: :test`. Gemspec development dependencies
  otherwise land in bundler's :development group, which CI excludes via
  BUNDLE_WITHOUT=development, so rspec/fakefs/rake were missing at runtime
- Add base64 where cucumber 9.x needs it; it is no longer a default gem on
  Ruby 4.0
- kitchen-opennebula: fog-opennebula's latest release is 0.0.5, so ">= 0.1"
  could never resolve
- kitchen-rackspace: port the driver off Kitchen::Driver::SSHBase, removed in
  test-kitchen 4.x, and wait via the configured transport instead

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Tim Smith <tsmith84@proton.me>
AllCops/Include pinned the file list to **/*.rb, which quietly excluded the
gemspec, Gemfile and Rakefile -- cookstyle reported success while never
looking at them. Dropping the Include list restores cookstyle's own defaults,
which cover those files, and the offenses that surfaced are autocorrected here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Tim Smith <tsmith84@proton.me>
@tas50
tas50 force-pushed the ruby-3.1-ci-modernization branch from 9b3b7c0 to 4a84c24 Compare August 22, 2026 19:29
@tas50
tas50 merged commit 0ea4f63 into main Aug 22, 2026
8 checks passed
@tas50
tas50 deleted the ruby-3.1-ci-modernization branch August 22, 2026 19:34
tas50 added a commit that referenced this pull request Aug 22, 2026
CONTRIBUTING.md still described the repository as it was before the
recent modernisation, and every specific in its tooling section had
become false: it told contributors there were no unit tests, that the
Rakefile depended on cane, tailor and countloc and would probably fail,
that CI tested Ruby 2.5 to 3.0 against a master branch, and that the most
valuable contribution would be porting the driver off SSHBase. All of
that has since changed.

It now describes the actual test suite and how it is organised, the real
CI matrix, and the release process. The "most valuable contribution"
section now asks for what the project genuinely needs: validation against
a real CloudStack deployment, particularly the Windows and WinRM path,
which is covered by stubbed tests but has never been run against real
hardware.

Also removes two pieces of dead configuration and tightens the gemspec:

- .tailor configured a linter that was removed in #44.
- .github/dependabot.yml duplicated Renovate, which is also enabled here
  and is what kitchen-ec2 settled on, so both bots were opening
  dependency pull requests.
- The gemspec shipped everything git tracked, so the built gem carried
  the spec suite and the CI and linter dotfiles. It now ships the licence
  and lib, matching kitchen-ec2, which takes the packaged gem from 29
  files to 7.
- Adds metadata links so the RubyGems page points at the changelog, the
  source and the issue tracker.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tas50 tas50 mentioned this pull request Aug 22, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant