require 'rubygems' require 'rake' begin require 'rubygems/tasks' Gem::Tasks.new rescue LoadError => e warn e.message warn "Run `gem install rubygems-tasks` to install 'rubygems/tasks'." end begin require 'rspec/core/rake_task' RSpec::Core::RakeTask.new rescue LoadError => e task :spec do abort "Please run `gem install rspec` to install RSpec." end end task :test => :spec task :default => :spec begin require 'yard' YARD::Rake::YardocTask.new rescue LoadError => e task :yard do abort "Please run `gem install yard` to install YARD." end end