Sha256: a0a911c729881f8f787ca1ffe0522e4220f4b4f103ca14056e30474100013538
Contents?: true
Size: 1.72 KB
Versions: 3
Compression:
Stored size: 1.72 KB
Contents
require 'bundler/gem_tasks' require 'rake/clean' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new RSpec::Core::RakeTask.new(:rcov) do |task| task.rcov = true end task :default => %w(compile spec) require 'rdoc/task' Rake::RDocTask.new do |rdoc| version = File.exist?('VERSION') ? File.read('VERSION') : "" rdoc.rdoc_dir = 'rdoc' rdoc.title = "cool.io #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end require 'rake/extensiontask' spec = eval(File.read("cool.io.gemspec")) def configure_cross_compilation(ext) unless RUBY_PLATFORM =~ /mswin|mingw/ ext.cross_compile = true ext.cross_platform = 'i386-mingw32'#['i386-mswin32-60', 'i386-mingw32'] end end Rake::ExtensionTask.new('iobuffer_ext', spec) do |ext| ext.ext_dir = 'ext/iobuffer' configure_cross_compilation(ext) end Rake::ExtensionTask.new('cool.io_ext', spec) do |ext| ext.ext_dir = 'ext/cool.io' configure_cross_compilation(ext) end # adapted from http://flavoriffic.blogspot.com/2009/06/easily-valgrind-gdb-your-ruby-c.html def specs_command require "find" files = [] Find.find("spec") do |f| files << f if File.basename(f) =~ /.*spec.*\.rb$/ end cmdline = "#{RUBY} -I.:lib:ext:spec \ -e '%w[#{files.join(' ')}].each { |f| require f }'" end namespace :spec do desc "run specs with valgrind" task :valgrind => :compile do system "valgrind --num-callers=15 \ --partial-loads-ok=yes --undef-value-errors=no \ --tool=memcheck --leak-check=yes --track-fds=yes \ --show-reachable=yes #{specs_command}" end end CLEAN.include "**/*.rbc", "**/*.o", "**/*.so", "**/*.bundle" CLEAN.exclude "vendor/**/*.rbc", "vendor/**/*.o", "vendor/**/*.so", "vendor/**/*.bundle"
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cool.io-1.4.0 | Rakefile |
cool.io-1.3.1 | Rakefile |
cool.io-1.3.0 | Rakefile |