railsgarden / nilify_blanks

Provides a framework for saving incoming blank values as nil in the database in instances where you'd rather use DB NULL than simply a blank string.

This URL has Read+Write access

nilify_blanks / Rakefile
100644 37 lines (30 sloc) 0.996 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
require 'rubygems'
require 'echoe'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
 
desc 'Default: run unit tests.'
task :default => :test
 
desc 'Test the nilify_blanks plugin.'
Rake::TestTask.new(:test) do |t|
  t.libs << 'lib'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
end
 
desc 'Generate documentation for the nilify_blanks plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = 'NilifyBlanks'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
 
Echoe.new('nilify_blanks', '0.1.2') do |p|
  p.description = "Auto-convert blank fields to nil."
  p.url = "http://github.com/railsgarden/nilify_blanks"
  p.author = "Ben Hughes"
  p.email = "ben@railsgarden.com"
  p.ignore_pattern = ["tmp/*", "script/*"]
  p.development_dependencies = []
end
 
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }