mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
a9f34eaa0f
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2469 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
17 lines
No EOL
494 B
Ruby
17 lines
No EOL
494 B
Ruby
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 <<-USAGE
|
|
The 'run' provides a unified access point for all the default Rails' commands.
|
|
|
|
Usage: ./script/run <command> [OPTIONS]
|
|
|
|
Examples:
|
|
./script/run generate controller Admin
|
|
./script/run process reaper
|
|
|
|
USAGE
|
|
puts "Choose: #{commands.join(", ")}"
|
|
end |