Sha256: 952c973d0b2806e5d8de8d91b510be56db9e8606b83058bdca95155b2c1531dd
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
#require "bundler/gem_tasks" require "rspec/core/rake_task" require 'rake/extensiontask' =begin namespace :test do desc "Compile and unit test C extensions" Rspec::Core::RakeTask.new :c => :compile_c do |t| t.rspec_opts = C_SPEC_FILE end end =end #exe runs the csolve binary task :exe do $LOAD_PATH << "#{Dir.pwd}/lib/" require_relative "bin/csolve.rb" end #spec runs all RSpec examples RSpec::Core::RakeTask.new :spec #uses task template provided by rake-compiler to run the extension compilation #workflow. Task name: compile (do not use task name: ext) Rake::ExtensionTask.new 'congruence_solver' do |ext| ext.lib_dir = "lib/congruence_solver" end task :bench do $LOAD_PATH << "#{Dir.pwd}/lib/" Dir.foreach("bench") do |bm_file| path = "bench/#{bm_file}" if File.file? path and path =~ "_bm.rb^" require_relative path end end end #executes compile task defined above, then cleans up the tmp directory that #rake-compiler leaves behind for some reason task :compile_c => :compile do CLEAN_CMD = "rmdir /s /q tmp" system CLEAN_CMD end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
congruence_solver-0.3.0 | Rakefile |
congruence_solver-0.2.0 | Rakefile |