Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a test case for a robots.txt with just user-agent & sitemap and…

… no blank line between them, and got it to work
  • Loading branch information...
commit ebb6b48f562260056ed461d6331a7dbbc697bacc 1 parent e8cc0d1
@prakashmurthy prakashmurthy authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/webrobots/robotstxt.ry
  2. +1 −1  test/test_webrobots.rb
View
2  lib/webrobots/robotstxt.ry
@@ -341,7 +341,7 @@ Disallow: /
else
@options[ruleline.token.downcase] = ruleline.value
end
- }
+ } if ruleslines
@acls.replace @acls.sort_by { |x|
[-x.value.length, x.is_a?(AllowLine) ? -1 : 0]
}
View
2  test/test_webrobots.rb
@@ -674,7 +674,7 @@ def get uri
should "be properly parsed" do
assert @robots.allowed?("http://site1.example.com/foo")
- # assert_equal(["http://site1.example.com/text/sitemap.xml"], @robots.sitemaps("http://site1.example.com/"))
+ assert_equal(["http://site1.example.com/text/sitemap.xml"], @robots.sitemaps("http://site1.example.com/"))
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.