wycats/thor — pull request #330 by rberger (2013-05-09 00:12:57+00:00)
Title: Possible fix for the subcommand help messages using the klass name instead of command name

Changed spec/subcommand and spec/fixtures/script.thor to expose the problem of when the subcommand name is different than the klass.

Fixed it by:

Updating lib/thor.rb metaprogramming magic that adds the help methods
to the subcommand klass to include a class instance variable that is
initialized to the subcommand_name and a method to access it.

Then modified command#formatted_usage to make use of that method if
its processing a subcommand and the subcommand_method exists.

Also had to "fix" the spec/register_spec.rb
context "when $thor_runner is false"
that had a test that seemed to accecpt the fact that subcommand names
got foobar'd if the klass name is different than the subcommand name.
Or I didn't understand that test, but I changed it to what made more
sense to me.

I believe this addresses #306, #169, #170, #196, #261, #128, #288