Sha256: ac31a1ed1e21ae0ae9386f5f1694f5c45a6bc14b7a7dff8cc87cf763d6a9256f

Contents?: true

Size: 1.26 KB

Versions: 28

Compression:

Stored size: 1.26 KB

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
  cd "ext/attach" 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
  if File.exists?('pkg')
    cd 'pkg' do
      derived_files = Dir.glob('*.gem')
      rm derived_files unless derived_files.empty?
    end
  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 $?.exitstatus if $?.exitstatus != 0
  end
  Dir.chdir("ext/attach") do
    system("#{Gem.ruby} extconf.rb && make")
    exit $?.exitstatus if $?.exitstatus != 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

28 entries across 17 versions & 3 rubygems

Version Path
avalara_sdk-24.2.29 vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
avalara_sdk-24.2.29 vendor/bundle/ruby/2.7.0/gems/debase-0.2.5.beta2/Rakefile
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/debase-0.2.5.beta1/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/debase-0.2.5.beta1/Rakefile
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
debase-0.2.5.beta2 Rakefile
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/debase-0.2.4.1/Rakefile
debase-0.2.5.beta1 Rakefile