public
Description: StripAttributes is a Rails plugin that automatically strips all ActiveRecord model attributes of leading and trailing whitespace before validation. If the attribute is blank, it strips the value to nil.
Homepage: http://stripattributes.rubyforge.org/
Clone URL: git://github.com/rmm5t/strip_attributes.git
Click here to lend your support to: strip_attributes and make a donation at www.pledgie.com !
strip_attributes / Rakefile
100644 31 lines (25 sloc) 0.766 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
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
 
desc 'Default: run unit tests.'
task :default => :test
 
desc 'Test the stripattributes plugin.'
Rake::TestTask.new(:test) do |t|
  t.libs << 'lib'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
end
 
desc 'Generate documentation for the stripattributes plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = 'Stripattributes'
  rdoc.options << '--line-numbers'
  rdoc.rdoc_files.include('README.rdoc')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
 
desc 'Publishes rdoc to rubyforge server'
task :publish_rdoc => :rdoc do
  cmd = "scp -r rdoc/* rmm5t@rubyforge.org:/var/www/gforge-projects/stripattributes"
  puts "\nPublishing rdoc: #{cmd}\n\n"
  system(cmd)
end