lib/rubygems/commands/check_command.rb in rubygems-update-3.4.22 vs lib/rubygems/commands/check_command.rb in rubygems-update-3.5.0
- old
+ new
@@ -8,11 +8,11 @@
class Gem::Commands::CheckCommand < Gem::Command
include Gem::VersionOption
def initialize
super "check", "Check a gem repository for added or missing files",
- :alien => true, :doctor => false, :dry_run => false, :gems => true
+ alien: true, doctor: false, dry_run: false, gems: true
add_option("-a", "--[no-]alien",
'Report "unmanaged" or rogue files in the',
"gem repository") do |value, options|
options[:alien] = value
@@ -46,17 +46,17 @@
rescue StandardError
[]
end
Gem::Validator.new.alien(gems).sort.each do |key, val|
- unless val.empty?
+ if val.empty?
+ say "#{key} is error-free" if Gem.configuration.verbose
+ else
say "#{key} has #{val.size} problems"
val.each do |error_entry|
say " #{error_entry.path}:"
say " #{error_entry.problem}"
end
- else
- say "#{key} is error-free" if Gem.configuration.verbose
end
say
end
end