aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/cli/gem.rb
diff options
context:
space:
mode:
authorAndre Medeiros <me@andremedeiros.info>2015-05-27 18:20:50 +0200
committerAndre Medeiros <me@andremedeiros.info>2015-05-27 18:20:50 +0200
commitf4598e4a01d66677dbd54c9b1d8fd6784daf7271 (patch)
tree1c86cac23192569cee40570f2bc013a338ff18b4 /lib/bundler/cli/gem.rb
parente8c962ef2a3215cdc6fd411b6724f091a16793d6 (diff)
downloadbundler-f4598e4a01d66677dbd54c9b1d8fd6784daf7271.tar.gz
Update the generated Rakefile to a more useful version.
This makes the clean/compile/spec cycle with extension gems much better. Closes #3665
Diffstat (limited to 'lib/bundler/cli/gem.rb')
-rw-r--r--lib/bundler/cli/gem.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 231f3b3d..cbbaa277 100644
--- a/lib/bundler/cli/gem.rb
+++ b/lib/bundler/cli/gem.rb
@@ -22,6 +22,7 @@ module Bundler
namespaced_path = name.tr('-', '/')
constant_name = name.gsub(/-[_-]*(?![_-]|$)/){ '::' }.gsub(/([_-]+|(::)|^)(.|$)/){ $2.to_s + $3.upcase }
constant_array = constant_name.split('::')
+ test_task = options[:test] == 'minitest' ? 'test' : 'spec'
git_user_name = `git config user.name`.chomp
git_user_email = `git config user.email`.chomp
@@ -36,6 +37,7 @@ module Bundler
:author => git_user_name.empty? ? "TODO: Write your name" : git_user_name,
:email => git_user_email.empty? ? "TODO: Write your email address" : git_user_email,
:test => options[:test],
+ :test_task => test_task,
:ext => options[:ext],
:bin => options[:bin],
:bundler_version => bundler_dependency_version