Sha256: 005abee222289663942a4f8473f1edab38753bd8bdeb193152a7fdd91a7c7c86

Contents?: true

Size: 403 Bytes

Versions: 9

Compression:

Stored size: 403 Bytes

Contents

# OverrideRakeTask
Rake::TaskManager.class_eval do
  def remove_task(task_name)
    @tasks.delete(task_name.to_s)
  end
end
 
def remove_task(task_name)
  Rake.application.remove_task(task_name)
end

def override_task(*args, &block)
  name, params, deps = Rake.application.resolve_args(args)
  remove_task Rake.application[name].name
  Rake::Task.define_task({name => deps}, &block)
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
doxo-roxml-2.5.3 vendor/override_rake_task/lib/override_rake_task.rb
roxml-2.4.0 vendor/override_rake_task/lib/override_rake_task.rb
roxml-2.5.0 vendor/override_rake_task/lib/override_rake_task.rb
roxml-2.4.1 vendor/override_rake_task/lib/override_rake_task.rb
roxml-2.5.1 vendor/override_rake_task/lib/override_rake_task.rb
roxml-2.4.3 vendor/override_rake_task/lib/override_rake_task.rb
roxml-2.4.2 vendor/override_rake_task/lib/override_rake_task.rb
roxml-2.5.3 vendor/override_rake_task/lib/override_rake_task.rb
roxml-2.5.2 vendor/override_rake_task/lib/override_rake_task.rb