Sha256: 9ee1843280dc01af7e06d5b27ff34821544e3328c026e1bc0e9aca0dc8cabb7f

Contents?: true

Size: 770 Bytes

Versions: 9

Compression:

Stored size: 770 Bytes

Contents

require 'bundler/gem_tasks'
require 'rake/testtask'

BASE_TEST_FILE_LIST = Dir['test/**/test_*.rb']

desc "Remove built files"
task :clean do
  cd "ext" do
    if File.exists?("Makefile")
      sh "make clean"
      rm  "Makefile"
    end
    derived_files = Dir.glob(".o") + Dir.glob("*.so") + Dir.glob("*.bundle") 
    rm derived_files unless derived_files.empty?
  end
end

desc "Create the core debase shared library extension"
task :lib => :clean do
  Dir.chdir("ext") do
    system("#{Gem.ruby} extconf.rb && make")
    exit $?.to_i if $?.to_i != 0
  end
end

desc "Test debase."
Rake::TestTask.new(:test) do |t|
    t.libs += ['./ext', './lib']
    t.test_files = FileList[BASE_TEST_FILE_LIST]
    t.verbose = true
  end
task :test => :lib

task :default => :test

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
debase-0.1.0 Rakefile
debase-0.0.9 Rakefile
debase-0.0.8 Rakefile
debase-0.0.7 Rakefile
debase-0.0.6 Rakefile
debase-0.0.5 Rakefile
debase-0.0.4 Rakefile
debase-0.0.3 Rakefile
debase-0.0.2 Rakefile