Sha256: 4f84b5b40779fdb05250a05480640a876f3090daadee6d39d9676e5f340f11ac
Contents?: true
Size: 820 Bytes
Versions: 8
Compression:
Stored size: 820 Bytes
Contents
require "set" module Spring module Client class Rails < Command COMMANDS = Set.new %w(console runner generate destroy test) ALIASES = { "c" => "console", "r" => "runner", "g" => "generate", "d" => "destroy", "t" => "test" } def self.description "Run a rails command. The following sub commands will use Spring: #{COMMANDS.to_a.join ', '}." end def call command_name = ALIASES[args[1]] || args[1] if COMMANDS.include?(command_name) Run.call(["rails_#{command_name}", *args.drop(2)]) else require "spring/configuration" ARGV.shift load Dir.glob(Spring.application_root_path.join("{bin,script}/rails")).first exit end end end end end
Version data entries
8 entries across 8 versions & 3 rubygems