Module: Citrin::Helpers

Included in:
CLI, Commands::CreateDatabase, Commands::CreateWebserver, Commands::SetupLogrotate
Defined in:
lib/citrin/helpers.rb

Instance Method Summary collapse

Instance Method Details

#database_template_file(env) ⇒ Object



7
8
9
10
# File 'lib/citrin/helpers.rb', line 7

def database_template_file(env)
  env ||= "prod"
  File.dirname(__FILE__)+"/../../templates/#{env}.database.erb"
end

#logrotate_config_template(app) ⇒ Object



16
17
18
# File 'lib/citrin/helpers.rb', line 16

def logrotate_config_template(app)
  File.dirname(__FILE__)+"/../../templates/logrotate.erb"
end

#rails_app_log_file(app) ⇒ Object



12
13
14
# File 'lib/citrin/helpers.rb', line 12

def rails_app_log_file(app)
  "#{app.app_root}/log/#{app.fullenv}.log"
end

#webserver_template_file(env) ⇒ Object



2
3
4
5
# File 'lib/citrin/helpers.rb', line 2

def webserver_template_file(env)
  env ||= "prod"
  File.dirname(__FILE__)+"/../../templates/#{env}_virtualhost.erb"
end