Reduce gem size by excluding test files

This commit is contained in:
Yuri Zubov 2025-06-27 15:50:26 +03:00
parent 1b95bcba1a
commit a015c72858
2 changed files with 6 additions and 1 deletions

View file

@ -1,6 +1,7 @@
## next (unreleased)
- Implement `Cookie#to_h`. (#55) @luke-hill @flavorjones
- Reduce gem size by excluding test files
## 1.0.8 (2024-12-05)

View file

@ -18,7 +18,11 @@ Gem::Specification.new do |gem|
gem.homepage = "https://github.com/sparklemotion/http-cookie"
gem.license = "MIT"
gem.files = `git ls-files`.split($/)
gem.files = `git ls-files lib`.split($/) + [
'CHANGELOG.md',
'LICENSE.txt',
'README.md',
]
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]