-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
76 lines (65 loc) · 2.01 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
require 'rubygems/package_task'
require 'rcov/rcovtask'
require 'ruby-prof/task'
require 'bundler/setup'
Bundler.require(:default)
def common_test_settings(t)
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
desc 'Default: run unit and functional tests.'
task :default => :test
desc 'Test Mochigome'
Rake::TestTask.new(:test) do |t|
common_test_settings(t)
end
desc 'Run tests automatically as files change'
task :watchr do |t|
exec 'watchr test/test.watchr'
end
desc 'Generate documentation for Mochigome.'
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Mochigome'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
Rcov::RcovTask.new(:rcov) do |t|
common_test_settings(t)
t.pattern = 'test/unit/*_test.rb' # Don't care about coverage added by functional tests
t.rcov_opts << '-o coverage -x "/ruby/,/gems/,/test/,/migrate/"'
end
RubyProf::ProfileTask.new(:profile) do |t|
common_test_settings(t)
t.output_dir = "#{File.dirname(__FILE__)}/profile"
t.printer = :call_tree
t.min_percent = 10
end
require 'lib/mochigome_ver'
gemspec = Gem::Specification.new do |s|
s.name = "mochigome"
s.version = Mochigome::VERSION
s.authors = ["David Mike Simon"]
s.email = "[email protected]"
s.homepage = "http://github.com/DavidMikeSimon/mochigome"
s.summary = "The do-what-I-mean report generator"
s.description = "Report generator that graphs over ActiveRecord associations"
s.files = `git ls-files .`.split("\n") - [".gitignore"]
s.platform = Gem::Platform::RUBY
s.require_path = 'lib'
s.rubyforge_project = '[none]'
s.add_dependency('arel', '~> 2.1')
s.add_dependency('ruport')
s.add_dependency('nokogiri')
s.add_dependency('rgl')
s.add_dependency('activerecord')
end
Gem::PackageTask.new(gemspec) do |pkg|
end