Sha256: 9c052f204e66f48c5f764f6a756cc92ade9c26c7a68429c983bfec65618884eb

Contents?: true

Size: 792 Bytes

Versions: 4

Compression:

Stored size: 792 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)\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

4 entries across 4 versions & 1 rubygems

Version Path
faster_path-0.0.9 Rakefile
faster_path-0.0.8 Rakefile
faster_path-0.0.6 Rakefile
faster_path-0.0.5 Rakefile