Skip to content

Exclude link-checker config from the packaged gem (STF-557)#233

Merged
horgh merged 1 commit into
mainfrom
greg/stf-557-gem-packaging
Jun 5, 2026
Merged

Exclude link-checker config from the packaged gem (STF-557)#233
horgh merged 1 commit into
mainfrom
greg/stf-557-gem-packaging

Conversation

@oschwald

@oschwald oschwald commented Jun 5, 2026

Copy link
Copy Markdown
Member

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, so lychee.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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread minfraud.gemspec Outdated
Comment on lines +27 to +28
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'])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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']
  )

@oschwald oschwald force-pushed the greg/stf-557-gem-packaging branch from 83f084f to 9e2f445 Compare June 5, 2026 22:38
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>
@oschwald oschwald force-pushed the greg/stf-557-gem-packaging branch from 9e2f445 to 985fea8 Compare June 5, 2026 22:42
@horgh horgh merged commit 9bf6e71 into main Jun 5, 2026
38 checks passed
@horgh horgh deleted the greg/stf-557-gem-packaging branch June 5, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants