Skip to content

Commit

Permalink
add rakefile to scaffold for basic test running
Browse files Browse the repository at this point in the history
  • Loading branch information
Elise Huard authored and Sven Fuchs committed Jul 10, 2010
1 parent 480b08c commit ad4e8e3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion lib/rubygems/commands/bootstrap_command.rb
Expand Up @@ -33,6 +33,7 @@ def write_scaffold
`mkdir lib test`
`touch README`
write_version
write_rakefile
end

def write_version
Expand All @@ -41,6 +42,22 @@ def write_version
version.write
end

def write_rakefile
rakefile = <<RAKEFILE
require 'rake'
require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end
task :default => :test
RAKEFILE
File.open('Rakefile', 'w').write(rakefile)
end

def create_repo
options = { :login => github_user, :token => github_token, :name => gem_name }
options = options.map { |name, value| "-F '#{name}=#{value}'" }.join(' ')
Expand All @@ -63,4 +80,4 @@ def create_repo
say 'Pushing to Github'
`git push origin master`
end
end
end

0 comments on commit ad4e8e3

Please sign in to comment.