require 'rake' require 'rake/gempackagetask' require 'rspec/core/rake_task' desc 'Run all specs' RSpec::Core::RakeTask.new(:spec) do |t| t.rspec_opts = %w[--color] end namespace :rcov do RSpec::Core::RakeTask.new :spec do |t| t.rcov = true t.rcov_opts = %w[-Ilib -Ispec --exclude "gems/*"] t.rcov_opts << %w[--no-html --text-report] end end gemspec = eval(File.read(Dir["*.gemspec"].first)) desc "Validate the gemspec" task :gemspec do gemspec.validate end Rake::GemPackageTask.new gemspec do |pkg| pkg.need_tar = true end