Class: ActiveMessaging::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_gemsObject



29
30
31
# File 'lib/generators/active_messaging/install/install_generator.rb', line 29

def add_gems
  gem("daemons")
end

#change_applicationObject



34
35
36
# File 'lib/generators/active_messaging/install/install_generator.rb', line 34

def change_application
  application '  config.autoload_paths += %W(#{config.root}/app/processors)'
end

#copy_applicationObject



7
8
9
# File 'lib/generators/active_messaging/install/install_generator.rb', line 7

def copy_application
  copy_file "application_processor.rb", "app/processors/application_processor.rb"
end

#copy_broker_rbObject



25
26
27
# File 'lib/generators/active_messaging/install/install_generator.rb', line 25

def copy_broker_rb
  copy_file "broker.yml", "config/broker.yml"
end

#copy_pollerObject



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

def copy_poller
  template "poller", "script/#{poller_name}"
  chmod("script/#{poller_name}", 0755)
end

#copy_poller_rbObject



21
22
23
# File 'lib/generators/active_messaging/install/install_generator.rb', line 21

def copy_poller_rb
  copy_file "poller.rb", "lib/#{poller_name}.rb"
end

#copy_threaded_pollerObject



16
17
18
19
# File 'lib/generators/active_messaging/install/install_generator.rb', line 16

def copy_threaded_poller
  template "threaded_poller", "script/threaded_#{poller_name}"
  chmod("script/threaded_#{poller_name}", 0755)
end