Class: Appboost::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/appboost/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#app_env_nameObject



40
41
42
# File 'lib/generators/appboost/install_generator.rb', line 40

def app_env_name
  [app_name, rails_env].compact.join("-")
end

#app_nameObject



36
37
38
# File 'lib/generators/appboost/install_generator.rb', line 36

def app_name
  options[:app_name]
end

#generate_nginxObject



48
49
50
# File 'lib/generators/appboost/install_generator.rb', line 48

def generate_nginx
  template "nginx_unicorn.conf.erb", "config/nginx/#{app_env_name}.conf"
end

#generate_unicornObject



44
45
46
# File 'lib/generators/appboost/install_generator.rb', line 44

def generate_unicorn
  template "unicorn.rb.erb", "config/unicorn.rb"
end

#server_nameObject



32
33
34
# File 'lib/generators/appboost/install_generator.rb', line 32

def server_name
  [rails_env, host_base].compact.join(".")
end