From f4598e4a01d66677dbd54c9b1d8fd6784daf7271 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 27 May 2015 18:20:50 +0200 Subject: Update the generated Rakefile to a more useful version. This makes the clean/compile/spec cycle with extension gems much better. Closes #3665 --- lib/bundler/cli/gem.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/bundler/cli/gem.rb') 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 -- cgit v1.2.3