This code makes Santa Claus vomit with rage
This code makes Santa Claus vomit with rage

Okay really, it's not that bad, but it seems like it could use a little bit of
sprucing up, and I'm looking for a bit of low hanging fruit for my first
commit to rstat.us

Here's a brief synopsis:

* Both gravatar_url and valid_gravatar? need the path to the avatar on
  gravatar's servers. Extract this as a method.

* valid_gravatar? seems to only test for one failure case. What if gravatar
  is returning 500 errors? Do you really want to show a broken image, or would
  you prefer to show the default avatar? This change assumes the latter.
  Unless gravatar.com returns a 200 response, it's assumed the user doesn't
  have a valid gravatar. Note this still doesn't cover all failure cases
  (e.g. SocketError). It'd probably be good to assume that if this method
  raises any exceptions the user doesn't have a valid gravatar.

* Made GRAVATAR_HOST a constant instead of a method, for speed!

I now pronounce this code sufficiently roflscale

carols10cents/rstat.us,carols10cents/rstat.us,carols10cents/rstat.us