# 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 task :default => :test_rubies 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 1.9.3) versions.each do |version| system <<-BASH bash -c 'source ~/.rvm/scripts/rvm; rvm use #{version}@babynames; echo "-------- `ruby -v` ---------\n"; ruby -I"lib:lib:test" test/test_*.rb' BASH end end