Class: Monolith::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/monolith/cli.rb

Constant Summary collapse

DEFAULT_PROJECT_NAME =
"server".freeze

Instance Method Summary collapse

Instance Method Details

#new(project_name = DEFAULT_PROJECT_NAME) ⇒ Object



11
12
13
14
# File 'lib/monolith/cli.rb', line 11

def new(project_name = DEFAULT_PROJECT_NAME)
  template_path = File.join File.expand_path(__dir__), "cli/template.rb"
  run "rails new #{project_name} --template #{template_path} --database postgresql --css tailwind"
end

#versionObject



17
18
19
# File 'lib/monolith/cli.rb', line 17

def version
  puts Monolith::VERSION
end