loudmouth 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/README.md +63 -11
- data/VERSION +1 -1
- data/app/controllers/loudmouth/comments_controller.rb +29 -7
- data/app/views/loudmouth/comments/_comment.html.haml +10 -14
- data/app/views/loudmouth/comments/_comment_form.html.haml +4 -4
- data/app/views/loudmouth/comments/index.html.haml +1 -3
- data/lib/extensions/active_record.rb +17 -0
- data/lib/extensions/helper.rb +12 -3
- data/lib/generators/loudmouth/templates/comments_controller.rb +48 -22
- data/lib/generators/loudmouth/templates/loudmouth_initializer.rb +1 -1
- data/lib/loudmouth.rb +6 -5
- data/loudmouth.gemspec +6 -2
- metadata +42 -27
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,6 +3,7 @@ GEM
|
|
3
3
|
specs:
|
4
4
|
acts_as_tree (0.1.1)
|
5
5
|
git (1.2.5)
|
6
|
+
haml (3.1.2)
|
6
7
|
jeweler (1.6.0)
|
7
8
|
bundler (~> 1.0.0)
|
8
9
|
git (>= 1.2.5)
|
@@ -17,6 +18,7 @@ PLATFORMS
|
|
17
18
|
DEPENDENCIES
|
18
19
|
acts_as_tree
|
19
20
|
bundler (~> 1.0.0)
|
21
|
+
haml
|
20
22
|
jeweler (~> 1.6.0)
|
21
23
|
rcov
|
22
24
|
shoulda
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
Loudmouth
|
2
|
-
|
1
|
+
## Loudmouth
|
2
|
+
|
3
3
|
|
4
4
|
Loudmouth adds comments to any model.
|
5
5
|
|
6
|
-
Installation
|
7
|
-
|
6
|
+
## Installation
|
7
|
+
|
8
8
|
Install the gem (or add to your Gemfile & bundle install)
|
9
9
|
|
10
10
|
gem install loudmouth
|
@@ -13,16 +13,24 @@ Run the loudmouth installer to copy an initializer file to your app.
|
|
13
13
|
|
14
14
|
rails g loudmouth:install
|
15
15
|
|
16
|
-
Usage
|
17
|
-
|
16
|
+
## Usage
|
17
|
+
|
18
18
|
Assuming you want to have 'users' comment on 'articles' add the following to your routes.rb:
|
19
19
|
|
20
20
|
comments_on :articles, :by => :users
|
21
|
-
|
21
|
+
|
22
22
|
run the generator to create the comment model (ArticleComments):
|
23
23
|
|
24
24
|
rails generate loudmouth Article User
|
25
25
|
|
26
|
+
run the new migrations
|
27
|
+
|
28
|
+
rake db:migrate
|
29
|
+
|
30
|
+
add the following to your Article model (app/models/article.rb)
|
31
|
+
|
32
|
+
loudmouths_can_comment
|
33
|
+
|
26
34
|
and you get nested routes like these:
|
27
35
|
|
28
36
|
/articles/:article_id/comments
|
@@ -31,8 +39,47 @@ and you get nested routes like these:
|
|
31
39
|
|
32
40
|
Browse to an article and append '/comments' to the end of the URL.
|
33
41
|
|
34
|
-
|
35
|
-
|
42
|
+
If you want to render comments in-line on Articles#show
|
43
|
+
|
44
|
+
render_comments_for(@article)
|
45
|
+
|
46
|
+
or to render a new comment form
|
47
|
+
|
48
|
+
render_comment_form_for(@article)
|
49
|
+
|
50
|
+
## Advanced Usage
|
51
|
+
|
52
|
+
### Customizing
|
53
|
+
|
54
|
+
To further customize loudmouth, edit the values in the installed initializer file (config/initializers/loudmouth.rb):
|
55
|
+
|
56
|
+
# Optionally specify a layout to use for the loudmouth controller
|
57
|
+
config.use_layout = ''
|
58
|
+
|
59
|
+
# Default comment text for the new comment form
|
60
|
+
config.new_comment_content = "Enter new Comment..."
|
61
|
+
|
62
|
+
### Overriding the Loudmouth Controller
|
63
|
+
|
64
|
+
Any loudmouth method can be overridden. And hey...there's a generator for that!
|
65
|
+
|
66
|
+
rails g loudmouth:override_controller
|
67
|
+
|
68
|
+
This will install a loudmouth override controller into your application (into app/controllers).
|
69
|
+
|
70
|
+
To activate the override controller, make sure to update all of your comments_on calls in your routes.rb file:
|
71
|
+
|
72
|
+
comments_on :articles, :by => :users, :controller => 'comments'
|
73
|
+
|
74
|
+
Some common functions to override:
|
75
|
+
|
76
|
+
* **after\_create\_path** - where to direct the user after successfully posting a comment
|
77
|
+
* **validate\_destroy** - validates whether the current user can delete a comment (e.g. admin or comment author)
|
78
|
+
* **after\_destroy\_path** - where to direct the user after successfully deleting a comment
|
79
|
+
|
80
|
+
See the installed override controller [source](https://github.com/pglombardo/loudmouth/blob/master/lib/generators/loudmouth/templates/comments_controller.rb) for full details.
|
81
|
+
|
82
|
+
## Contributing to loudmouth
|
36
83
|
|
37
84
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
38
85
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
@@ -42,8 +89,13 @@ Contributing to loudmouth
|
|
42
89
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
43
90
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
44
91
|
|
45
|
-
|
46
|
-
|
92
|
+
## Background
|
93
|
+
|
94
|
+
This gem was built for [Gameface](http://g.ameface.com) to unify duplicate commenting code.
|
95
|
+
|
96
|
+
Thanks to [plataformatec/devise](https://github.com/plataformatec/devise) and [aarongough/has\_threaded\_comments](https://github.com/aarongough/has_threaded_comments) for insight into how gems work.
|
97
|
+
|
98
|
+
## Copyright
|
47
99
|
|
48
100
|
Copyright (c) 2011 Peter Giacomo Lombardo. See LICENSE.txt for
|
49
101
|
further details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
@@ -3,7 +3,7 @@ class Loudmouth::CommentsController < ApplicationController
|
|
3
3
|
before_filter :authenticate_user!, :except => [ :index ]
|
4
4
|
|
5
5
|
helper_method :topic, :topic_c, :topic_comment, :topic_comment_c, :user, :user_c
|
6
|
-
helper_method :new_comment_content
|
6
|
+
helper_method :new_comment_content, :validate_create, :validate_destroy
|
7
7
|
|
8
8
|
def index
|
9
9
|
@topic = topic_c.find(params[topic.foreign_key.to_sym])
|
@@ -22,9 +22,12 @@ class Loudmouth::CommentsController < ApplicationController
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def create
|
25
|
+
@topic = topic_c.find(params[topic_comment.to_sym][topic.foreign_key.to_sym])
|
26
|
+
|
27
|
+
redirect_to :back unless validate_create(@topic)
|
28
|
+
|
25
29
|
@comment = topic_comment_c.new(params[topic_comment.to_sym])
|
26
30
|
@user = user_c.find(params[topic_comment.to_sym][('author_' + user.foreign_key).to_sym])
|
27
|
-
@topic = topic_c.find(params[topic_comment.to_sym][topic.foreign_key.to_sym])
|
28
31
|
|
29
32
|
if params[topic_comment.to_sym][:content] == new_comment_content()
|
30
33
|
flash[:error] = new_comment_content().
|
@@ -115,28 +118,47 @@ class Loudmouth::CommentsController < ApplicationController
|
|
115
118
|
Loudmouth.new_comment_content
|
116
119
|
end
|
117
120
|
|
118
|
-
|
119
|
-
|
121
|
+
################
|
122
|
+
# Paths
|
123
|
+
################
|
120
124
|
|
121
|
-
|
125
|
+
# The path the user is redirected to after a successful update of a comment
|
126
|
+
def after_update_path
|
127
|
+
url_for(@topic)
|
122
128
|
end
|
123
129
|
|
130
|
+
# The path the user is redirected to after a successful creation of a comment
|
124
131
|
def after_create_path
|
125
132
|
url_for(@user)
|
126
133
|
end
|
127
134
|
|
135
|
+
# The path the user is redirected to after a successful destroy of a comment
|
128
136
|
def after_destroy_path
|
129
|
-
|
137
|
+
url_for(@topic)
|
138
|
+
end
|
139
|
+
|
140
|
+
######################
|
141
|
+
# Validation Routines
|
142
|
+
######################
|
143
|
+
|
144
|
+
# Used to validate that the current user can comment on topic.
|
145
|
+
# Override to provide application specific commenting validation
|
146
|
+
def validate_create(topic)
|
147
|
+
true
|
130
148
|
end
|
131
149
|
|
150
|
+
# Used to validate that the current user can destroy the comment.
|
151
|
+
# Override to provide application specific validation
|
132
152
|
def validate_destroy(comment)
|
133
|
-
|
153
|
+
|
154
|
+
# Check if there are corresponding instance variables for
|
134
155
|
# topic and user. If so attempt to validate with those.
|
135
156
|
# Otherwise, this function can be overridden.
|
136
157
|
user = instance_variable_get(:"@#{user}")
|
137
158
|
topic = instance_variable_get(:"@#{topic}")
|
138
159
|
|
139
160
|
if user and topic
|
161
|
+
# is the comment owner?
|
140
162
|
if user.id == topic.send(:"#{user.foreign_key}")
|
141
163
|
return true
|
142
164
|
end
|
@@ -1,14 +1,10 @@
|
|
1
|
-
|
2
|
-
%
|
3
|
-
%
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
= link_to "Delete", topic_comment_path(topic, comment), :method => :delete, :confirm => "This will delete the comment from your profile. Are you sure?"
|
12
|
-
|
13
|
-
/ - if comment.children and comment.children.length > 0
|
14
|
-
/ = indented_render 1, :partial => 'loudmouth/comments/comment', :collection => comment.children
|
1
|
+
%table{ :style => 'background: #fff; border: 1px solid #ccc;' }
|
2
|
+
%tr{ :style => 'border: 1px solid #ccc; padding: 5px;' }
|
3
|
+
%td{ :style => 'border: 1px solid #ccc; padding: 5px;' }
|
4
|
+
- cc = sanitize(cc)
|
5
|
+
- cc = simple_format(comment.content)
|
6
|
+
= auto_link(cc).html_safe
|
7
|
+
%tr{ :style => 'border: 1px solid #ccc; padding: 5px;' }
|
8
|
+
%th{ :style => 'background: #eee; text-align: right; font-size: 80%;' }
|
9
|
+
== Posted #{time_ago_in_words(comment.created_at)} ago
|
10
|
+
|
@@ -17,15 +17,15 @@
|
|
17
17
|
|
18
18
|
%h3 New Comment
|
19
19
|
|
20
|
-
- author_key = 'author_' + user.class.name.underscore.
|
21
|
-
- topic_comment = topic.class.name.underscore
|
20
|
+
- author_key = 'author_' + user.class.name.underscore.foreign_key
|
21
|
+
- topic_comment = topic.class.name.underscore + '_comment'
|
22
22
|
|
23
|
-
= form_for topic_comment.to_sym, :url => send("#{topic.class.name.underscore
|
23
|
+
= form_for topic_comment.to_sym, :url => send("#{topic.class.name.underscore}_comments_path", topic) do |f|
|
24
24
|
%table
|
25
25
|
%tr
|
26
26
|
%td{ :style => 'width: 80%;' }
|
27
27
|
= f.text_area :content, :style => 'width: 100%; height: 50px;', :value => content, :onfocus => "prepareTextField(this);", :onblur => "revertTextField(this);"
|
28
|
-
= f.hidden_field topic.class.name.underscore.
|
28
|
+
= f.hidden_field topic.class.name.underscore.foreign_key.to_sym, { :value => topic.id }
|
29
29
|
= f.hidden_field author_key.to_sym, { :value => user.id }
|
30
30
|
%tr
|
31
31
|
%td{ :style => 'text-align: right;' }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module LoudmouthExtension
|
2
|
+
def self.included(base)
|
3
|
+
base.send :extend, ClassMethods
|
4
|
+
end
|
5
|
+
|
6
|
+
module ClassMethods
|
7
|
+
def loudmouths_can_comment(options = {})
|
8
|
+
has_many :comments, :class_name => "#{self.name}Comment", :dependent => :destroy, :order => 'created_at DESC'
|
9
|
+
send :include, InstanceMethods
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module InstanceMethods
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
ActiveRecord::Base.send :include, LoudmouthExtension
|
data/lib/extensions/helper.rb
CHANGED
@@ -2,13 +2,14 @@ module Loudmouth
|
|
2
2
|
module Controllers
|
3
3
|
module Helpers
|
4
4
|
extend ActiveSupport::Concern
|
5
|
+
include ActionView::Helpers::SanitizeHelper
|
5
6
|
|
6
7
|
included do
|
7
|
-
helper_method :render_comment_form_for
|
8
|
+
# helper_method :render_comment_form_for, :render_comments_for
|
8
9
|
end
|
9
10
|
|
10
11
|
def render_comment_form_for(topic, user)
|
11
|
-
unless Loudmouth.treasure_map.has_key?(topic.class.name.underscore.
|
12
|
+
unless Loudmouth.treasure_map.has_key?(topic.class.name.underscore.to_sym)
|
12
13
|
raise "loudmouth not setup for #{topic.class.name.underscore.downcase.to_sym}"
|
13
14
|
end
|
14
15
|
|
@@ -16,8 +17,16 @@ module Loudmouth
|
|
16
17
|
:locals => { :topic => topic, :user => user, :content => Loudmouth.new_comment_content }
|
17
18
|
end
|
18
19
|
|
20
|
+
def render_comments_for(topic)
|
21
|
+
unless Loudmouth.treasure_map.has_key?(topic.class.name.underscore.to_sym)
|
22
|
+
raise "loudmouth not setup for #{topic.class.name.underscore.downcase.to_sym}"
|
23
|
+
end
|
24
|
+
|
25
|
+
render :partial => 'loudmouth/comments/comment', :collection => topic.comments, :as => :comment
|
26
|
+
end
|
27
|
+
|
19
28
|
def topic_comment_path(topic)
|
20
|
-
send("#{topic.class.name.underscore
|
29
|
+
send("#{topic.class.name.underscore}_comments_path", topic)
|
21
30
|
end
|
22
31
|
|
23
32
|
end
|
@@ -12,49 +12,75 @@ class CommentsController < Loudmouth::CommentsController
|
|
12
12
|
# def index
|
13
13
|
# if topic.to_sym == :game
|
14
14
|
# @game = Game.find(params[:game_id])
|
15
|
-
# elsif topic.to_sym == :profile
|
16
|
-
# @profile = Profile.find(params[:profile_id], :include => [ :primary_pic ])
|
17
15
|
# else
|
18
16
|
# raise "unknown model in Comments#index"
|
19
17
|
# end
|
20
18
|
# super
|
21
19
|
# end
|
20
|
+
#
|
21
|
+
# def edit
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# def create
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# def update
|
28
|
+
# end
|
29
|
+
#
|
30
|
+
# def destroy
|
31
|
+
# end
|
22
32
|
|
23
|
-
|
24
|
-
#
|
25
|
-
|
26
|
-
|
33
|
+
################
|
34
|
+
# Paths
|
35
|
+
################
|
36
|
+
|
37
|
+
# The path the user is redirected to after a successful update of a comment
|
38
|
+
# def after_update_path
|
39
|
+
# url_for(@topic)
|
40
|
+
# end
|
41
|
+
|
42
|
+
# The path the user is redirected to after a successful creation of a comment
|
27
43
|
# def after_create_path
|
28
|
-
#
|
29
|
-
# game_comments_path(@game)
|
30
|
-
# elsif topic.to_sym == :profile
|
31
|
-
# profile_comments_path(@profile)
|
32
|
-
# elsif topic.to_sym == :profile_pic
|
33
|
-
# profile_face_path(@profile, @profile_pic)
|
34
|
-
# else
|
35
|
-
# raise "unknown model in Comments#after_create_path"
|
36
|
-
# end
|
44
|
+
# url_for(@user)
|
37
45
|
# end
|
38
46
|
|
39
|
-
#
|
40
|
-
#
|
47
|
+
# The path the user is redirected to after a successful destroy of a comment
|
48
|
+
# def after_destroy_path
|
49
|
+
# url_for(@topic)
|
50
|
+
# end
|
51
|
+
|
52
|
+
######################
|
53
|
+
# Validation Routines
|
54
|
+
######################
|
55
|
+
|
56
|
+
# Used to validate that the current user can comment on topic.
|
57
|
+
# Override to provide application specific commenting validation
|
58
|
+
# def validate_create(topic)
|
59
|
+
# true
|
60
|
+
# end
|
61
|
+
|
62
|
+
# Used to validate that the current user can destroy the comment.
|
63
|
+
# Override to provide application specific validation
|
41
64
|
# Return true or false to indicate whether the current user is authorized to do so.
|
42
65
|
#
|
43
66
|
# def validate_destroy(comment)
|
44
67
|
# [ code to determine if the current user is authorized to destroy comment ]
|
45
68
|
# return true/false
|
46
69
|
# end
|
47
|
-
|
70
|
+
|
71
|
+
######################
|
72
|
+
# Validation Routines
|
73
|
+
######################
|
48
74
|
#
|
49
|
-
# You can have a dynamic layout specified under conditions defined below.
|
75
|
+
# You can have a dynamic layout specified under the conditions defined below.
|
50
76
|
#
|
51
77
|
# def determine_layout
|
52
78
|
# if params.has_key?(:profile_id)
|
53
|
-
# '
|
79
|
+
# 'special_layout'
|
54
80
|
# elsif params.has_key?(:game_id)
|
55
|
-
# '
|
81
|
+
# 'application_layout'
|
56
82
|
# else
|
57
|
-
# '
|
83
|
+
# 'frames_layout'
|
58
84
|
# end
|
59
85
|
# end
|
60
86
|
end
|
data/lib/loudmouth.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "loudmouth"
|
2
2
|
require "rails/routes"
|
3
3
|
require "extensions/helper"
|
4
|
+
require "extensions/active_record"
|
4
5
|
|
5
6
|
module Loudmouth
|
6
7
|
class Engine < Rails::Engine
|
@@ -25,12 +26,12 @@ module Loudmouth
|
|
25
26
|
end
|
26
27
|
|
27
28
|
def self.include_helpers
|
28
|
-
ActiveSupport.on_load(:action_controller) do
|
29
|
-
include Loudmouth::Controllers::Helpers
|
30
|
-
end
|
31
|
-
|
32
|
-
# ActiveSupport.on_load(:action_view) do
|
29
|
+
# ActiveSupport.on_load(:action_controller) do
|
33
30
|
# include Loudmouth::Controllers::Helpers
|
34
31
|
# end
|
32
|
+
|
33
|
+
ActiveSupport.on_load(:action_view) do
|
34
|
+
include Loudmouth::Controllers::Helpers
|
35
|
+
end
|
35
36
|
end
|
36
37
|
end
|
data/loudmouth.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{loudmouth}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Peter Giacomo Lombardo}]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-16}
|
13
13
|
s.description = %q{Loudmouth adds commenting to one or many of your models.}
|
14
14
|
s.email = %q{pglombardo@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"app/views/loudmouth/comments/_comment.html.haml",
|
30
30
|
"app/views/loudmouth/comments/_comment_form.html.haml",
|
31
31
|
"app/views/loudmouth/comments/index.html.haml",
|
32
|
+
"lib/extensions/active_record.rb",
|
32
33
|
"lib/extensions/helper.rb",
|
33
34
|
"lib/generators/loudmouth/install_generator.rb",
|
34
35
|
"lib/generators/loudmouth/loudmouth_generator.rb",
|
@@ -58,12 +59,14 @@ Gem::Specification.new do |s|
|
|
58
59
|
|
59
60
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
60
61
|
s.add_runtime_dependency(%q<acts_as_tree>, [">= 0"])
|
62
|
+
s.add_runtime_dependency(%q<haml>, [">= 0"])
|
61
63
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
62
64
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
63
65
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
|
64
66
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
65
67
|
else
|
66
68
|
s.add_dependency(%q<acts_as_tree>, [">= 0"])
|
69
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
67
70
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
68
71
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
69
72
|
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
@@ -71,6 +74,7 @@ Gem::Specification.new do |s|
|
|
71
74
|
end
|
72
75
|
else
|
73
76
|
s.add_dependency(%q<acts_as_tree>, [">= 0"])
|
77
|
+
s.add_dependency(%q<haml>, [">= 0"])
|
74
78
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
75
79
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
76
80
|
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loudmouth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Peter Giacomo Lombardo
|
@@ -15,11 +15,12 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-16 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
-
|
21
|
+
name: acts_as_tree
|
22
|
+
type: :runtime
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
24
|
none: false
|
24
25
|
requirements:
|
25
26
|
- - ">="
|
@@ -28,12 +29,12 @@ dependencies:
|
|
28
29
|
segments:
|
29
30
|
- 0
|
30
31
|
version: "0"
|
31
|
-
|
32
|
-
version_requirements: *id001
|
33
|
-
type: :runtime
|
34
|
-
- !ruby/object:Gem::Dependency
|
32
|
+
requirement: *id001
|
35
33
|
prerelease: false
|
36
|
-
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: haml
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
38
|
none: false
|
38
39
|
requirements:
|
39
40
|
- - ">="
|
@@ -42,12 +43,26 @@ dependencies:
|
|
42
43
|
segments:
|
43
44
|
- 0
|
44
45
|
version: "0"
|
46
|
+
requirement: *id002
|
47
|
+
prerelease: false
|
48
|
+
- !ruby/object:Gem::Dependency
|
45
49
|
name: shoulda
|
46
|
-
version_requirements: *id002
|
47
50
|
type: :development
|
48
|
-
|
51
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
requirement: *id003
|
49
61
|
prerelease: false
|
50
|
-
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: bundler
|
64
|
+
type: :development
|
65
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
51
66
|
none: false
|
52
67
|
requirements:
|
53
68
|
- - ~>
|
@@ -58,12 +73,12 @@ dependencies:
|
|
58
73
|
- 0
|
59
74
|
- 0
|
60
75
|
version: 1.0.0
|
61
|
-
|
62
|
-
version_requirements: *id003
|
63
|
-
type: :development
|
64
|
-
- !ruby/object:Gem::Dependency
|
76
|
+
requirement: *id004
|
65
77
|
prerelease: false
|
66
|
-
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: jeweler
|
80
|
+
type: :development
|
81
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
67
82
|
none: false
|
68
83
|
requirements:
|
69
84
|
- - ~>
|
@@ -74,12 +89,12 @@ dependencies:
|
|
74
89
|
- 6
|
75
90
|
- 0
|
76
91
|
version: 1.6.0
|
77
|
-
|
78
|
-
version_requirements: *id004
|
79
|
-
type: :development
|
80
|
-
- !ruby/object:Gem::Dependency
|
92
|
+
requirement: *id005
|
81
93
|
prerelease: false
|
82
|
-
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rcov
|
96
|
+
type: :development
|
97
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
83
98
|
none: false
|
84
99
|
requirements:
|
85
100
|
- - ">="
|
@@ -88,9 +103,8 @@ dependencies:
|
|
88
103
|
segments:
|
89
104
|
- 0
|
90
105
|
version: "0"
|
91
|
-
|
92
|
-
|
93
|
-
type: :development
|
106
|
+
requirement: *id006
|
107
|
+
prerelease: false
|
94
108
|
description: Loudmouth adds commenting to one or many of your models.
|
95
109
|
email: pglombardo@gmail.com
|
96
110
|
executables: []
|
@@ -113,6 +127,7 @@ files:
|
|
113
127
|
- app/views/loudmouth/comments/_comment.html.haml
|
114
128
|
- app/views/loudmouth/comments/_comment_form.html.haml
|
115
129
|
- app/views/loudmouth/comments/index.html.haml
|
130
|
+
- lib/extensions/active_record.rb
|
116
131
|
- lib/extensions/helper.rb
|
117
132
|
- lib/generators/loudmouth/install_generator.rb
|
118
133
|
- lib/generators/loudmouth/loudmouth_generator.rb
|