Sha256: 9d855bf2fe246bb1f3a0f9c069d8f77a24ddd5949c1e09207d6cc846bf76cb7e

Contents?: true

Size: 798 Bytes

Versions: 1

Compression:

Stored size: 798 Bytes

Contents

require "bundler/gem_tasks"
require "rake/testtask"
require 'fileutils'

desc "Building extension..."
task :build_src do
  puts "Building extension..."
  system("cargo build --release")
end

desc "Cleaning up build..."
task :clean_src do
  puts "Cleaning up build..."
  # Remove all but library file
  FileUtils.
    rm_rf(
      Dir.
      glob('target/release/*').
      keep_if {|f|
        !f[/\.(?:so|dll|dylib)\z/]
      }
  )
end

desc "Compiling Rust extension..."
task :build_lib => [:build_src, :clean_src] do
  puts "Completed build!"
end

Rake::TestTask.new(:test) do |t|
  t.libs << "test"
  t.libs << "lib"
  t.test_files = FileList['test/**/*_test.rb']
end

Rake::TestTask.new(:bench) do |t|
  t.libs = %w(lib test)
  t.pattern = 'test/**/*_benchmark.rb'
end

task :default => :test

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
faster_path-0.1.0 Rakefile