Skip to content

Commit

Permalink
Clean and compile as their own rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaclayton committed Sep 12, 2010
1 parent 9004f12 commit 8e9899b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Rakefile
Expand Up @@ -10,15 +10,17 @@ Rake::ExtensionTask.new("sieve") do |extension|
extension.lib_dir = "lib/sieve"
end

task :build => [:clean, :compile]

require "cucumber/rake/task"
Cucumber::Rake::Task.new(:cucumber => [:clean, :compile]) do |t|
Cucumber::Rake::Task.new(:cucumber => :build) do |t|
t.rcov = true
end

task :default => :cucumber

desc "Benchmark C implementation against pure Ruby implementation of the Sieve"
task(:benchmark => [:clean, :compile]) do
task(:benchmark => :build) do
def sieve(n)
numbers = (0..n).map {|i| i }
numbers[0] = numbers[1] = nil
Expand Down

0 comments on commit 8e9899b

Please sign in to comment.