Sha256: e4ef4961a5c25fc57ec909c4d7aa5062263e5a4c4eb764405a40684ac449d97c

Contents?: true

Size: 803 Bytes

Versions: 8

Compression:

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

8 entries across 8 versions & 1 rubygems

Version Path
faster_path-0.1.8 Rakefile
faster_path-0.1.7 Rakefile
faster_path-0.1.6 Rakefile
faster_path-0.1.5 Rakefile
faster_path-0.1.4 Rakefile
faster_path-0.1.3 Rakefile
faster_path-0.1.2 Rakefile
faster_path-0.1.1 Rakefile