Class: Kanina::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_amqp_config_fileObject

This method is called automatically by rails when you 'install' Kanina. It copies a sample amqp.yml file to the Rails config folder, and adds amqp.yml to the .gitignore.


10
11
12
13
14
# File 'lib/generators/kanina/install/install_generator.rb', line 10

def create_amqp_config_file
  filepath = Rails.root + "config"
  template "amqp.yml.sample", filepath + "amqp.yml.sample"
  append_file Rails.root + '.gitignore', 'config/amqp.yml'
end