Sha256: 51f68cd95d6c92eda62360d72ad6b290d7afbd7ce97e13962f490226bcea8a4a

Contents?: true

Size: 494 Bytes

Versions: 193

Compression:

Stored size: 494 Bytes

Contents

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

Version data entries

193 entries across 192 versions & 19 rubygems

Version Path
rails-0.14.2 lib/commands.rb
rails-0.14.1 lib/commands.rb
rails-0.14.4 lib/commands.rb
rails-0.14.3 lib/commands.rb
rails-1.1.1 lib/commands.rb
rails-1.0.0 lib/commands.rb
rails-1.1.0 lib/commands.rb
rails-1.1.6 lib/commands.rb
rails-1.1.3 lib/commands.rb
rails-1.1.5 lib/commands.rb
rails-1.1.2 lib/commands.rb
rails-1.1.4 lib/commands.rb
rails-1.2.0 lib/commands.rb
rails-1.2.1 lib/commands.rb
rails-1.2.4 lib/commands.rb
rails-1.2.5 lib/commands.rb
rails-1.2.2 lib/commands.rb
rails-1.2.3 lib/commands.rb
rails-1.2.6 lib/commands.rb
rails-2.0.4 lib/commands.rb