Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A helper to alias a task in rake
def alias_task(name, old_name)
t = Rake::Task[old_name]
desc t.full_comment if t.full_comment
task name, *t.arg_names do |_, args|
# values_at is broken on Rake::TaskArguments
args = t.arg_names.map { |a| args[a] }
t.invoke(args)
end
end
@AlexWayfer

This comment has been minimized.

Show comment Hide comment
@AlexWayfer

AlexWayfer Jun 23, 2016

Some fixes for original tasks with multiple arguments.

Some fixes for original tasks with multiple arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment