public
Description: robots.txt parser
Homepage:
Clone URL: git://github.com/fizx/robots.git
Kyle Maxwell (author)
Tue Mar 24 15:11:13 -0700 2009
commit  f3cdfc5020785e4e34654a29b2e75b5b9ca70b5b
tree    6c9d0f1da7c5953f46545e91b66b12097298100c
parent  d45462fd2f26e9e1a14986e04da28cb498af80e1
robots /
name age message
file .gitignore Loading commit data...
file CHANGELOG
file README Sun Aug 10 23:32:10 -0700 2008 doc patch [fizx]
file Rakefile
directory lib/
file robots.gemspec
directory test/ Wed Dec 10 12:23:56 -0800 2008 merged [Kyle Maxwell]
README
A simple Ruby library to parse robots.txt.

Usage:

  robots = Robots.new "Some User Agent"
  assert robots.allowed?("http://www.yelp.com/foo")
  assert !robots.allowed?("http://www.yelp.com/mail?foo=bar")
  robots.other_values("http://foo.com") # gets misc. key/values (i.e. sitemaps)
  
If you want caching, you're on your own.  I suggest marshalling an instance of the parser.  

Copyright (c) 2008 Kyle Maxwell

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.