~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/railties/lib/commands.rb

  • Committer: Michael Forrest
  • Date: 2010-10-15 16:28:50 UTC
  • Revision ID: michael.forrest@canonical.com-20101015162850-tj2vchanv0kr0dun
refrozeĀ gems

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
b'\\ No newline at end of file'