Permalink
Newer
Older
100644 33 lines (27 sloc) 962 Bytes
Oct 27, 2009
1
require "rake"
2
require "rake/clean"
3
require "spec/rake/spectask"
4
5
CLEAN.include ["*.gem", "rdoc"]
6
RDOC_OPTS = ['--inline-source', '--line-numbers', '--title', 'Sequel validation_helpers_block: Allows easy determination of which validation rules apply to a given column, at the expense of increased verbosity', '--main', 'Sequel::Plugins::ValidationHelpersBlock']
7
8
rdoc_task_class = begin
9
require "rdoc/task"
10
RDOC_OPTS.concat(['-f', 'hanna'])
11
RDoc::Task
12
rescue LoadError
13
require "rake/rdoctask"
14
Rake::RDocTask
15
end
16
17
rdoc_task_class.new do |rdoc|
Oct 27, 2009
18
rdoc.rdoc_dir = "rdoc"
19
rdoc.options += RDOC_OPTS
20
rdoc.rdoc_files.add %w"lib/sequel_validation_helpers_block.rb LICENSE"
21
end
22
23
desc "Run specs"
24
Spec::Rake::SpecTask.new("spec") do |t|
25
t.spec_files = ["spec/sequel_validation_helpers_block_spec.rb"]
26
end
27
task :default=>[:spec]
28
29
desc "Package sequel_validation_helpers_block"
30
task :package do
31
sh %{gem build sequel_validation_helpers_block.gemspec}
32
end