class HotCatch::UninstallGenerator

Public Instance Methods

remove_hot_catch_config() click to toggle source
# File lib/generators/hot_catch/uninstall_generator.rb, line 25
def remove_hot_catch_config
  remove_file "config/hot_catch_config.json"
end
remove_initialize_file_for_sender_logs() click to toggle source
# File lib/generators/hot_catch/uninstall_generator.rb, line 29
def remove_initialize_file_for_sender_logs
  remove_file "config/initializers/hot_catch_sender_logs.rb"
end
remove_log_files() click to toggle source
# File lib/generators/hot_catch/uninstall_generator.rb, line 21
def remove_log_files
  remove_file "tmp/hot_catch_buf_file"
end
remove_rack_logger() click to toggle source

include Rails::Generators::Migration

# File lib/generators/hot_catch/uninstall_generator.rb, line 9
def remove_rack_logger
  remove_file "config/hot_catch_logger.rb"
end
unchange_files() click to toggle source
# File lib/generators/hot_catch/uninstall_generator.rb, line 13
def unchange_files
  gsub_file "config/application.rb", /require_relative 'hot_catch_logger'/, ""
  gsub_file "config/application.rb", /config.*Logger/, ""

  gsub_file "config/environments/development.rb", /.*\s.*hot_catch_buf_file'\)\)\s*/, ""
  gsub_file "config/environments/production.rb", /.*\s.*hot_catch_buf_file'\)\)\s*/, ""
end