public
Description:
Homepage:
Clone URL: git://github.com/carllerche/rack-router.git
rack-router / Rakefile
100644 52 lines (44 sloc) 1.321 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require "rake"
require "rake/clean"
require "rake/gempackagetask"
require "spec/rake/spectask"
 
spec = Gem::Specification.new do |s|
  s.name = "rack-router"
  s.version = "0.0.1"
  s.platform = Gem::Platform::RUBY
  s.author = "Carl Lerche"
  s.email = "carl@splendificent.com"
  s.homepage = "http://github.com/carllerche/rack-router"
  s.summary = "Rack middleware that handles routing a request to a rack application"
  s.description = "Rack middleware that handles routing a request to a rack application"
  s.require_path = "lib"
  s.files = %w( LICENSE README Rakefile ) + Dir["{lib}/**/*"]
 
  # rdoc
  s.has_rdoc = true
  s.extra_rdoc_files = %w( README )
 
  s.required_rubygems_version = ">= 1.3.0"
  
  # Dependencies
  s.add_dependency "rack", ">= 0.9.1"
  s.required_ruby_version = ">= 1.8.6"
end
 
Rake::GemPackageTask.new(spec) do |package|
  package.gem_spec = spec
end
 
desc "Run all benchmarks"
task :benchmark do
  Dir["benchmarks/*.rb"].each do |file|
    pid = fork do
      load file
      exit
    end
    Process.wait2(pid)
  end
end
 
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
  t.spec_files = FileList['spec/**/*.rb']
  t.spec_opts = ["-c", "-fs"]
end
 
task :default do
  exec "rake spec && rake spec optimizations=true"
end