Class: Rails::Command::NitroKitCommand
- Inherits:
-
Base
- Object
- Base
- Rails::Command::NitroKitCommand
- Defined in:
- lib/rails/commands/nitro_kit/nitro_kit_command.rb
Instance Method Summary collapse
Instance Method Details
#doctor ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/rails/commands/nitro_kit/nitro_kit_command.rb', line 7 def doctor checks = installation.checks checks.each do |check| color = { pass: :green, warn: :yellow, fail: :red }.fetch(check.status) say_status(check.status.to_s.upcase, "#{check.label}: #{check.detail}", color) end exit 1 if checks.any? { _1.status == :fail } end |
#prompt ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rails/commands/nitro_kit/nitro_kit_command.rb', line 20 def prompt if [:copy] command = installation.copy_prompt say "Copied the Nitro Kit 2 initialization prompt via #{command}." else say installation.prompt end rescue RuntimeError => error say_error error. exit 1 end |