From 2f84b915d92f50226efe00943b2daccc9ec150a2 Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Fri, 20 Jan 2012 19:28:00 +0900 Subject: [PATCH] Reduce invocation of `git ls-files`. This also removes shell brace expasion which is a ksh/bash extension that does not work with POSIX sh. --- lib/bundler/templates/newgem/newgem.gemspec.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt index 17b3602a845..e04eb6e985e 100644 --- a/lib/bundler/templates/newgem/newgem.gemspec.tt +++ b/lib/bundler/templates/newgem/newgem.gemspec.tt @@ -8,9 +8,9 @@ Gem::Specification.new do |gem| gem.summary = %q{TODO: Write a gem summary} gem.homepage = "" - gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } gem.files = `git ls-files`.split("\n") - gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.name = <%=config[:name].inspect%> gem.require_paths = ["lib"] gem.version = <%=config[:constant_name]%>::VERSION