Module: Aircana::CLI::DoctorChecks::OptionalIntegrations
- Included in:
- Aircana::CLI::Doctor
- Defined in:
- lib/aircana/cli/commands/doctor_checks.rb
Instance Method Summary collapse
- #check_confluence_config ⇒ Object
- #check_editor_config ⇒ Object
- #check_optional_integrations ⇒ Object
- #handle_editor_status(editor, available_editors) ⇒ Object
Instance Method Details
#check_confluence_config ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/aircana/cli/commands/doctor_checks.rb', line 64 def check_confluence_config config = Aircana.configuration if confluence_configured?(config) log_success("Confluence", "API credentials configured") else log_info("Confluence", "Not configured") log_remedy("Set CONFLUENCE_BASE_URL, CONFLUENCE_USERNAME, " \ "and CONFLUENCE_API_TOKEN for knowledge base refresh") end end |
#check_editor_config ⇒ Object
76 77 78 79 80 81 |
# File 'lib/aircana/cli/commands/doctor_checks.rb', line 76 def check_editor_config editor = ENV.fetch("EDITOR", nil) available_editors = find_available_editors handle_editor_status(editor, available_editors) end |
#check_optional_integrations ⇒ Object
57 58 59 60 61 62 |
# File 'lib/aircana/cli/commands/doctor_checks.rb', line 57 def check_optional_integrations Aircana.human_logger.info "\nOptional Integrations:" check_confluence_config check_editor_config end |
#handle_editor_status(editor, available_editors) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/aircana/cli/commands/doctor_checks.rb', line 83 def handle_editor_status(editor, available_editors) if editor && command_available?(editor) log_success("Editor", "EDITOR set to #{editor}") elsif !available_editors.empty? log_info("Editor", "Available editors: #{available_editors.join(", ")}") log_remedy("Set EDITOR environment variable to prefer one") else log_warning("Editor", "No common editors found") log_remedy("Install an editor or set EDITOR environment variable") end end |