governor_comments 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/app/controllers/governor/comments_controller.rb +2 -3
- data/app/views/governor/comments/_form.html.erb +1 -1
- data/governor_comments.gemspec +2 -2
- data/lib/governor_comments/comment.rb +1 -0
- data/spec/controllers/governor/comments_controller_spec.rb +2 -0
- data/spec/rails_app/Gemfile.lock +4 -4
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
@@ -10,13 +10,12 @@ module Governor
|
|
10
10
|
helper Governor::Controllers::Helpers
|
11
11
|
|
12
12
|
def create
|
13
|
-
params[:comment][:commenter] = governor_logged_in? ? the_governor : Guest.
|
14
|
-
|
13
|
+
params[:comment][:commenter] = governor_logged_in? ? the_governor : Guest.find_or_create_by_email(params[:comment][:commenter])
|
15
14
|
@comment = resource.comments.new(params[:comment])
|
16
15
|
|
17
16
|
respond_to do |format|
|
18
17
|
if @comment.save
|
19
|
-
@comment.update_attribute(:hidden, true) if @comment.respond_to?(:spam) and @comment.spam?
|
18
|
+
@comment.update_attribute(:hidden, true) if @comment.respond_to?(:spam?) and @comment.spam?
|
20
19
|
flash[:notice] = 'Your comment was successfully added.'
|
21
20
|
format.html { redirect_to resource }
|
22
21
|
format.xml { render :xml => @comment, :status => :created, :location => @comment }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= f.error_messages %>
|
2
2
|
<% if f.object.new_record? && !governor_logged_in? %>
|
3
|
-
<%= fields_for :commenter, Guest.new do |gf| %>
|
3
|
+
<%= f.fields_for :commenter, Guest.new do |gf| %>
|
4
4
|
<%= gf.text_field :name %> <%= gf.label :name, 'Name (required)' %><br/>
|
5
5
|
<%= gf.text_field :email %> <%= gf.label :email, 'E-Mail (required, will not be published)' %><br/>
|
6
6
|
<%= gf.text_field :website %> <%= gf.label :website %><br/>
|
data/governor_comments.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{governor_comments}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Liam Morley"]
|
12
|
-
s.date = %q{2011-05-
|
12
|
+
s.date = %q{2011-05-17}
|
13
13
|
s.description = %q{Comments plugin for the Rails 3-based Governor blogging system.}
|
14
14
|
s.email = %q{liam@carpeliam.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/rails_app/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/carpeliam/governor.git
|
3
|
-
revision:
|
3
|
+
revision: c1867661afb7659c2bdfa6aee5afda6d2a93c8a3
|
4
4
|
specs:
|
5
|
-
governor (0.5.
|
6
|
-
rails (
|
5
|
+
governor (0.5.7)
|
6
|
+
rails (>= 3.0.5)
|
7
7
|
|
8
8
|
PATH
|
9
9
|
remote: ../..
|
10
10
|
specs:
|
11
|
-
governor_comments (0.2.
|
11
|
+
governor_comments (0.2.3)
|
12
12
|
governor (>= 0.5.0)
|
13
13
|
rails (~> 3.0.5)
|
14
14
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: governor_comments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Liam Morley
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-
|
18
|
+
date: 2011-05-17 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|