Class: Monitorbit::Install

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

Instance Method Summary collapse

Instance Method Details

#add_middlewareObject



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

def add_middleware
  gsub_file(
    'config.ru',
    'run Rails.application', "use Monitorbit::ErrorsNotificationsLayer\n\nrun Rails.application"
  )
end

#create_initializer_fileObject



5
6
7
# File 'lib/generators/monitorbit/install.rb', line 5

def create_initializer_file
  append_to_file 'config/puma.rb', "activate_control_app\nplugin :yabeda"
end