Sha256: 61b999ff6974bb0eb04cb71dbe127f7eca0f8fe6e1119d5cfb473959efca1b93

Contents?: true

Size: 590 Bytes

Versions: 2

Compression:

Stored size: 590 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.exist?(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

2 entries across 2 versions & 1 rubygems

Version Path
language_detection-0.1.1 Rakefile
language_detection-0.1.0 Rakefile