Class: Bard::CLI
- Inherits:
-
Object
- Object
- Bard::CLI
- Defined in:
- lib/bard/new/cli/provision.rb,
lib/bard/new/cli/new.rb
Constant Summary collapse
- PROVISION_STEPS =
%w[ SSH User AuthorizedKeys Swapfile Apt MySQL Repo MasterKey RVM App Nginx Deploy HTTP LogRotation Data ]
- NEW_RAILS_REQUIREMENT =
"~> 8.1.0"
Instance Method Summary collapse
Instance Method Details
#new(project_name) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/bard/new/cli/new.rb', line 9 def new(project_name) @new_project_name = project_name new_validate new_create_project new_push_to_github unless [:skip_github] new_stage unless [:skip_stage] puts green("Project #{@new_project_name} created!") puts "Please cd ../#{@new_project_name}" end |
#provision(ssh_url = config[:production].ssh&.to_s) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/bard/new/cli/provision.rb', line 25 def provision(ssh_url = config[:production].ssh&.to_s) ssh_url = ssh_url.dup [:steps].each do |step| require "bard/new/provision/#{step.downcase}" Bard::Provision.const_get(step).call(config, ssh_url) end end |