Class: RubynCode::Tools::BundleInstall
- Defined in:
- lib/rubyn_code/tools/bundle_install.rb
Constant Summary collapse
- TOOL_NAME =
'bundle_install'- DESCRIPTION =
'Runs `bundle install` to install gem dependencies.'- PARAMETERS =
{}.freeze
- RISK_LEVEL =
:execute- REQUIRES_CONFIRMATION =
false
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
description, #initialize, parameters, requires_confirmation?, risk_level, #safe_path, summarize, to_schema, tool_name, #truncate
Constructor Details
This class inherits a constructor from RubynCode::Tools::Base
Instance Method Details
#execute(**_params) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/rubyn_code/tools/bundle_install.rb', line 16 def execute(**_params) gemfile_path = File.join(project_root, 'Gemfile') raise Error, 'No Gemfile found in project root. Cannot run bundle install.' unless File.exist?(gemfile_path) stdout, stderr, status = safe_capture3('bundle install', chdir: project_root) build_output(stdout, stderr, status) end |