Class: Bundler::Alive::Doctor
- Inherits:
-
Object
- Object
- Bundler::Alive::Doctor
- Defined in:
- lib/bundler/alive/doctor.rb
Overview
Diagnoses a Gemfile.lock
Instance Method Summary collapse
-
#diagnose ⇒ Report
Diagnoses gems in Gemfile.lock.
-
#initialize(lock_file:, config_file:, ignore_gems:, follow_redirect: false) ⇒ Doctor
constructor
A new instance of Doctor.
Constructor Details
#initialize(lock_file:, config_file:, ignore_gems:, follow_redirect: false) ⇒ Doctor
A new instance of Doctor
19 20 21 22 23 24 25 26 |
# File 'lib/bundler/alive/doctor.rb', line 19 def initialize(lock_file:, config_file:, ignore_gems:, follow_redirect: false) @lock_file = lock_file @gem_client = Client::GemsApiClient.new(config_path: config_file, follow_redirect: follow_redirect) @ignore_gems = ignore_gems @result = nil @rate_limit_exceeded = false @error_messages = [] end |
Instance Method Details
#diagnose ⇒ Report
Diagnoses gems in Gemfile.lock
39 40 41 42 43 44 45 46 |
# File 'lib/bundler/alive/doctor.rb', line 39 def diagnose = "#{collection_from_gemfile.total_size + ignore_gems.size} gems are in Gemfile.lock" = "#{} (#{ignore_gems.size} gems are ignored)" if ignore_gems.size.positive? $stdout.puts result = _diagnose Report.new(result) end |