aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/blog_comment.rb7
-rw-r--r--app/views/blog/posts/_comment.html.erb1
-rw-r--r--changelog.md5
-rw-r--r--config/locales/de.yml2
-rw-r--r--lib/refinery/blog/version.rb2
-rw-r--r--readme.md4
-rw-r--r--refinerycms-blog.gemspec4
7 files changed, 20 insertions, 5 deletions
diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb
index 13aceb1..6216cc2 100644
--- a/app/models/blog_comment.rb
+++ b/app/models/blog_comment.rb
@@ -19,6 +19,13 @@ class BlogComment < ActiveRecord::Base
scope :approved, :conditions => {:state => 'approved'}
scope :rejected, :conditions => {:state => 'rejected'}
+ def avatar_url(options = {})
+ options = {:size => 60}
+ require 'digest/md5'
+ size = ("?s=#{options[:size]}" if options[:size])
+ "http://gravatar.com/avatar/#{Digest::MD5.hexdigest(self.email.to_s.strip.downcase)}#{size}.jpg"
+ end
+
def approve!
self.update_attribute(:state, 'approved')
end
diff --git a/app/views/blog/posts/_comment.html.erb b/app/views/blog/posts/_comment.html.erb
index ba4a508..17b2002 100644
--- a/app/views/blog/posts/_comment.html.erb
+++ b/app/views/blog/posts/_comment.html.erb
@@ -1,4 +1,5 @@
<article class='blog_comment_message' id='<%= "comment-#{comment.to_param}" %>'>
+ <%= image_tag comment.avatar_url, :alt => comment.name, :class => 'avatar' %>
<%= simple_format auto_link(comment.message.to_s) %>
<footer class='blog_comment_author'>
<p>
diff --git a/changelog.md b/changelog.md
index 8094a91..1851d2d 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,8 @@
+## 1.5 [28 May 2011]
+
+* Added Gravatar support. [parndt](https://github.com/parndt)
+* Added support for Refinery CMS 1.0.0 and above. [parndt](https://github.com/parndt)
+
## 1.4 [26 May 2011]
* Spanish language fixes [scambra](https://github.com/scambra)
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 1209b5f..b7927f6 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -101,6 +101,8 @@ de:
singular: Kommentar
none: Keine Kommentare
archives: Archiv
+ tags:
+ title: Kategorien
categories:
show:
no_posts: Es sind noch keine Artikel vorhanden.
diff --git a/lib/refinery/blog/version.rb b/lib/refinery/blog/version.rb
index fc2d268..3899eeb 100644
--- a/lib/refinery/blog/version.rb
+++ b/lib/refinery/blog/version.rb
@@ -3,7 +3,7 @@ module Refinery
class Version
@major = 1
@minor = 5
- @tiny = 0
+ @tiny = 2
class << self
attr_reader :major, :minor, :tiny
diff --git a/readme.md b/readme.md
index d8a07c5..c8b8e3a 100644
--- a/readme.md
+++ b/readme.md
@@ -11,13 +11,13 @@ Options:
## Requirements
-Refinery CMS version 0.9.8 or above.
+Refinery CMS version 1.0.0 or above.
## Install
Open up your ``Gemfile`` and add at the bottom this line:
- gem 'refinerycms-blog', '~> 1.3'
+ gem 'refinerycms-blog', '~> 1.5'
Now, run ``bundle install``
diff --git a/refinerycms-blog.gemspec b/refinerycms-blog.gemspec
index 01e00d4..b645f83 100644
--- a/refinerycms-blog.gemspec
+++ b/refinerycms-blog.gemspec
@@ -1,8 +1,8 @@
Gem::Specification.new do |s|
s.name = %q{refinerycms-blog}
- s.version = %q{1.5.0}
+ s.version = %q{1.5.2}
s.description = %q{A really straightforward open source Ruby on Rails blog engine designed for integration with RefineryCMS.}
- s.date = %q{2011-05-26}
+ s.date = %q{2011-05-28}
s.summary = %q{Ruby on Rails blogging engine for RefineryCMS.}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com/blog}