summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@idaemons.org>2012-01-20 19:28:00 +0900
committerAndre Arko <andre@arko.net>2012-03-07 23:28:34 -0800
commit49b5c6a5c0a69ab6289db723ab7fefbb7db00014 (patch)
treeac9bdf1217fd402b15e51d78c3efc4e7caae1c17
parent504ff2a323967f2af617786f439431c787d0e49b (diff)
downloadbundler-49b5c6a5c0a69ab6289db723ab7fefbb7db00014.tar.gz
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.
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt
index 17b3602a84..e04eb6e985 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