Sha256: 0923364f95268c926daacbafd1174c639a180d2b3fc692e618e0889b481e81f2

Contents?: true

Size: 1.15 KB

Versions: 15

Compression:

Stored size: 1.15 KB

Contents

#!/usr/bin/env rake

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

LASEM_DIR = File.expand_path(File.join(File.dirname(__FILE__), 'ext', 'mathematical', 'lasem'))

Rake::TestTask.new do |t|
  t.libs << 'test'
  t.test_files = FileList['test/**/*_test.rb']
  t.verbose = true
end

require 'rake/extensiontask'
spec = Gem::Specification.load('mathematical.gemspec')
Rake::ExtensionTask.new('mathematical', spec) do |ext|
  ext.lib_dir = File.join('lib', 'mathematical')
end

task default: [:test]

Gem::PackageTask.new(spec)

Rake::Task[:test].prerequisites

task :build => [:clean]

Rake::Task[:clean].enhance do
  Dir.chdir(LASEM_DIR) { puts `git clean -fdx`; }
end

desc 'Copy samples to gh-pages'
task :copy_samples do
  Dir.mktmpdir do |tmp|
    system "cp -r samples #{tmp}"

    system 'git checkout gh-pages'

    system "cp -r #{tmp}/samples ."
  end
end

desc 'Pretty format C code'
task :format do
  puts `astyle --indent=spaces=2 --style=1tbs --keep-one-line-blocks \
        $(ack -n -f --type=cpp --type=cc ext/mathematical/)`
end

desc 'Run a benchmark'
task :benchmark do
  $:.unshift 'lib'
  load 'script/benchmark.rb'
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mathematical-1.6.14 Rakefile
mathematical-1.6.13 Rakefile
mathematical-1.6.12 Rakefile
mathematical-1.6.11 Rakefile
mathematical-1.6.10 Rakefile
mathematical-1.6.9 Rakefile
mathematical-1.6.8 Rakefile
mathematical-1.6.7 Rakefile
mathematical-1.6.6 Rakefile
mathematical-1.6.5 Rakefile
mathematical-1.6.4 Rakefile
mathematical-1.6.3 Rakefile
mathematical-1.6.2 Rakefile
mathematical-1.6.1 Rakefile
mathematical-1.5.12 Rakefile