class Gorails::Commands::Jumpstart

Public Class Methods

help() click to toggle source
# File lib/gorails/commands/jumpstart.rb, line 24
def self.help
  "Create a new Ruby on Rails application with the Jumpstart template. https://github.com/excid3/jumpstart\nUsage: {{command:#{Gorails::TOOL_NAME} jumpstart myapp}}"
end

Public Instance Methods

call(args, _name) click to toggle source
# File lib/gorails/commands/jumpstart.rb, line 8
def call(args, _name)
  name = args.first

  if name.nil?
    puts CLI::UI.fmt "{{red:Application name is required.}}"
    puts "Try again with \"gorails jumpstart myapp\""
    exit 1
  end

  CLI::UI::Frame.open("Generating Jumpstart application \"#{name}\"") do
    Bundler.with_original_env do
      system "rails new #{name} -d postgresql -m https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb"
    end
  end
end