summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/gem.rb
diff options
context:
space:
mode:
authorColby Swandale <colby@taplaboratories.com>2017-03-19 18:39:07 +1100
committerColby Swandale <colby@taplaboratories.com>2017-03-19 18:39:07 +1100
commitfd8df5b1a8ec0255c3de7f3ea7a50bd16ac58aea (patch)
tree01122a9ee8569f0ace4e126c8658b4155bb1ad3e /lib/bundler/cli/gem.rb
parentd553b1802c12f78245a0929835e9f003c13050e7 (diff)
downloadbundler-fd8df5b1a8ec0255c3de7f3ea7a50bd16ac58aea.tar.gz
dont create .gitignore as well if git is not installed in the gem command
Diffstat (limited to 'lib/bundler/cli/gem.rb')
-rw-r--r--lib/bundler/cli/gem.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 5371c6d82f..7fa005289e 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -54,7 +54,6 @@ module Bundler
templates = {
"Gemfile.tt" => "Gemfile",
- "gitignore.tt" => ".gitignore",
"lib/newgem.rb.tt" => "lib/#{namespaced_path}.rb",
"lib/newgem/version.rb.tt" => "lib/#{namespaced_path}/version.rb",
"newgem.gemspec.tt" => "#{name}.gemspec",
@@ -69,6 +68,8 @@ module Bundler
bin/setup
)
+ templates.merge!("gitignore.tt" => ".gitignore") if Bundler.git_present?
+
if test_framework = ask_and_set_test_framework
config[:test] = test_framework
config[:test_framework_version] = TEST_FRAMEWORK_VERSIONS[test_framework]