Commit 221a2e73 authored by Holger Just's avatar Holger Just

Merge branch 'release-v3.2.1' into stable

parents e6e057d1 c9d14106
......@@ -27,6 +27,8 @@ branches:
- unstable
- master
- stable
- /^stable-.*$/
- /^release-.*$/
notifications:
email: false
irc: "irc.freenode.org#chiliproject"
......@@ -959,7 +959,10 @@ module ApplicationHelper
def gravatar(email, options={})
gravatarify_options = {}
gravatarify_options[:secure] = options.delete :ssl
[:default, :size, :rating, :filetype].each {|key| gravatarify_options[:key] = options.delete :key}
[:default, :size, :rating, :filetype].each {|key| gravatarify_options[key] = options.delete key}
# Default size is 50x50 px
gravatarify_options[:size] ||= 50
options[:class] ||= 'gravatar'
gravatarify_options[:html] = options
gravatar_tag email, gravatarify_options
end
......
= ChiliProject Changelog
== 2012-06-10 v3.2.1
* Bug #1034: Gravatar
== 2012-06-09 v3.2.0
* Bug #844: Set autocomplete=off for some fields in Registration form
......
......@@ -19,7 +19,7 @@ module ChiliProject
MAJOR = 3
MINOR = 2
PATCH = 0
PATCH = 1
TINY = PATCH # Redmine compat
# Used by semver to define the special version (if any).
......
......@@ -664,6 +664,14 @@ RAW
Setting.gravatar_enabled = '1'
assert avatar(User.find_by_mail('jsmith@somenet.foo')).include?(Digest::MD5.hexdigest('jsmith@somenet.foo'))
assert avatar('jsmith <jsmith@somenet.foo>').include?(Digest::MD5.hexdigest('jsmith@somenet.foo'))
# Default size is 50
assert avatar('jsmith <jsmith@somenet.foo>').include?('s=50')
assert avatar('jsmith <jsmith@somenet.foo>', :size => 24).include?('s=24')
# Non-avatar options should be considered html options
assert avatar('jsmith <jsmith@somenet.foo>', :title => 'John Smith').include?('title="John Smith"')
# The default class of the img tag should be gravatar
assert avatar('jsmith <jsmith@somenet.foo>').include?('class="gravatar"')
assert !avatar('jsmith <jsmith@somenet.foo>', :class => 'picture').include?('class="gravatar"')
assert_nil avatar('jsmith')
assert_nil avatar(nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment