Skip to content

Fix metadata.rb syntax error and add missing test coverage - #1458

Closed
bronachfalls wants to merge 3 commits into
mainfrom
fix/metadata-syntax-and-test-coverage
Closed

Fix metadata.rb syntax error and add missing test coverage#1458
bronachfalls wants to merge 3 commits into
mainfrom
fix/metadata-syntax-and-test-coverage

Conversation

@bronachfalls

Copy link
Copy Markdown
  • Fix syntax error introduced in Check requirement also for Openvox #1453: include? called without parentheses caused a SyntaxError, silently breaking all tests that depend on PDK::Module::Metadata (release, update, convert, cli/release)
  • Update stale regex in metadata_spec to match the updated error message that now includes "openvox" alongside "puppet"
  • Add spec files for previously untested classes: PDK::Generate::Fact, PDK::Generate::Function, PDK::Config::Validator

Overall line coverage: 81.73% → 91.35%

Summary

Provide a detailed description of all the changes present in this pull request.

Additional Context

Add any additional context about the problem here.

  • Root cause and the steps to reproduce. (If applicable)
  • Thought process behind the implementation.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified.

- Fix syntax error introduced in #1453: `include?` called without
  parentheses caused a SyntaxError, silently breaking all tests that
  depend on PDK::Module::Metadata (release, update, convert, cli/release)
- Update stale regex in metadata_spec to match the updated error message
  that now includes "openvox" alongside "puppet"
- Add spec files for previously untested classes:
  PDK::Generate::Fact, PDK::Generate::Function, PDK::Config::Validator

Overall line coverage: 81.73% → 91.35%

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bronachfalls
bronachfalls requested a review from a team as a code owner September 3, 2026 15:40
bronachfalls and others added 2 commits September 3, 2026 16:43
Replace string concatenation with interpolation in fact_spec and
function_spec to satisfy the Style/StringConcatenation cop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…json'

- Extract ['puppet', 'openvox'] to PUPPET_REQUIREMENT_NAMES constant to
  satisfy Performance/CollectionLiteralInLoop cop
- Add missing `require 'json'` to metadata_spec.rb, exposed by the
  SyntaxError fix (from_file tests use .to_json without requiring json)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bronachfalls
bronachfalls deleted the fix/metadata-syntax-and-test-coverage branch September 4, 2026 12:32
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