lib/cohesion.rb in cohesion-0.0.5 vs lib/cohesion.rb in cohesion-0.0.6
- old
+ new
@@ -76,24 +76,27 @@
else
puts " \e[32m\u2713\e[0m"
end
end
+ issues = []
if failures.count == 0
puts "All links working!"
else
puts "Failed urls:"
failures.each do |f|
+ inbound_links = statistics.inbound_links_for(f[:url])
+ issues << {:issue => f, :inbound => inbound_links}
puts ""
puts "#{f[:url]} [ #{f[:status_code]} ]"
- statistics.inbound_links_for(f[:url]).each do |inbound_link|
+ inbound_links.each do |inbound_link|
puts " - #{inbound_link}"
end
end
puts ""
end
puts
- failures
+ return issues
end
end
end