From efa4bd73bfa9f268c219c5e43adc5c472d4081ed Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Wed, 8 Oct 2014 15:36:39 +0200 Subject: [PATCH] Don't package test files with gem --- bundler.gemspec | 3 +-- lib/bundler/templates/newgem/newgem.gemspec.tt | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bundler.gemspec b/bundler.gemspec index bd4d66bb6a9..f94fc061f7d 100644 --- a/bundler.gemspec +++ b/bundler.gemspec @@ -20,12 +20,11 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'ronn', '~> 0.7.3' spec.add_development_dependency 'rspec', '~> 3.0' - spec.files = `git ls-files -z`.split("\x0") + spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } # we don't check in man pages, but we need to ship them because # we use them to generate the long-form help for each command. spec.files += Dir.glob('lib/bundler/man/**/*') - spec.test_files = spec.files.grep(%r{^spec/}) spec.executables = %w(bundle bundler) spec.require_paths = ["lib"] end diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt index 342f4fe4f22..7ac1ef08aa2 100644 --- a/lib/bundler/templates/newgem/newgem.gemspec.tt +++ b/lib/bundler/templates/newgem/newgem.gemspec.tt @@ -22,9 +22,8 @@ Gem::Specification.new do |spec| spec.homepage = "TODO: Put your gem's website or public repo URL here." spec.license = "MIT" - spec.files = `git ls-files -z`.split("\x0") + 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.add_development_dependency "bundler", "~> <%= Bundler::VERSION.split(".")[0..1].join(".") %>"