Class: Monolith::CLI
- Inherits:
-
Thor
- Object
- Thor
- Monolith::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/monolith/cli.rb
Constant Summary collapse
- DEFAULT_PATH =
"server".freeze
Instance Method Summary collapse
Instance Method Details
#dev ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/monolith/cli.rb', line 25 def dev procfile = "Procfile.dev" unless File.exist?(procfile) puts "Error: #{procfile} not found in current directory" exit 1 end engine = Foreman::Engine::CLI.new(procfile: procfile) engine.load_procfile(procfile) engine.start rescue Interrupt puts "\nShutting down..." end |
#new(path = DEFAULT_PATH) ⇒ Object
14 15 16 17 |
# File 'lib/monolith/cli.rb', line 14 def new(path = DEFAULT_PATH) template_path = File.join File.(__dir__), "cli/template.rb" run "rails new #{path} --template #{template_path} --css tailwind --skip-test --skip-system-test --skip-solid" end |
#version ⇒ Object
20 21 22 |
# File 'lib/monolith/cli.rb', line 20 def version puts Monolith::VERSION end |