Sha256: 30b9c16af3d9dd82f41f15e3ad1c9a99984158dc6c959981051f4a1c718b3341

Contents?: true

Size: 591 Bytes

Versions: 1

Compression:

Stored size: 591 Bytes

Contents

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

task :default => :test

desc "Compile extension"
task :compile do
  path = File.expand_path("ext/cld/cld.so", File.dirname(__FILE__))

  if !File.exists?(path) || ENV['RECOMPILE']
    puts "Compiling extension..."
    `cd #{File.expand_path("ext/cld/")} && make`
  else
    puts "Extension already compiled. To recompile set env variable RECOMPILE=true."
  end
end

Rake::TestTask.new(:test) do |test|
  Rake::Task["compile"].invoke

  test.libs << 'lib' << 'test'
  test.test_files = FileList['test/*_test.rb']
  test.verbose = true
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
language_detection-0.0.2 Rakefile