File: Rakefile

package info (click to toggle)
ruby-http-parser 1.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 280 kB
  • sloc: ansic: 2,137; ruby: 672; makefile: 12
file content (19 lines) | stat: -rw-r--r-- 417 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'rubygems'
require 'rake'
require 'rspec/core/rake_task'

task :default => [:compile, :test]

task :compile do
    protect = ['http_parser.c', 'http_parser.h']
    Dir["ext/http-parser/**/*"].each do |file|
        begin
            next if protect.include? File.basename(file)
            FileUtils.rm file
        rescue
        end
    end
    system 'cd ext && rake'
end

RSpec::Core::RakeTask.new(:test)