Class: ActiveMessaging::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActiveMessaging::InstallGenerator
- Defined in:
- lib/generators/active_messaging/install/install_generator.rb
Instance Method Summary collapse
- #add_gems ⇒ Object
- #change_application ⇒ Object
- #copy_application ⇒ Object
- #copy_broker_rb ⇒ Object
- #copy_poller ⇒ Object
- #copy_poller_rb ⇒ Object
- #copy_threaded_poller ⇒ Object
Instance Method Details
#add_gems ⇒ Object
29 30 31 |
# File 'lib/generators/active_messaging/install/install_generator.rb', line 29 def add_gems gem("daemons") end |
#change_application ⇒ Object
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_application ⇒ Object
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_rb ⇒ Object
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_poller ⇒ Object
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_rb ⇒ Object
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_poller ⇒ Object
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 |