Exclude link-checker config from the packaged gem (STF-557)#233
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the minfraud.gemspec file to exclude configuration and lock files (.gitignore, lychee.toml, mise.lock, mise.toml) from the packaged gem files. The review feedback points out that excluding .gitignore is redundant because Dir['**/*'] does not match hidden files by default. Additionally, it suggests filtering the file list to ensure only files (and not directories) are included in spec.files.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| spec.files = Dir['**/*'].difference(Dir['.gitignore', 'lychee.toml', 'mise.lock', 'mise.toml', 'CLAUDE.md', 'CODE_OF_CONDUCT.md', | ||
| 'dev-bin/**/*', 'Gemfile*', 'Rakefile', 'README.dev.md', 'spec/**/*', '*.gemspec']) |
There was a problem hiding this comment.
In Ruby, Dir['**/*'] does not match hidden files (dotfiles) like .gitignore by default because the File::FNM_DOTMATCH flag is not specified. Therefore, .gitignore is already excluded from the file list, making its inclusion in the .difference array redundant.
Additionally, Dir['**/*'] returns both files and directories. It is a good practice to filter out directories using File.file? to ensure only files are assigned to spec.files.
spec.files = Dir['**/*'].select { |f| File.file?(f) }.difference(
Dir['lychee.toml', 'mise.lock', 'mise.toml', 'CLAUDE.md', 'CODE_OF_CONDUCT.md',
'dev-bin/**/*', 'Gemfile*', 'Rakefile', 'README.dev.md', 'spec/**/*', '*.gemspec']
)
83f084f to
9e2f445
Compare
The gemspec packages Dir['**/*'] minus an exclusion list, which didn't cover the link-checking config added in this PR, so lychee.toml/mise.toml/mise.lock (and .gitignore) would ship in the published gem. Add them to the exclusion. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9e2f445 to
985fea8
Compare
Follow-up to the merged STF-557 PR: the gemspec packages
Dir['**/*']minus an exclusion list that didn't cover the link-checking config added in that PR, solychee.toml/mise.toml/mise.lock(and.gitignore) were shipping in the published gem. Add them to the exclusion list.This addresses @horgh's review note; the original STF-557 PR had already merged, so this is a separate PR.
Part of STF-557.
🤖 Generated with Claude Code