Class: BundlerMCP::EnvironmentChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler_mcp/environment_checker.rb

Overview

Responsible for checking the environment to make sure Bundler can find gems

Class Method Summary collapse

Class Method Details

.check!Pathname

Check for a Gemfile and raise an error if not found

Returns:

  • (Pathname)

    The path to the Gemfile

Raises:

  • (GemfileNotFound)

    If Bundler cannot find a Gemfile; can be avoided by setting BUNDLE_GEMFILE



13
14
15
16
17
# File 'lib/bundler_mcp/environment_checker.rb', line 13

def self.check!
  raise GemfileNotFound unless Bundler.default_gemfile.exist?

  Bundler.default_gemfile
end