Rakefile in babynames-0.1.2 vs Rakefile in babynames-0.1.3

- old
+ new

@@ -1,68 +1,28 @@ # encoding: utf-8 require 'rubygems' require 'bundler' +require "bundler/gem_tasks" + begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end -require 'rake' -require 'jeweler' -Jeweler::Tasks.new do |gem| - # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options - gem.name = "babynames" - gem.homepage = "http://github.com/jordandcarter/babynames" - gem.license = "MIT" - gem.summary = "Quickly and easily get random names for things like test" - gem.description = "Easily name your baby! Or if you're a dev, make some tests with names better than test1, test2, testy. - - This gem gives you the ability to randomly create plausable usernames, names, emails without any hassle. Useful for seeding development data." - gem.email = "jordan.d.carter@gmail.com" - gem.authors = ["Jordan Carter"] - # dependencies defined in Gemfile -end -Jeweler::RubygemsDotOrgTasks.new - -require 'rake/testtask' -Rake::TestTask.new(:test) do |test| - test.libs << 'lib' << 'test' - test.pattern = 'test/**/test_*.rb' - test.verbose = true -end - -require 'rcov/rcovtask' -Rcov::RcovTask.new do |test| - test.libs << 'test' - test.pattern = 'test/**/test_*.rb' - test.verbose = true - test.rcov_opts << '--exclude "gems/*"' -end - task :default => :test_rubies -desc "Runs tests on Ruby 1.8.7 and 1.9.2" +desc "Runs tests on Ruby 1.8.7, 1.9.2 and 1.9.3" task :test_rubies do - versions = %w( 1.8.7 1.9.2) + versions = %w( 1.8.7 1.9.2 1.9.3) versions.each do |version| system <<-BASH bash -c 'source ~/.rvm/scripts/rvm; - rvm use #{version}; + rvm use #{version}@babynames; echo "-------- `ruby -v` ---------\n"; - rake -s test' + ruby -I"lib:lib:test" test/test_*.rb' BASH end -end - -require 'rake/rdoctask' -Rake::RDocTask.new do |rdoc| - version = File.exist?('VERSION') ? File.read('VERSION') : "" - - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "babynames #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') end