Skip to content
This repository has been archived by the owner on Aug 29, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Adjusted to fix bug with rake 0.8.x
See http://rubyforge.org/pipermail/rake-devel/2007-December.txt
search above for 'redefine rake task broken in 0.8.x for a rails app' to find message thread
  • Loading branch information
tekkub authored and lazyatom committed Apr 28, 2008
1 parent f765614 commit a42d1a6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tasks/engines.rake
Expand Up @@ -5,17 +5,23 @@
unless Rake::TaskManager.methods.include?(:redefine_task)
module Rake
module TaskManager

# adjusted to fix bug with rake 0.8.x
# see http://rubyforge.org/pipermail/rake-devel/2007-December.txt
# search above for 'redefine rake task broken in 0.8.x for a rails app' to find message thread
def redefine_task(task_class, args, &block)
task_name, deps = resolve_args(args)
task_name, deps = resolve_args([args])
task_name = task_class.scope_name(@scope, task_name)
deps = [deps] unless deps.respond_to?(:to_ary)
deps = deps.collect {|d| d.to_s }
task = @tasks[task_name.to_s] = task_class.new(task_name, self)
task.application = self
@last_comment = nil
task.add_description(@last_description)
@last_description = nil
task.enhance(deps, &block)
task
end

end
class Task
class << self
Expand Down

2 comments on commit a42d1a6

@snowblink
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rake 0.8.1 resolve_args returns [task_name, arg_name_list, prerequisites]. Does line 13 need to be amended?

@snowblink
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://github.com/snowblink/engines/commit/a3108e7277c8dd64336308f7c444d1f1ca547bc6

Please sign in to comment.