Class: Bobot::UninstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Extended by:
Generators::Utils::ClassMethods
Includes:
Generators::Utils::InstanceMethods, Rails::Generators::Migration
Defined in:
lib/generators/bobot/uninstall_generator.rb

Instance Method Summary collapse

Methods included from Generators::Utils::InstanceMethods

#ask_for, #display

Instance Method Details

#uninstallObject



13
14
15
16
17
18
19
20
21
# File 'lib/generators/bobot/uninstall_generator.rb', line 13

def uninstall
  display 'Why you leaving so soon? :('
  gsub_file 'config/routes.rb', %r{mount Bobot::Engine => \'\/.+\'(, as: \'bot\')?}, ''
  remove_file 'config/initializers/bobot.rb'
  remove_file 'app/bobot/workflow.rb'
  remove_file 'config/locales/bobot.en.yml'
  remove_file 'config/locales/bobot.fr.yml'
  display 'Done! Bobot has been uninstalled.'
end