From 60eaae4f7df1f1dae91defb87d3707451c359cf4 Mon Sep 17 00:00:00 2001 From: francis Date: Wed, 23 Jan 2008 01:48:14 +0000 Subject: Freeze in rails 2.0.2 (Am I going to regret having this beast in CVS?) --- vendor/rails-2.0.2/railties/lib/commands.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vendor/rails-2.0.2/railties/lib/commands.rb (limited to 'vendor/rails-2.0.2/railties/lib/commands.rb') diff --git a/vendor/rails-2.0.2/railties/lib/commands.rb b/vendor/rails-2.0.2/railties/lib/commands.rb new file mode 100644 index 000000000..841e98a0d --- /dev/null +++ b/vendor/rails-2.0.2/railties/lib/commands.rb @@ -0,0 +1,17 @@ +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 [OPTIONS] + +Examples: + ./script/run generate controller Admin + ./script/run process reaper + +USAGE + puts "Choose: #{commands.join(", ")}" +end \ No newline at end of file -- cgit v1.2.3