public
Description: BrainBuster - a logic captcha for Rails
Homepage: http://opensource.thinkrelevance.com/wiki/BrainBuster
Clone URL: git://github.com/rsanheim/brain_buster.git
rsanheim (author)
Mon Jun 29 13:54:03 -0700 2009
commit  5854ddbef46e75f2f1ae75746687c4fb997364bf
tree    548a040a3c2a7fcc90338e3da14fb3ad5f2a4e26
parent  e910b2addbbafe0a2b473c2272ecf3ec5412ea4e
brain_buster / Rakefile
100644 42 lines (35 sloc) 1.255 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
 
begin
  gem "spicycode-micronaut"
  require 'micronaut/rake_task'
  
  Micronaut::RakeTask.new(:examples) do |examples|
    examples.pattern = 'examples/**/*_example.rb'
    examples.ruby_opts << '-Ilib -Iexamples'
  end
 
  Micronaut::RakeTask.new(:rcov) do |examples|
    examples.pattern = 'examples/**/*_example.rb'
    examples.rcov_opts = %[-Ilib -Iexamples --exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage]
    examples.rcov = true
  end
 
  task :default => 'rcov'
rescue LoadError
  puts "Micronaut not available to run tests. Install it with: sudo gem install spicycode-micronaut -s http://gems.github.com"
end
 
desc 'Generate documentation for the brain_buster plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = 'BrainBuster'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
 
begin
  gem "ianwhite-garlic"
  require 'garlic/tasks'
rescue LoadError => e
  puts "Garlic not available for testing against multiple versions of Rails. To install: "
  puts "gem install ianwhite-garlic --source=http://gems.github.com"
  exit(1)
end