Sha256: 627a4870e2f59988618e1c103c81dd7497673eeb43bf54fafda14086f15516a7
Contents?: true
Size: 1.24 KB
Versions: 1
Compression:
Stored size: 1.24 KB
Contents
$:.unshift File.expand_path '../lib', __FILE__ require 'nutcracker' require 'rake' require 'rubygems/package_task' require "rake/testtask" Nutcracker::GemSpec = eval File.read 'nutcracker.gemspec' sversion = Nutcracker.version.split(".")[0..2].join(".") task :download do "nutcracker-#{sversion}.tar.gz".tap do |tarball| sh "mkdir ext" unless File.directory? "ext" sh "rm -rf ext/nutcracker" sh "wget https://twemproxy.googlecode.com/files/#{tarball}" sh "tar -zxvf #{tarball}" sh "mv nutcracker-#{sversion} ext/nutcracker" File.open("ext/nutcracker/extconf.rb",'w') do |file| file.puts %q{ #raise "no support for #{RUBY_PLATFORM}" if RUBY_PLATFORM =~ /darwin|mswin|mingw/ system "./configure --prefix=#{File.expand_path('..',__FILE__)}" system 'make' } end sh "rm #{tarball}" end end task :build => :download do sh "rake gem" end task :gem => [:clobber_package] Gem::PackageTask.new Nutcracker::GemSpec do |p| p.gem_spec = Nutcracker::GemSpec end task :install => [:gem] do sh "gem install pkg/nutcracker" Rake::Task['clobber_package'].execute end ## Tests stuff task :default => :test Rake::TestTask.new(:test) do |t| t.libs << "tests" t.pattern = "tests/**/*_test.rb" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nutcracker-0.3.0.12 | Rakefile |