Class: RailsAiBridge::Doctor::Checkers::GemsChecker

Inherits:
BaseChecker
  • Object
show all
Defined in:
lib/rails_ai_bridge/doctor/checkers/gems_checker.rb

Overview

Verifies Gemfile.lock is present for dependency introspection.

Instance Attribute Summary

Attributes inherited from BaseChecker

#app

Instance Method Summary collapse

Methods inherited from BaseChecker

#initialize

Constructor Details

This class inherits a constructor from RailsAiBridge::Doctor::Checkers::BaseChecker

Instance Method Details

#callDoctor::Check

Returns :pass when lockfile exists; :warn otherwise.

Returns:

  • (Doctor::Check)

    :pass when lockfile exists; :warn otherwise



9
10
11
12
13
14
15
16
17
# File 'lib/rails_ai_bridge/doctor/checkers/gems_checker.rb', line 9

def call
  lock_path = File.join(app.root, 'Gemfile.lock')
  check(
    'Gems',
    File.exist?(lock_path),
    pass: { message: 'Gemfile.lock found' },
    fail: { status: :warn, message: 'Gemfile.lock not found', fix: 'Run `bundle install` to generate it' }
  )
end