Skip to content

Instantly share code, notes, and snippets.

@magicdawn
Forked from raggi/alias_task.rake
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magicdawn/0ae28a7c79262861ddbb to your computer and use it in GitHub Desktop.
Save magicdawn/0ae28a7c79262861ddbb to your computer and use it in GitHub Desktop.
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
@magicdawn
Copy link
Author

*t.arg_names
do |_,args|

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