aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/command.rb')
-rw-r--r--railties/lib/rails/command.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb
index ddb953543f..13f3b90b6d 100644
--- a/railties/lib/rails/command.rb
+++ b/railties/lib/rails/command.rb
@@ -15,6 +15,8 @@ module Rails
include Behavior
+ HELP_MAPPINGS = %w(-h -? --help)
+
class << self
def hidden_commands # :nodoc:
@hidden_commands ||= []
@@ -27,7 +29,7 @@ module Rails
# Receives a namespace, arguments and the behavior to invoke the command.
def invoke(namespace, args = [], **config)
namespace = namespace.to_s
- namespace = "help" if namespace.blank? || Thor::HELP_MAPPINGS.include?(namespace)
+ namespace = "help" if namespace.blank? || HELP_MAPPINGS.include?(namespace)
namespace = "version" if %w( -v --version ).include? namespace
if command = find_by_namespace(namespace)
@@ -37,7 +39,7 @@ module Rails
end
end
- # Rails finds namespaces similar to thor, it only adds one rule:
+ # Rails finds namespaces similar to Thor, it only adds one rule:
#
# Command names must end with "_command.rb". This is required because Rails
# looks in load paths and loads the command just before it's going to be used.