process_shared/Rakefile

31 lines
633 B
Ruby
Raw Normal View History

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
Rake::ExtensionTask.new('libpsem') do |ext|
ext.lib_dir = 'lib/process_shared'
end
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]
Rake::TestTask.new(:test => [:compile]) do |t|
2011-12-12 03:39:55 +00:00
t.pattern = 'spec/**/*_spec.rb'
t.libs.push 'spec'
end
Gem::PackageTask.new(gemspec) do |p|
p.need_tar = true
p.gem_spec = gemspec
end
task :gem => :compile