Class: AwsSqsMoniter::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveRecord::Generators::Migration
Defined in:
lib/generators/aws_sqs_moniter/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#install_filesObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/generators/aws_sqs_moniter/install_generator.rb', line 12

def install_files
  #copiong initializer to config/intializer of rails application
  copy_file 'initializer.rb', 'config/initializers/aws_sqs_moniter_intializer.rb'
  copy_file 'dead_letter.rb', 'app/models/dead_letter.rb'
  copy_file 'processed_message.rb', 'app/models/processed_message.rb'
  copy_file 'published_message.rb', 'app/models/published_message.rb'
  #coping aws config file to  rails application
  copy_file 'shoryuken.yml' , 'config/shoryuken.yml'
  migration_template 'create_dead_letters_migration.rb',
                     'db/migrate/create_dead_letters.rb'

  migration_template 'create_processed_messages_migration.rb',
                     'db/migrate/create_processed_messages.rb'

  migration_template 'create_published_messages_migration.rb',
                     'db/migrate/create_published_messages.rb'
end