Class: Gorails::Commands::Jumpstart
- Inherits:
-
Gorails::Command
- Object
- Gorails::Commands::Jumpstart
- Defined in:
- lib/gorails/commands/jumpstart.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#call(args, _name) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# 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 |