Use Doctor#healthy? and ensure _all_ items are checked before process quits.

This commit is contained in:
Parker Moore 2013-08-17 15:16:14 -04:00
parent 7d26be5102
commit 8b8fa4da4e
1 changed files with 7 additions and 7 deletions

View File

@ -6,18 +6,18 @@ module Jekyll
site = Jekyll::Site.new(options)
site.read
if unhealthy(site)
abort
else
if healthy?(site)
Jekyll.logger.info "Your test results", "are in. Everything looks fine."
else
abort
end
end
def unhealthy(site)
def healthy?(site)
[
deprecated_relative_permalinks(site),
conflicting_urls(site)
].any?
!deprecated_relative_permalinks(site),
!conflicting_urls(site)
].all?
end
def deprecated_relative_permalinks(site)