Repository navigation
Updating cookstyle and Ruby support - #444
Open
johnmccrae wants to merge 10 commits into
Open
johnmccrae wants to merge 10 commits into
johnmccrae wants to merge 10 commits into
Conversation
Signed-off-by: John McCrae <john.mccrae@progress.com>
johnmccrae
added a commit
that referenced
this pull request
Sep 30, 2026
Address CodeQL findings on PR #444 flagging unescaped '.' before 'chef.io' in test regexes, which could unintentionally match unexpected hostnames. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address CodeQL findings on PR #444 flagging unescaped '.' before 'chef.io' in test regexes, which could unintentionally match unexpected hostnames. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCrae <john.mccrae@progress.com>
johnmccrae
force-pushed
the
jfm/cookstyle_update
branch
from
September 30, 2026 19:41
6dc5933 to
9c279eb
Compare
The Gemfile and Rakefile were updated to use cookstyle (with cookstyle's --chefstyle flag) in place of the chefstyle gem, but .github/workflows/lint.yml still invoked 'bundle exec chefstyle', which no longer exists as a dependency, causing CI failures (bundler: command not found: chefstyle). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCrae <john.mccrae@progress.com>
tpowell-progress
previously approved these changes
Sep 30, 2026
PR #444 raised the minimum supported Ruby to 3.1, which dropped linting and test coverage for Ruby 2.7-3.0. Restore the minimum supported version to 2.7: - mixlib-install.gemspec: required_ruby_version >= 2.7 - .rubocop.yml: TargetRubyVersion 2.7 - .github/workflows/integration.yml, lint.yml: comment out (not remove) the Ruby 2.6 matrix entries, since 2.6 is still dropped, while keeping 2.7 and newer covered Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCrae <john.mccrae@progress.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Ruby 2.6 compatibility is removed contrary to the project support contract, and the style task can silently succeed without running.
Review effort: Balanced
Findings: 1
Open (7)
Preserve published Ruby 2.6 support · New Restore Ruby 2.6 CLI integration coverage · New Restore Ruby 2.6 unit-test coverage · New Keep RuboCop compatible with Ruby 2.6 · New Conditionally require Cookstyle for Ruby 2.7+ · New Fail rake style when lint dependencies are missing · New Fix comment typo · New
What changed in this PR
Updates lint tooling from Chefstyle to Cookstyle, raises the declared Ruby baseline, and applies resulting style corrections.
Changes:
- Replaces Chefstyle with Cookstyle in dependencies, Rake tasks, and CI.
- Changes the declared and tested minimum Ruby version from 2.6 to 2.7.
- Modernizes Ruby syntax and test formatting without intended runtime behavior changes.
| File | Description |
|---|---|
.github/workflows/integration.yml |
Updates integration-test Ruby matrix. |
.github/workflows/lint.yml |
Uses Cookstyle and updates test matrix. |
.rubocop.yml |
Targets Ruby 2.7 and updates a cop name. |
Gemfile |
Replaces Chefstyle with Cookstyle. |
Rakefile |
Reworks the style task for Cookstyle. |
acceptance/centos_install_checksum/inspec/verify.rb |
Modernizes regular-expression literals. |
bin/mixlib-install |
Modernizes library path resolution. |
lib/mixlib/install.rb |
Avoids reloading tmpdir. |
lib/mixlib/install/backend/base.rb |
Simplifies predicates and strings. |
lib/mixlib/install/backend/package_router.rb |
Simplifies nested lookup and hash construction. |
lib/mixlib/install/generator/bourne.rb |
Adds style-required spacing. |
lib/mixlib/install/options.rb |
Converts symbol arrays to %i literals. |
lib/mixlib/install/product.rb |
Modernizes literals and conditionals. |
lib/mixlib/install/script_generator.rb |
Avoids reloading CGI. |
lib/mixlib/install/util.rb |
Adjusts indentation. |
mixlib-install.gemspec |
Raises required Ruby to 2.7. |
spec/functional/mixlib/install/cli_spec.rb |
Modernizes regex and string syntax. |
spec/spec_helper.rb |
Modernizes path resolution. |
spec/unit/mixlib/install/backend/package_router_spec.rb |
Simplifies matchers and mapping. |
spec/unit/mixlib/install/backend_spec.rb |
Uses a symbol-array literal. |
spec/unit/mixlib/install/generator_spec.rb |
Modernizes regex literals. |
spec/unit/mixlib/install/product_spec.rb |
Uses word-array literals. |
spec/unit/mixlib/install/script_generator_spec.rb |
Simplifies regex literals. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…upport' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ion coverage' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…verage' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…Ruby 2.6' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…le for Ruby 2.7+' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: John McCrae <john.mccrae@progress.com>
johnmccrae
force-pushed
the
jfm/cookstyle_update
branch
from
September 30, 2026 21:44
fec8fad to
d0ff779
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
This repo is a bit long on the tooth and has not been decently updated in a while. Here we update 2 things: 2) We removed chefstyle support and added in cookstyle support. 2) We ran "rake style" and updated syntax to match current style trends
Related Issue
Types of changes
Checklist:
Gemfile.lockhas changed, I have used--conservativeto do it and included the full output in the Description above.