./Rakefile in ambition-0.1.3 vs ./Rakefile in ambition-0.1.4

- old
+ new

@@ -1,16 +1,30 @@ require 'rake' require 'rake/testtask' require 'rake/rdoctask' +Version = '0.1.4' + +module Rake::TaskManager + def redefine_task(task_class, args, &block) + task_name, deps = resolve_args(args) + @tasks.delete(task_class.scope_name(@scope, task_name).to_s) + define_task(task_class, args, &block) + end +end +class Rake::Task + def self.redefine_task(args, &block) Rake.application.redefine_task(self, args, &block) end +end +def redefine_task(args, &block) Rake::Task.redefine_task(args, &block) end + begin require 'rubygems' gem 'echoe', '=1.3' ENV['RUBY_FLAGS'] = "" require 'echoe' - Echoe.new('ambition', '0.1.3') do |p| + Echoe.new('ambition', Version) do |p| p.rubyforge_name = 'err' p.summary = "Ambition builds SQL from plain jane Ruby." p.description = "Ambition builds SQL from plain jane Ruby." p.url = "http://errtheblog.com/" p.author = 'Chris Wanstrath' @@ -19,9 +33,15 @@ p.extra_deps << ['activerecord', '>=1.15.0'] p.test_globs = 'test/*_test.rb' end rescue LoadError +end + +redefine_task(:test) { } + +Rake::TestTask.new('test') do |t| + t.pattern = 'test/*_test.rb' end desc 'Default: run unit tests.' task :default => :test