Libraries


All the libraries here can be downloaded as either a gem or as a gzipped tar file from the RC Tools Rubyforge project.

There's also a mailing list for Robot Co-op's libraries.

cached_model

gem install cached_model

cached_model is an abstract subclass of Rails ActiveRecord::Base that caches ActiveRecord::Base objects in memcached using memcache-client.

You can read all about how to use cached_model in your Rails application in the documentation.

geocoder-us

gem install geocoder-us

geocoder-us is a library that accesses geocoder.us's geocoding API to look up an addresses coordinates.

You can read all about how to use geocoder-us in the documentation.

google-geocode

gem install google-geocode

google-geocode is a library that accesses the Google Geocoding API to look up an addresses coordinates.

You can read all about how to use google-geocode in the documentation.

memcache-client

gem install memcache-client

memcache-client is a pure Ruby client for memcached. It is nearly a drop-in replacement for Ruby MemCache.

You can read all about how to use memcache-client in the documentation.

mem_cache_fragment_store

gem install mem_cache_fragment_store

mem_cache_fragment_store is a better fragment store than Rails' built-in MemCacheStore. It correctly handles errors and doesn't duplicate the cache object.

You can read all about how to use mem_cache_fragment_store in the documentation.

metacarter-geoparser

gem install metacarta-geoparser

metacarta-geoparser is a library that accesses MetaCarta's GeoParser API to look up locations.

You can read about how to use metacarta-geoparser in the documentation.

mogilefs-client

gem install mogilefs-client

mogilefs is a pure Ruby client for MogileFS. Currently only NFS mode is proven to work. HTTP mode is implemented but has not been battle-tested. Use HTTP mode at your own risk and file any bugs you find.

You can read all about how to use mogilefs in the documentation.

rc-rest

gem install rc-rest

rc-rest is a small library that makes it easy to implement and test REST-like APIs. rc-rest is used by many of the API bindings on this page. You can read the documentation to learn about how to implement an API library using rc-rest.

socket_accept_filter

gem install socket_accept_filter

Socket#set_accept_filter allows you to enable accept filters on server sockets.

In FreeBSD accept filters allow you to delay the return from an accept() call until enough data arrives on the connection for processing avoiding extra context switches while waiting for the missing data.

Consult the accf_data(9), accf_http(9) and accept_filter(9) man pages for further details.

You can read all about how to use socket_accept_filter in the documentation.

socket_sendfile

gem install socket_sendfile

Socket#sendfile implements sendfile(2) for sending files without copying data to the process. See the sendfile(2) manual page for more details.

Note that your system must support the sendfile(2) system call the same way FreeBSD does for Socket#sendfile to work.

You can read all about how to use socket_sendfile in the documentation.

webrick-high-performance

gem install webrick-high-performance

WEBrick High Performance adds a new HTTP server class that takes advantage of sendfile(2) and fork(2) to drastically improve static file server performance.

Note that webrick-high-performance depends upon socket_sendfile and falls under the FreeBSD-like sendfile restriction.

You can read all about how to use webrick-high-performance in the documentation.

Yahoo API libraries

gem install yahoo-search
gem install yahoo-geocode

yahoo-search and yahoo-geocode implement bindings to Yahoo's web search, local search and geocoding APIs.

There is both yahoo-search documentation and yahoo-geocode documentation.

There is also a shared yahoo gem that takes care of implementing additional Yahoo APIs. You can install it as a gem:

gem install yahoo

There is also yahoo documentation.