class Warm::Boot::CLI
Handle the application command line parsing and the dispatch to various command objects
@api public
Constants
- Error
Error
raised by this runner
Public Instance Methods
new()
click to toggle source
# File lib/warm/boot/cli.rb, line 24 def new # rubocop:disable Metrics/AbcSize require_relative "commands/rails_new" require_relative "rails_opts" prompt = TTY::Prompt.new rails_opts = RailsOpts.new( app_name: prompt.ask("What is the name of the app?", default: "myapp"), api_only: prompt.yes?("Is this an API only app?"), database: prompt.select("Choose your database:", %w(mysql postgresql sqlite3)), coffeescript: prompt.yes?("Do you want to install coffeescript?"), webpacker: prompt.yes?("Do you want to install webpack"), framework: "none", ) if rails_opts.options.webpacker rails_opts.options.framework = prompt.select( "Choose your front-end framework:", %w(react vue angular elm stimulus none) ) end Warm::Boot::Commands::RailsNew.new(rails_opts.options).execute end
version()
click to toggle source
# File lib/warm/boot/cli.rb, line 17 def version require_relative "version" p "v#{Warm::Boot::VERSION}" end