Rakefile 752 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Rakefile for managing asciidoc-bib project
  2. #
  3. require 'rake/testtask'
  4. Rake::TestTask.new do |t|
  5. t.libs.push "lib"
  6. t.libs.push "test"
  7. t.test_files = FileList['test/*_test.rb']
  8. t.verbose = true
  9. end
  10. desc 'Generates a coverage report'
  11. task :coverage do
  12. `rm -rf coverage`
  13. ENV['COVERAGE'] = 'true'
  14. Rake::Task['test'].execute
  15. end
  16. desc 'run lib code on sample'
  17. task :samples do
  18. Dir.chdir("samples") do
  19. sh "ruby -I../lib ../bin/asciidoc-bib sample-1.txt"
  20. end
  21. end
  22. directory 'release'
  23. desc 'build gem: keeps generated gems in release/'
  24. task :build_gem => 'release' do
  25. sh "gem build asciidoc-bib.gemspec"
  26. sh "mv *.gem release"
  27. end
  28. desc 'build documentation'
  29. task :doc do
  30. sh "rdoc lib LICENSE.txt README.rdoc -m README.rdoc"
  31. end