Aggravatar

You give it an email, it gives you a Gravatar URL. What more do you want?

Installation

Add this line to your application's Gemfile:

gem 'aggravatar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install aggravatar

Usage

require "aggravatar"

Aggravatar.gravatar_url "[email protected]", size: 200, rating: "g", force_default: true
# => "http://www.gravatar.com/avatar/11591979f29ab9c2bb58868232d07b88?size=200&rating=g&forcedefault=y

Aggravatar.secure_gravatar_url "[email protected]", default: "http://example.com/images/avatar.jpg"
# => "https://secure.gravatar.com/avatar/11591979f29ab9c2bb58868232d07b88?default=http%3A%2F%2Fexample.com%2Fimages%2Favatar.jpg"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request