public
Description: Fu-fu: The Profanity Filter for Rails.
Homepage: http://adambair.lighthouseapp.com/projects/12000-fu-fu/overview
Clone URL: git://github.com/adambair/fu-fu.git
adambair (author)
Sat Jun 13 19:51:33 -0700 2009
commit  01d04bed4e6d89a491e3d231754ebb6006efab89
tree    ed471feb3563f4996edf7f67257092dbb6f16ab9
parent  a60c009c782a66be6ad531b9177b6a9e6aa5ccb3
fu-fu / Rakefile
f791aef1 » adambair 2008-06-01 Adding the rakefile back in... 1 require 'rake'
2 require 'rake/testtask'
3 require 'rake/rdoctask'
4
5 desc 'Default: run unit tests.'
6 task :default => :test
7
8 desc 'Test the Profanity Filter plugin.'
9 Rake::TestTask.new(:test) do |t|
10 t.libs << 'lib'
11 t.pattern = 'test/**/*_test.rb'
12 t.verbose = true
13 end
14
15 desc 'Generate documentation for the happy plugin.'
16 Rake::RDocTask.new(:rdoc) do |rdoc|
17 rdoc.rdoc_dir = 'rdoc'
18 rdoc.title = 'Profanity Filter'
19 rdoc.options << '--line-numbers' << '--inline-source'
20 rdoc.rdoc_files.include('README')
21 rdoc.rdoc_files.include('lib/**/*.rb')
22 end
23
24 desc 'Measures test coverage using rcov'
25 task :rcov do
26 rm_f "coverage"
27 rm_f "coverage.data"
28 rcov = "rcov --rails --aggregate coverage.data --text-summary -Ilib"
29 system("#{rcov} --html #{Dir.glob('test/**/*_test.rb').join(' ')}")
30 system("open coverage/index.html") if PLATFORM['darwin']
31 end