From 912245dc116ee518d708e56f09c74b724b13ac09 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Wed, 25 Feb 2026 19:05:02 +0900 Subject: [PATCH] Reduce release package size The current release package contains files that are not required at runtime, such as `.github`, `docs`, and `examples`. ```ruby Dir.chdir(File.expand_path("..", __FILE__)) do %x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end => [".gitattributes", ".github/dependabot.yml", ".github/workflows/ci.yml", ".github/workflows/release.yml", ".gitignore", ".rubocop.yml", "AGENTS.md", "CHANGELOG.md", "CODE_OF_CONDUCT.md", "Gemfile", "LICENSE", (snip) ``` This PR removes unnecessary files where possible to reduce the size of the release package. --- mcp.gemspec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mcp.gemspec b/mcp.gemspec index b1f7667..95627a6 100644 --- a/mcp.gemspec +++ b/mcp.gemspec @@ -23,9 +23,7 @@ Gem::Specification.new do |spec| spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues" spec.metadata["documentation_uri"] = "https://rubydoc.info/gems/mcp" - spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do - %x(git ls-files -z).split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - end + spec.files = Dir["LICENSE", "README.md", "lib/**/*"] spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }