Class: Orats::Commands::New::Exec
- Inherits:
-
Orats::Common
- Object
- Orats::Common
- Orats::Commands::New::Exec
- Defined in:
- lib/orats/commands/new/exec.rb
Overview
entry point to the new command
Constant Summary collapse
- AVAILABLE_TEMPLATES =
{ auth: 'add authentication and authorization' }
Constants included from Server
Instance Method Summary collapse
- #available_templates ⇒ Object
- #init ⇒ Object
-
#initialize(target_path = '', options = {}) ⇒ Exec
constructor
A new instance of Exec.
Methods included from Server
Methods included from Rails
#bundle_binstubs, #bundle_install, #check_exit_conditions, #create_and_migrate_database, #custom_rails_template, #generate_favicons, #generate_home_page, #gsub_app_path, #gsub_postgres_info, #gsub_puma, #gsub_readme, #gsub_redis_info, #migrate_and_seed_database, #orats_rails_template, #rails_template, #rails_template_actions, #spring_binstub, #template_exist?
Methods inherited from Orats::Common
#base_path, #exit_if_invalid_system, #exit_if_path_exists, #file_to_string, #run_rake, #url_to_string
Methods included from Redis
#drop_namespace, #exit_if_redis_unreachable, #redis_bin
Methods included from Postgres
#create_database, #drop_database, #exit_if_database_exists, #exit_if_postgres_unreachable, #postgres_bin
Methods included from Process
Methods included from UI
Methods included from Shell
Constructor Details
#initialize(target_path = '', options = {}) ⇒ Exec
Returns a new instance of Exec.
17 18 19 |
# File 'lib/orats/commands/new/exec.rb', line 17 def initialize(target_path = '', = {}) super end |
Instance Method Details
#available_templates ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/orats/commands/new/exec.rb', line 33 def available_templates puts log 'templates', 'Add `-t TEMPLATE` to the new command to mixin a template', :magenta puts AVAILABLE_TEMPLATES.each_pair do |key, value| log key, value, :cyan end end |
#init ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/orats/commands/new/exec.rb', line 21 def init check_exit_conditions rails_template 'base' do rails_template_actions end orats_rails_template if template_exist?([:template]) custom_rails_template unless [:custom].empty? server_start end |