Removes potential spaces in robots.txt entries - Ref #819

This commit is contained in:
erwanlr
2015-05-08 09:50:51 +01:00
parent b22550ea55
commit b5d5c4177d
3 changed files with 6 additions and 4 deletions

View File

@@ -15,7 +15,6 @@ class WebSite
@uri.clone.merge('robots.txt').to_s
end
# Parse robots.txt
# @return [ Array ] URLs generated from robots.txt
def parse_robots_txt
@@ -40,9 +39,9 @@ class WebSite
entries.each do |d|
begin
temp = @uri.clone
temp.path = d
temp.path = d.strip
rescue URI::Error
temp = d
temp = d.strip
end
return_object << temp.to_s
end