Class: Respondo::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Respondo::Generators::InstallGenerator
- Defined in:
- lib/generators/respondo/install/install_generator.rb
Defined Under Namespace
Classes: Lines
Instance Method Summary collapse
-
#run_interactive_setup ⇒ Object
We bypass Thor’s ‘say` entirely for all display output and use $stdout.puts / print directly.
Instance Method Details
#run_interactive_setup ⇒ Object
We bypass Thor’s ‘say` entirely for all display output and use $stdout.puts / print directly. This prevents Thor from re-echoing buffered output and causing duplicate lines in the terminal.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/generators/respondo/install/install_generator.rb', line 14 def run_interactive_setup # out LOGO out logo_with_version out divider out line(" This wizard will generate config/initializers/respondo.rb") out line(" tailored to your project — no need to read the full README.") out blank out line(yellow(" All settings can be changed later by editing the initializer.")) out divider out blank unless confirm(" Ready to configure Respondo? (y/n) ") out blank out line(yellow(" Skipped. Run this again any time:")) out line(" rails generate respondo:install") out blank return end @cfg = {} step_project_info step_request_id step_camelize step_serializer print_summary write_initializer print_done end |