Class: Appboost::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Appboost::InstallGenerator
- Defined in:
- lib/generators/appboost/install_generator.rb
Instance Method Summary collapse
- #app_env_name ⇒ Object
- #app_name ⇒ Object
- #generate_nginx ⇒ Object
- #generate_unicorn ⇒ Object
- #server_name ⇒ Object
Instance Method Details
#app_env_name ⇒ Object
40 41 42 |
# File 'lib/generators/appboost/install_generator.rb', line 40 def app_env_name [app_name, rails_env].compact.join("-") end |
#app_name ⇒ Object
36 37 38 |
# File 'lib/generators/appboost/install_generator.rb', line 36 def app_name [:app_name] end |
#generate_nginx ⇒ Object
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_unicorn ⇒ Object
44 45 46 |
# File 'lib/generators/appboost/install_generator.rb', line 44 def generate_unicorn template "unicorn.rb.erb", "config/unicorn.rb" end |
#server_name ⇒ Object
32 33 34 |
# File 'lib/generators/appboost/install_generator.rb', line 32 def server_name [rails_env, host_base].compact.join(".") end |