Changeset 705

Show
Ignore:
Timestamp:
06/20/08 12:19:51 (4 months ago)
Author:
raggi
Message:

Added a different default rake task when not building under gems

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/raggi/Rakefile

    r703 r705  
    3838java = ENV['EM_JAVA'] || RUBY_PLATFORM =~ /java/ 
    3939 
    40 # The default task is invoked by rubygems during install, change with caution. 
    41 desc "Build suitable for run & gem install." 
    42 task :default => [:build] 
     40# If running under rubygems... 
     41__DIR__ ||= File.expand_path(File.dirname(__FILE__)) 
     42if Gem.path.any? {|path| %r(^#{Regexp.escape path}) =~ __DIR__} 
     43  task :default => :gem_build 
     44else 
     45  desc "Run tests." 
     46  task :default => 'test:partial' 
     47end 
     48 
     49desc ":default build when running under rubygems." 
     50task :gem_build => :build 
    4351 
    4452desc "Build extension and place in lib"