Class: ShapeupCli::Commands::Doctor
- Defined in:
- lib/shapeup_cli/commands/doctor.rb
Defined Under Namespace
Classes: Check
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#agent_help?, #initialize, run
Constructor Details
This class inherits a constructor from ShapeupCli::Commands::Base
Class Method Details
.metadata ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/shapeup_cli/commands/doctor.rb', line 8 def self. { command: "doctor", path: "shapeup doctor", short: "Diagnose CLI setup: config, auth, connectivity, and agent skills", subcommands: [], flags: [], notes: [ "Each check reports pass, warn, fail, or skip with a fix hint", "Exits 0 when nothing failed, 1 otherwise" ], examples: [ "shapeup doctor", "shapeup doctor --json" ] } end |
Instance Method Details
#execute ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/shapeup_cli/commands/doctor.rb', line 23 def execute checks = [ check_cli_version, check_ruby_version, check_config_dir, check_profiles_file, check_config_file, check_project_config, check_token, check_host_url, check_api_reachable, check_auth, check_org_access, check_claude_skill ] report(checks) exit 1 if checks.any? { |c| c.status == :fail } end |