Rakefile in nanotest-0.9 vs Rakefile in nanotest-0.9.1

- old
+ new

@@ -1,25 +1,20 @@ -begin - require 'yard' -rescue LoadError, RuntimeError -end - # -------------------------------------------------- # Gem # -------------------------------------------------- def gemspec @gemspec ||= Gem::Specification.new do |s| s.name = "nanotest" - s.summary = "Out of my way, test framework!" - s.description = "Most. Miminal. Test Framework. Ever! Perfect for DIY lovers." + s.summary = "When all you need is #assert" + s.description = "Extremely mynymal test framework. Perfect for DIY lovers. NanoTest provides the bare mynymum needed; for everything else, there's ruby." s.author = "Martin Aumont" s.email = "mynyml@gmail.com" s.homepage = "http://github.com/mynyml/nanotest" s.rubyforge_project = "nanotest" s.has_rdoc = false s.require_path = "lib" - s.version = "0.9" + s.version = "0.9.1" s.files = File.read("Manifest").strip.split("\n") s.add_development_dependency 'minitest' end end @@ -42,20 +37,34 @@ namespace(:test) do desc "Run all tests" task(:all) do tests = Dir['test/**/test_*.rb'] - ['test/test_helper.rb'] - cmd = "ruby -rubygems -Ilib -e'%w( #{tests.join(' ')} ).each {|file| require file }'" + cmd = "ruby -rubygems -I.:lib -e'%w( #{tests.join(' ')} ).each {|file| require file }'" puts(cmd) if ENV['VERBOSE'] system(cmd) end + + desc "Run all tests on multiple ruby versions (requires rvm)" + task(:portability) do + versions = %w( 1.8.6 1.8.7 1.9 1.9.2 jruby jruby\ -v\ 1.4.0RC1 ) + versions.each do |version| + system <<-BASH + bash -c 'source ~/.rvm/scripts/rvm; + rvm use #{version}; + echo "--------- #{version} ----------"; + rake -s test:all' + BASH + end + end end # -------------------------------------------------- # Docs # -------------------------------------------------- -if defined? YARD - YARD::Rake::YardocTask.new do |t| - t.files = %w( lib/**/*.rb ) - t.options = %w( -o doc/yard --readme README.rdoc --files LICENSE ) - end +desc "Generate YARD Documentation" +task :yardoc do + require 'yard' + files = %w( lib/**/*.rb ) + options = %w( -o doc/yard --readme README.rdoc --files LICENSE ) + YARD::CLI::Yardoc.run *(options + files) end