Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 68 lines (57 sloc) 1.953 kb
2a80d0e Jewelerize
Tony Arcieri authored
1 require 'rubygems'
3f5a4fe Initial commit of codebase to trunk
tarcieri authored
2 require 'rake'
3 require 'rake/clean'
4
2a80d0e Jewelerize
Tony Arcieri authored
5 begin
6 require 'jeweler'
7 Jeweler::Tasks.new do |gem|
8 gem.name = "cool.io"
9 gem.summary = "The cool event framework for Ruby"
10 gem.description = "A Ruby wrapper around the libev high performance event library"
11 gem.email = "tony@medioh.com"
12 gem.homepage = "http://github.com/tarcieri/cool.io"
13 gem.authors = ["Tony Arcieri"]
14 gem.add_dependency "iobuffer", ">= 0.1.3"
0c17aba Don't lock to a particular minor version of RSpec
Tony Arcieri authored
15 gem.add_development_dependency "rspec", ">= 2.1.0"
1b38f95 @luislavena Leverage on rake-compiler for extension compilation
luislavena authored
16 gem.add_development_dependency "rake-compiler", "~> 0.7.5"
2a80d0e Jewelerize
Tony Arcieri authored
17 gem.extensions = FileList["ext/**/extconf.rb"].to_a
18
19 # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
20 end
21 Jeweler::GemcutterTasks.new
22 rescue LoadError
23 puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
24 end
3f5a4fe Initial commit of codebase to trunk
tarcieri authored
25
2a80d0e Jewelerize
Tony Arcieri authored
26 require 'rspec/core/rake_task'
27 RSpec::Core::RakeTask.new(:spec) do |spec|
28 spec.pattern = 'spec/**/*_spec.rb'
29 spec.rspec_opts = %w[-fs -c -b]
5ec5f25 Shift away from rakehelp
tarcieri authored
30 end
31
2a80d0e Jewelerize
Tony Arcieri authored
32 RSpec::Core::RakeTask.new(:rcov) do |spec|
33 spec.pattern = 'spec/**/*_spec.rb'
34 spec.rcov = true
35 spec.rspec_opts = %w[-fs -c -b]
deed722 Modified HTTP/1.1 parser to accept a single character of whitespace betw...
tarcieri authored
36 end
37
2a80d0e Jewelerize
Tony Arcieri authored
38 task :default => %w(compile spec)
39 task :spec => :check_dependencies
40
41 require 'rake/rdoctask'
42 Rake::RDocTask.new do |rdoc|
43 version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
45 rdoc.rdoc_dir = 'rdoc'
46 rdoc.title = "cool.io #{version}"
47 rdoc.rdoc_files.include('README*')
48 rdoc.rdoc_files.include('lib/**/*.rb')
5ec5f25 Shift away from rakehelp
tarcieri authored
49 end
50
1b38f95 @luislavena Leverage on rake-compiler for extension compilation
luislavena authored
51 require 'rake/extensiontask'
52 Rake::ExtensionTask.new('http11_client') do |ext|
5ec5f25 Shift away from rakehelp
tarcieri authored
53 end
54
1b38f95 @luislavena Leverage on rake-compiler for extension compilation
luislavena authored
55 Rake::ExtensionTask.new('cool.io_ext') do |ext|
56 ext.ext_dir = 'ext/cool.io'
5ec5f25 Shift away from rakehelp
tarcieri authored
57 end
58
3c3a760 Readd Rake task for rebuilding the http11 client parser with Ragel
Tony Arcieri authored
59 # Rebuild parser Ragel
60 task :http11_parser do
61 Dir.chdir "ext/http11_client" do
62 target = "http11_parser.c"
63 File.unlink target if File.exist? target
64 sh "ragel http11_parser.rl | rlgen-cd -G2 -o #{target}"
65 raise "Failed to build C source" unless File.exist? target
66 end
67 end
Something went wrong with that request. Please try again.