Froze rails gems
[depot.git] / vendor / rails / railties / lib / commands.rb
1 commands = Dir["#{File.dirname(__FILE__)}/commands/*.rb"].collect { |file_path| File.basename(file_path).split(".").first }
2
3 if commands.include?(ARGV.first)
4 require "#{File.dirname(__FILE__)}/commands/#{ARGV.shift}"
5 else
6 puts <<-USAGE
7 The 'run' provides a unified access point for all the default Rails' commands.
8
9 Usage: ./script/run <command> [OPTIONS]
10
11 Examples:
12 ./script/run generate controller Admin
13 ./script/run process reaper
14
15 USAGE
16 puts "Choose: #{commands.join(", ")}"
17 end