lib/caboodle/kits/gravatar/gravatar.rb in caboodle-0.2.16 vs lib/caboodle/kits/gravatar/gravatar.rb in caboodle-0.2.18

- old
+ new

@@ -1,15 +1,17 @@ require 'digest/md5' -class Caboodle::Gravatar < Caboodle::Kit +module Caboodle + class Gravatar < Caboodle::Kit - description "Sets the logo of the site to your gravatar.com image" + description "Sets the logo of the site to your gravatar.com image" - optional [:email] + 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}" + configure do + if Site.logo_url.to_s.blank? && !Site.email.to_s.blank? + hash = Digest::MD5.hexdigest(Site.email) + Site.logo_url = "http://www.gravatar.com/avatar/#{hash}" + end end end end \ No newline at end of file