forked from bricestacey/ruby-zoom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
47 lines (39 loc) · 964 Bytes
/
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
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rdoc/task'
require 'rake/packagetask'
require 'rubygems/package_task'
require 'rubygems'
require 'mkmf'
CLEAN.include '**/*.o'
CLEAN.include '**/*.so'
CLEAN.include '**/Makefile'
CLEAN.include '**/*.log'
CLEAN.include 'pkg'
task :default => [:build, :test, :package] do |t|
end
task :build => [:clean] do |t|
Dir.chdir('ext') do
system('ruby', 'extconf.rb')
system('make')
end
end
task :package do
system('gem build zoom.gemspec')
end
Rake::TestTask.new('test') do |t|
t.test_files = FileList['test/*_test.rb']
t.ruby_opts = ['-r test/unit', '-I ext', '-r zoom']
t.verbose = true
end
Rake::TestTask.new('live_test') do |t|
t.test_files = FileList['test/*_live.rb']
t.ruby_opts = ['-r test/unit', '-I ext', '-r zoom']
t.verbose = true
end
Rake::RDocTask.new do |rd|
rd.main = "README.md"
rd.rdoc_files.include("README.md", "ext/*.c")
end