Class: OopsieExceptions::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- OopsieExceptions::Generators::InstallGenerator
- Defined in:
- lib/generators/oopsie_exceptions/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_initializer ⇒ Object
10 11 12 |
# File 'lib/generators/oopsie_exceptions/install_generator.rb', line 10 def create_initializer template "initializer.rb", "config/initializers/oopsie_exceptions.rb" end |
#remove_legacy_delivery_job ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/generators/oopsie_exceptions/install_generator.rb', line 14 def remove_legacy_delivery_job legacy_path = "app/jobs/oopsie_exceptions/delivery_job.rb" return unless File.exist?(File.join(destination_root, legacy_path)) say "" say "Found legacy #{legacy_path} from a previous version.", :yellow say "The gem now ships its own webhook job — this file is no longer used." remove_file legacy_path end |
#show_post_install ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/generators/oopsie_exceptions/install_generator.rb', line 24 def show_post_install say "" say "OopsieExceptions installed!", :green say "" say "Next step: edit config/initializers/oopsie_exceptions.rb and add your webhook URLs." say "" end |