Sha256: 66795beee19d70965b0f5ea15ad37f4cf83337ac3330de8bdc761b169b3c174c

Contents?: true

Size: 862 Bytes

Versions: 5

Compression:

Stored size: 862 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new do |t|
end

task :install do
  rm_rf "*.gem"
  puts `gem build typhoeus.gemspec`
  puts `gem install typhoeus-#{Typhoeus::VERSION}.gem`
end

desc "Builds the native code"
task :build_native do
  system("cd ext/typhoeus && ruby extconf.rb && make clean && make")
end

desc "Start up the test servers"
task :start_test_servers do
  puts "Starting 3 test servers"

  pids = []
  [3000, 3001, 3002].each do |port|
    if pid = fork
      pids << pid
    else
      exec('ruby', 'spec/servers/app.rb', '-p', port.to_s)
    end
  end

  at_exit do
    pids.each do |pid|
      puts "Killing pid #{pid}"
      Process.kill("KILL", pid)
    end
  end

  # Wait for kill.
  sleep
end

desc "Build Typhoeus and run all the tests."
task :default => [:build_native, :spec]

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
marnen-typhoeus-0.3.7 Rakefile
marnen-typhoeus-0.3.6 Rakefile
marnen-typhoeus-0.3.5 Rakefile
marnen-typhoeus-0.3.4 Rakefile
typhoeus-0.3.3 Rakefile