Sha256: 5e3064fcc95a2e1ba08bb0350b55f39d43202efb469acc88a9f4a9a722ba81ad

Contents?: true

Size: 403 Bytes

Versions: 2

Compression:

Stored size: 403 Bytes

Contents

require 'digest/md5'

class Caboodle::Gravatar < Caboodle::Kit
  
  description "Sets the logo of the site to your gravatar.com image"
  
  optional [:email]
  
  configure do
    if Caboodle::Site.logo_url.to_s.blank? && !Caboodle::Site.email.to_s.blank?
      hash = Digest::MD5.hexdigest(Caboodle::Site.email)
      Caboodle::Site.logo_url = "http://www.gravatar.com/avatar/#{hash}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
caboodle-0.2.16 lib/caboodle/kits/gravatar/gravatar.rb
caboodle-0.2.15 lib/caboodle/kits/gravatar/gravatar.rb