lib/rubygems/commands/check_command.rb in rubygems-update-1.4.2 vs lib/rubygems/commands/check_command.rb in rubygems-update-1.5.0
- old
+ new
@@ -19,29 +19,14 @@
add_option('-a', '--alien', "Report 'unmanaged' or rogue files in the",
"gem repository") do |value, options|
options[:alien] = true
end
- add_option('-v', '--verbose', "Spew more words") do |value, options|
- options[:verbose] = true
- end
-
- add_option('-t', '--test', "Run unit tests for gem") do |value, options|
- options[:test] = true
- end
-
- add_version_option 'run tests for'
+ add_version_option 'check'
end
def execute
- if options[:test]
- version = options[:version] || Gem::Requirement.default
- dep = Gem::Dependency.new get_one_gem_name, version
- gem_spec = Gem::SourceIndex.from_installed_gems.search(dep).first
- Gem::Validator.new.unit_test(gem_spec)
- end
-
if options[:alien]
say "Performing the 'alien' operation"
say
gems = get_all_gem_names rescue []
Gem::Validator.new.alien(gems).sort.each do |key, val|
@@ -50,10 +35,10 @@
val.each do |error_entry|
say " #{error_entry.path}:"
say " #{error_entry.problem}"
end
else
- say "#{key} is error-free" if options[:verbose]
+ say "#{key} is error-free" if Gem.configuration.verbose
end
say
end
end