Class: HotCatch::UninstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HotCatch::UninstallGenerator
- Defined in:
- lib/generators/hot_catch/uninstall_generator.rb
Instance Method Summary collapse
- #remove_hot_catch_config ⇒ Object
- #remove_initialize_file_for_sender_logs ⇒ Object
- #remove_log_files ⇒ Object
-
#remove_rack_logger ⇒ Object
include Rails::Generators::Migration.
- #unchange_files ⇒ Object
Instance Method Details
#remove_hot_catch_config ⇒ Object
25 26 27 |
# 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 ⇒ Object
29 30 31 |
# 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 ⇒ Object
21 22 23 |
# 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 ⇒ Object
include Rails::Generators::Migration
9 10 11 |
# File 'lib/generators/hot_catch/uninstall_generator.rb', line 9 def remove_rack_logger remove_file "config/hot_catch_logger.rb" end |
#unchange_files ⇒ Object
13 14 15 16 17 18 19 |
# 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 |