Sha256: a55e51867be17ca41c33e5f114f91e1d61c7afd0eabeb531c0bdc8dc7ab06bf7

Contents?: true

Size: 1.03 KB

Versions: 4

Compression:

Stored size: 1.03 KB

Contents

require "bundler/gem_tasks"
require 'rake/extensiontask'
require 'rspec/core/rake_task'

task :clean => ['deps:clean']

RSpec::Core::RakeTask.new(:spec)
task :spec => [:compile]

desc 'Run tests'
task :default => [:spec]

Rake::ExtensionTask.new('rbuv') do |ext|
  ext.lib_dir = File.join('lib', 'rbuv')
  ext.source_pattern = "*.{c,h}"
end

namespace :deps do
  deps_dir = 'deps'

  desc "Update all the deps"
  task :update, :libuv_version do |t, args|
    task('deps:libuv:update').invoke(args[:libuv_version])
  end

  desc "Clean all the deps"
  task :clean => ['deps:libuv:clean']

  namespace :libuv do
    libuv_dir = File.join(deps_dir, 'libuv')

    desc "Update libuv"
    task :update, :version do |t, args|
      version = args[:version] || '0.10.3'
      `cd #{deps_dir} && ((curl -L https://github.com/joyent/libuv/archive/v#{version}.tar.gz | tar zx) && (mv libuv libuv.old; mv libuv-#{version} libuv) || (rm -rf libuv-#{version}))`
    end

    desc 'Clean libuv'
    task :clean do
      `make -C #{libuv_dir} clean`
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rbuv-0.0.5 Rakefile
rbuv-0.0.4 Rakefile
rbuv-0.0.3 Rakefile
rbuv-0.0.2 Rakefile