diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b4bb41..9f7604e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Development +* Exclude spec files from the gem package to lighten the package size. + ## v3.0.0 * Check whether rspec-rails is used in the target project via `Gemfile.lock` when `-s/--skip-dynamic-analysis` option is specified. ([#88](https://github.com/yujinakayama/transpec/issues/88)) diff --git a/transpec.gemspec b/transpec.gemspec index 61e36a4..e7c568d 100644 --- a/transpec.gemspec +++ b/transpec.gemspec @@ -15,9 +15,8 @@ Gem::Specification.new do |spec| spec.homepage = 'http://yujinakayama.me/transpec/' spec.license = 'MIT' - spec.files = `git ls-files`.split($/) + spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } - spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib'] spec.required_ruby_version = '>= 1.9.3'