1 commands
= Dir
["#{File.dirname(__FILE__)}/commands/*.rb"].collect
{ |file_path
| File
.basename(file_path
).split(".").first
}
3 if commands
.include?(ARGV.first
)
4 require "#{File.dirname(__FILE__)}/commands/#{ARGV.shift}"
7 The 'run' provides a unified access point for all the default Rails' commands.
9 Usage: ./script/run <command> [OPTIONS]
12 ./script/run generate controller Admin
13 ./script/run process reaper
16 puts
"Choose: #{commands.join(", ")}"