forked from be9/awesome_nested_set
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
57 lines (52 loc) · 1.7 KB
/
Rakefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# encoding: utf-8
require 'rubygems'
begin
require 'jeweler'
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler"
exit 1
end
require 'rake/testtask'
require 'rake/rdoctask'
require 'rcov/rcovtask'
#require "load_multi_rails_rake_tasks"
Jeweler::Tasks.new do |s|
s.name = "gwright-awesome_nested_set"
s.summary = "An awesome nested set implementation for Active Record"
s.description = s.summary
s.email = "[email protected]"
s.homepage = "http://github.com/gwright/awesome_nested_set"
s.authors = ["Gary Wright", "Brandon Keepers", "Daniel Morrison"]
s.add_dependency "activerecord", ['>= 3.0.0']
s.has_rdoc = true
s.extra_rdoc_files = [ "README.rdoc"]
s.rdoc_options = ["--main", "README.rdoc", "--inline-source", "--line-numbers"]
s.test_files = Dir['test/**/*.{yml,rb}']
end
Jeweler::GemcutterTasks.new
desc 'Default: run unit tests.'
task :default => :test
desc 'Test the awesome_nested_set plugin.'
Rake::TestTask.new(:test) do |t|
t.libs += ['lib', 'test']
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
desc 'Generate documentation for the awesome_nested_set plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'AwesomeNestedSet'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end
namespace :test do
desc "just rcov minus html output"
Rcov::RcovTask.new(:coverage) do |t|
t.libs << 'test'
t.test_files = FileList['test/**/*_test.rb']
t.output_dir = 'coverage'
t.verbose = true
t.rcov_opts = %w(--exclude test,/usr/lib/ruby,/Library/Ruby,lib/awesome_nested_set/named_scope.rb --sort coverage)
end
end