-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
33 lines (26 loc) · 669 Bytes
/
Copy pathRakefile
File metadata and controls
33 lines (26 loc) · 669 Bytes
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
require 'rubygems'
require 'rake'
NAME = 'bencode_ext'
desc 'Build gem'
task :build do
Dir.chdir("ext/bencode_ext") do
ruby 'extconf.rb'
sh 'make'
end
cp 'ext/bencode_ext/bencode_ext.so', 'lib/bencode_ext.so'
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
task :default => :test
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "bencode_ext #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('ext/**/*.c')
end