aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/commands.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/commands.rb')
-rw-r--r--railties/lib/commands.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/railties/lib/commands.rb b/railties/lib/commands.rb
index 2ca8741e4c..cf7716fc83 100644
--- a/railties/lib/commands.rb
+++ b/railties/lib/commands.rb
@@ -1,5 +1,7 @@
-if %w( console perform process runner server ).include?(ARGV.first)
- require "#{File.dirname(__FILE__)}/process/#{ARGV.shift}"
+commands = Dir["#{File.dirname(__FILE__)}/commands/*.rb"].collect { |file_path| File.basename(file_path).split(".").first }
+
+if commands.include?(ARGV.first)
+ require "#{File.dirname(__FILE__)}/commands/#{ARGV.shift}"
else
- puts "Choose: console perform process runner server"
+ puts "Choose: #{commands.join(", ")}"
end \ No newline at end of file