Merge branch 'release-v3.2.1' into stable
This commit is contained in:
commit
221a2e73ce
|
@ -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
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
= 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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue