To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 92 / 92555b4b3f9edf61711d008c948eed416657e1ea.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (968 Bytes)
| 1 |
require 'spec/rake/spectask' |
|---|---|
| 2 |
require 'rake/rdoctask' |
| 3 |
|
| 4 |
desc 'Default: run all specs' |
| 5 |
task :default => :spec |
| 6 |
|
| 7 |
desc 'Run all application-specific specs' |
| 8 |
Spec::Rake::SpecTask.new(:spec) do |t| |
| 9 |
# t.rcov = true |
| 10 |
end |
| 11 |
|
| 12 |
desc "Report code statistics (KLOCs, etc) from the application" |
| 13 |
task :stats do |
| 14 |
RAILS_ROOT = File.dirname(__FILE__) |
| 15 |
STATS_DIRECTORIES = [ |
| 16 |
%w(Libraries lib/), |
| 17 |
%w(Specs spec/), |
| 18 |
].collect { |name, dir| [ name, "#{RAILS_ROOT}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
|
| 19 |
require 'code_statistics' |
| 20 |
CodeStatistics.new(*STATS_DIRECTORIES).to_s |
| 21 |
end |
| 22 |
|
| 23 |
namespace :doc do |
| 24 |
desc 'Generate documentation for the assert_request plugin.' |
| 25 |
Rake::RDocTask.new(:plugin) do |rdoc| |
| 26 |
rdoc.rdoc_dir = 'rdoc' |
| 27 |
rdoc.title = 'Gravatar Rails Plugin' |
| 28 |
rdoc.options << '--line-numbers' << '--inline-source' << '--accessor' << 'cattr_accessor=rw' |
| 29 |
rdoc.rdoc_files.include('README')
|
| 30 |
rdoc.rdoc_files.include('lib/**/*.rb')
|
| 31 |
end |
| 32 |
end |