Rakefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. require 'rubygems'
  2. require 'rake'
  3. begin
  4. require 'jeweler'
  5. Jeweler::Tasks.new do |gem|
  6. gem.name = "meta_search"
  7. gem.summary = %Q{Object-based searching (and more) for simply creating search forms.}
  8. gem.description = %Q{
  9. Allows simple search forms to be created against an AR3 model
  10. and its associations, has useful view helpers for sort links
  11. and multiparameter fields as well.
  12. }
  13. gem.email = "ernie@metautonomo.us"
  14. gem.homepage = "http://metautonomo.us/projects/metasearch/"
  15. gem.authors = ["Ernie Miller"]
  16. gem.post_install_message = <<END
  17. *** Thanks for installing MetaSearch! ***
  18. Be sure to check out http://metautonomo.us/projects/metasearch/ for a
  19. walkthrough of MetaSearch's features, and click the donate button if
  20. you're feeling especially appreciative. It'd help me justify this
  21. "open source" stuff to my lovely wife. :)
  22. END
  23. end
  24. Jeweler::RubygemsDotOrgTasks.new
  25. rescue LoadError
  26. puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
  27. end
  28. require 'rake/testtask'
  29. Rake::TestTask.new(:test) do |test|
  30. test.libs << 'lib' << 'test'
  31. test.libs << 'vendor/rails/activerecord/lib'
  32. test.libs << 'vendor/rails/activesupport/lib'
  33. test.libs << 'vendor/rails/actionpack/lib'
  34. test.libs << 'vendor/arel/lib'
  35. test.pattern = 'test/**/test_*.rb'
  36. test.verbose = true
  37. end
  38. begin
  39. require 'rcov/rcovtask'
  40. Rcov::RcovTask.new do |test|
  41. test.libs << 'test'
  42. test.pattern = 'test/**/test_*.rb'
  43. test.verbose = true
  44. end
  45. rescue LoadError
  46. task :rcov do
  47. abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
  48. end
  49. end
  50. # Don't check dependencies on test, we're using vendored libraries
  51. # task :test => :check_dependencies
  52. task :default => :test
  53. require 'rdoc/task'
  54. Rake::RDocTask.new do |rdoc|
  55. version = File.exist?('VERSION') ? File.read('VERSION') : ""
  56. rdoc.rdoc_dir = 'rdoc'
  57. rdoc.title = "meta_search #{version}"
  58. rdoc.rdoc_files.include('README*')
  59. rdoc.rdoc_files.include('lib/**/*.rb')
  60. end