-
Notifications
You must be signed in to change notification settings - Fork 63
/
Rakefile
42 lines (32 loc) · 848 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
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rake'
require 'rake/clean'
require 'rdoc/task'
require 'rspec/core/rake_task'
task :default => [:compile, :spec]
desc 'Generate RDoc'
rd = Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options << '--title' << 'scrypt-ruby' << '--line-numbers' << '--inline-source' << '--main' << 'README'
rdoc.template = ENV['TEMPLATE'] if ENV['TEMPLATE']
rdoc.rdoc_files.include('COPYING', 'lib/**/*.rb')
end
desc "Run all specs"
RSpec::Core::RakeTask.new do |t|
rspec_opts = ['--colour','--backtrace']
end
desc "Clean native extension build files."
task :clean do
Dir.chdir('ext/mri') do
ruby "extconf.rb"
sh "make clean"
end
end
desc "Compile the native extension."
task :compile do
Dir.chdir('ext/mri') do
ruby "extconf.rb"
sh "make"
end
end