Class: WitBot::Generators::MessageBusGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/wit_bot/message_bus/message_bus_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_jobObject



25
26
27
# File 'lib/generators/wit_bot/message_bus/message_bus_generator.rb', line 25

def create_job
  template 'job.rb.erb', 'app/jobs/message_bus_job.rb'
end

#create_message_bus_controllerObject



21
22
23
# File 'lib/generators/wit_bot/message_bus/message_bus_generator.rb', line 21

def create_message_bus_controller
  template 'message_bus_controller.rb.erb', 'app/controllers/message_bus_controller.rb'
end

#create_message_bus_listenerObject



17
18
19
# File 'lib/generators/wit_bot/message_bus/message_bus_generator.rb', line 17

def create_message_bus_listener
  template 'message_bus_listener.rb.erb', 'app/wit_bot/message_bus_listener.rb'
end

#install_dependenciesObject



9
10
11
12
13
14
15
# File 'lib/generators/wit_bot/message_bus/message_bus_generator.rb', line 9

def install_dependencies
  gem 'redis', '~> 3'
  gem 'message_bus', '~> 2.0.0.beta.5'
  Bundler.with_clean_env do
    run 'bundle install'
  end
end