Class: CovLoupe::Scripts::SetupDocServer
- Inherits:
-
Object
- Object
- CovLoupe::Scripts::SetupDocServer
- Includes:
- CommandExecution
- Defined in:
- lib/cov_loupe/scripts/setup_doc_server.rb
Constant Summary collapse
- VENV_DIR =
'.docs-venv'
Instance Method Summary collapse
Methods included from CommandExecution
#abort_with, #command_exists?, #run_command, #run_command_with_status
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cov_loupe/scripts/setup_doc_server.rb', line 12 def call puts 'Setting up Python virtual environment...' run_command(['python3', '-m', 'venv', VENV_DIR], print_output: true) puts 'Installing dependencies...' pip_path = File.join(VENV_DIR, 'bin', 'pip') requirements_path = if File.exist?('requirements-lock.txt') 'requirements-lock.txt' else 'requirements.txt' end run_command([pip_path, 'install', '-q', '-r', requirements_path], print_output: true) puts '✓ Documentation server setup complete.' end |