2011-12-12 03:39:55 +00:00
|
|
|
require 'rake/extensiontask'
|
|
|
|
require 'rake/testtask'
|
|
|
|
require 'rubygems/package_task'
|
|
|
|
|
|
|
|
def gemspec
|
|
|
|
@gemspec ||= eval(File.read('process_shared.gemspec'), binding, 'process_shared.gemspec')
|
|
|
|
end
|
|
|
|
|
2012-01-30 04:52:03 +00:00
|
|
|
Rake::ExtensionTask.new('helper') do |ext|
|
|
|
|
ext.lib_dir = 'lib/process_shared/posix'
|
|
|
|
end
|
|
|
|
|
2011-12-12 03:39:55 +00:00
|
|
|
desc 'Run the tests'
|
|
|
|
task :default => [:test]
|
|
|
|
|
2011-12-12 03:47:16 +00:00
|
|
|
Rake::TestTask.new(:test => [:compile]) do |t|
|
2012-02-02 01:40:00 +00:00
|
|
|
t.pattern = 'spec/process_shared/**/*_spec.rb'
|
2011-12-12 03:39:55 +00:00
|
|
|
t.libs.push 'spec'
|
|
|
|
end
|
|
|
|
|
|
|
|
Gem::PackageTask.new(gemspec) do |p|
|
|
|
|
p.need_tar = true
|
|
|
|
p.gem_spec = gemspec
|
|
|
|
end
|
2012-01-30 04:52:03 +00:00
|
|
|
|
|
|
|
task :gem => :compile
|