-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRakefile
64 lines (56 loc) · 1.8 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
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
require 'rake/clean'
require 'rubygems'
CLEAN.include '**/*.o'
CLEAN.include '**/*.so'
CLEAN.include '**/*.bundle'
CLOBBER.include '**/*.log'
CLOBBER.include '**/Makefile'
CLOBBER.include '**/extconf.h'
desc 'Default: run unit tests.'
task :default => :test
desc 'Test XRay.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
desc 'Generate documentation for XRay.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'XRay'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
specification = Gem::Specification.new do |s|
s.name = "xray"
s.summary = "Dump backtrace for all threads."
s.version = "1.1.1"
s.author = "Philippe Hanrigou"
s.homepage = "http://xray.rubyforge.com"
s.rubyforge_project = 'xray'
s.platform = Gem::Platform::RUBY
s.executables = FileList['bin/**/*'].collect {|path| path.sub /bin\//, ""}
s.files = FileList['lib/**/*.rb'] + FileList['test/**/*.rb'] + FileList['examples/**/*'] +
FileList['**/*.diff'] + [ "rails/init.rb"]
[ 'gdb_macros', 'Rakefile' ]
s.require_path = "lib"
s.extensions = []
s.rdoc_options << '--title' << 'XRay' << '--main' << 'README' << '--line-numbers'
s.has_rdoc = true
s.extra_rdoc_files = ['README']
s.test_file = "test/all_tests.rb"
end
Rake::GemPackageTask.new(specification) do |package|
package.need_zip = false
package.need_tar = false
end
desc "Publish RDoc on Rubyforge website"
task :publish_rdoc => :rdoc do
sh "scp -i ~/.ssh/id_dsa -r rdoc/* #{ENV['USER']}@rubyforge.org:/var/www/gforge-projects/xray"
end