class Grails::CLI

Public Instance Methods

new(app_name) click to toggle source
# File lib/commands.rb, line 71
def new(app_name)
  app_dir = File.join(Dir.pwd, name)
  Raise "Directory of #{app_name} already exists" if Dir.exist?(app_dir)
  FileUtils.copy_enyry(TEMPLATE_PATH, app_dir)
  Dir.mkdir(File.join(app_dir, "db/migrations"))
  File.new(File.join(app_dir, "config/routes.rb"))
  File.new(File.join(app_dir, "Gemfile"))

end
server() click to toggle source
# File lib/commands.rb, line 92
def server
  raise "Cannot find Grails app" unless project_root
  require_relative "#{project_root}/config/routes"
  require_relative '../bin/server'
  server = GrailsServer.new(3000)
  server.start
end