Class: Bankai::Generators::DeployGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/bankai/generators/deploy_generator.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Base

default_source_root

Instance Method Details

#configure_capfileObject



13
14
15
16
17
18
19
# File 'lib/bankai/generators/deploy_generator.rb', line 13

def configure_capfile
  inject_into_file(
    'Capfile',
    capistrano_plugins,
    after: "# require \"capistrano/passenger\"\n"
  )
end

#install_capistranoObject



9
10
11
# File 'lib/bankai/generators/deploy_generator.rb', line 9

def install_capistrano
  Bundler.with_clean_env { run 'bundle exec cap install' }
end

#replace_deploy_configObject



21
22
23
# File 'lib/bankai/generators/deploy_generator.rb', line 21

def replace_deploy_config
  template 'deploy.rb.erb', 'config/deploy.rb', force: true
end