You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Rakefile 968B

1234567891011121314151617181920212223242526272829303132
  1. require 'spec/rake/spectask'
  2. require 'rake/rdoctask'
  3. desc 'Default: run all specs'
  4. task :default => :spec
  5. desc 'Run all application-specific specs'
  6. Spec::Rake::SpecTask.new(:spec) do |t|
  7. # t.rcov = true
  8. end
  9. desc "Report code statistics (KLOCs, etc) from the application"
  10. task :stats do
  11. RAILS_ROOT = File.dirname(__FILE__)
  12. STATS_DIRECTORIES = [
  13. %w(Libraries lib/),
  14. %w(Specs spec/),
  15. ].collect { |name, dir| [ name, "#{RAILS_ROOT}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
  16. require 'code_statistics'
  17. CodeStatistics.new(*STATS_DIRECTORIES).to_s
  18. end
  19. namespace :doc do
  20. desc 'Generate documentation for the assert_request plugin.'
  21. Rake::RDocTask.new(:plugin) do |rdoc|
  22. rdoc.rdoc_dir = 'rdoc'
  23. rdoc.title = 'Gravatar Rails Plugin'
  24. rdoc.options << '--line-numbers' << '--inline-source' << '--accessor' << 'cattr_accessor=rw'
  25. rdoc.rdoc_files.include('README')
  26. rdoc.rdoc_files.include('lib/**/*.rb')
  27. end
  28. end