Conversation
Library:
- Raise a clear ArgumentError when a config_context_list or
config_context_hash singular method is called without a block,
instead of NoMethodError on nil
- Match config file extensions case-insensitively, so config.YML is
parsed as YAML rather than evaluated as Ruby
- Read config files with File.read instead of IO.read, which runs a
command for a filename starting with "|" on Ruby 3.x
- Add respond_to_missing? for values set without a configurable
- Document that reading a static default stores it, so it appears in
save
- Remove the unused private to_dotted_hash method
- Fix doc comments: writes_with() -> config_attr_writer(), the save
example's class syntax, the stale hash_dup removal note, and typos
Specs:
- Replace the deprecated implicit block expectation syntax
(expect(lambda { ... })) with expect { ... }
- Stub File.read, and drop stubs of File.exists? (removed in Ruby 3.2)
and File.readable?, which from_file never calls
Repo:
- Make the style rake task fail when cookstyle is not installed
- Remove an unused dictionary download and nonexistent bundler groups
from the lint workflow
- Restore the bug report template's emoji
- Point CONTRIBUTING.md at chef/chef's main branch
- Stop ignoring the tracked .rspec file and drop a duplicate .yardoc
entry in .gitignore
- Fix typos in the Rakefile and Expeditor scripts
Signed-off-by: Tim Smith <tsmith84@proton.me>
tas50
force-pushed
the
fix-low-severity-issues
branch
from
September 28, 2026 02:03
86ab4cd to
22a8f2e
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.
Summary
A batch of small fixes found while reviewing the project.
Library
applewith no block raisedNoMethodError: undefined method 'arity' for nil. It now raisesArgumentError: apple requires a block to configure the new apple.from_file("config.YML")evaluated the YAML as Ruby. Extensions are now matched case-insensitively.File.readinstead ofIO.read— on Ruby 3.x,IO.readruns a shell command when the filename starts with|(for example"|cmd #.yml"). Ruby 4.0 removed this, but the gem still supports 3.1.respond_to_missing?—respond_to?(:foo)now returns true for a value set without a configurable, matching whatmethod_missinghandles. It stays false for keys that were never set, so duck-typing checks such asto_aryare unaffected.saveeven though it still holds its default. Thesavedoc now says so.to_dotted_hash, replacedwrites_with()withconfig_attr_writer()in the strict mode docs, fixed thesaveexample (Mixlib::Configis a module youextend, not a class to inherit from), reworded the stale "remove this in 3.0" note onhash_dup, and fixed a truncated sentence and a typo.Specs
expect(lambda { ... })form withexpect { ... }. The suite printed 15 deprecation warnings before this change and prints none now.File.read. Removed stubs ofFile.exists?(removed in Ruby 3.2) andFile.readable?, whichfrom_filenever calls.Repo
rake stylenow fails when cookstyle is missing. It used to print a message and exit 0.lint.yml: removed a dictionary download nothing used (cspell loads the dictionary from its URL) and aBUNDLE_WITHOUTnaming groups that don't exist in this Gemfile.CONTRIBUTING.mdnow links chef/chef'smainbranch..gitignoreno longer ignores the tracked.rspecfile, and a duplicate.yardocentry is gone.Rakefileand the Expeditor scripts.vkeyandyardoptsto the cspell word list. Spellcheck only checks changed files, and both words were already present in files this PR touches.Merge notes
This PR edits some of the same lines as #140 (the list/hash accessor methods) and #142 (
from_yaml/from_json). Whichever merges second will need a small rebase.Tests
Added specs for the no-block errors, the uppercase extension, and
respond_to?. The updatedFile.readstubs failed againstIO.read. The full suite passes (161 examples) with no deprecation warnings, and cookstyle and cspell are clean.