nicksieger / stickshift

Pedal to the metal manual profiler

This URL has Read+Write access

stickshift / Rakefile
100644 36 lines (31 sloc) 1.157 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
require 'rake/testtask'
 
begin
  require 'echoe'
  require File.dirname(__FILE__) + '/lib/stickshift/version'
  echoe = Echoe.new("stickshift", Stickshift::VERSION) do |p|
    p.rubyforge_name = "caldersphere"
    p.url = "http://caldersphere.rubyforge.org/stickshift"
    p.author = "Nick Sieger"
    p.email = "nick@nicksieger.com"
    p.summary = "Stickshift is a pedal-to-the-metal manual profiler."
    p.description = "Stickshift is a simple, manual-instrumenting call-tree profiler in as few lines of code as possible."
    p.include_rakefile = true
  end
 
  task :gemspec do
    File.open("#{echoe.name}.gemspec", "w") {|f| f << echoe.spec.to_ruby }
  end
  task :package => :gemspec
rescue LoadError
  puts "You need echoe installed to be able to package this gem"
end
 
# Hoe has its own test, but I want Rake::TestTask
Rake::Task['test'].send :instance_variable_set, "@actions", []
Rake::TestTask.new
 
task :default => :test
 
desc "Run the instrumented rake example"
task :example do
  puts "# Here is the example Rakefile"
  puts *(File.readlines("examples/example.rake"))
  puts "# Running it"
  ruby "-Ilib -S rake -f examples/example.rake"
end