class Object
def task(*args, &block)
def task(*args, &block) task = rake_task(*args, &block) if klass = Thor::RakeCompat.rake_classes.last non_namespaced_name = task.name.split(':').last description = non_namespaced_name description << task.arg_names.map{ |n| n.to_s.upcase }.join(' ') description.strip! klass.desc description, task.comment || non_namespaced_name klass.send :define_method, non_namespaced_name do |*args| Rake::Task[task.name.to_sym].invoke(*args) end end task end