muck-comments 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/.gitignore +4 -0
  2. data/MIT-LICENSE +1 -1
  3. data/Rakefile +27 -11
  4. data/VERSION +1 -1
  5. data/locales/ar.yml +2 -0
  6. data/locales/bg.yml +3 -1
  7. data/locales/ca.yml +2 -0
  8. data/locales/cs.yml +2 -0
  9. data/locales/da.yml +2 -0
  10. data/locales/de.yml +2 -0
  11. data/locales/el.yml +2 -0
  12. data/locales/en.yml +3 -1
  13. data/locales/es.yml +2 -0
  14. data/locales/et.yml +12 -0
  15. data/locales/fa.yml +12 -0
  16. data/locales/fi.yml +12 -0
  17. data/locales/fr.yml +2 -0
  18. data/locales/gl.yml +12 -0
  19. data/locales/hi.yml +12 -0
  20. data/locales/hr.yml +12 -0
  21. data/locales/hu.yml +12 -0
  22. data/locales/id.yml +12 -0
  23. data/locales/it.yml +3 -1
  24. data/locales/iw.yml +2 -0
  25. data/locales/ja.yml +3 -1
  26. data/locales/ko.yml +2 -0
  27. data/locales/lt.yml +2 -0
  28. data/locales/lv.yml +2 -0
  29. data/locales/mt.yml +12 -0
  30. data/locales/nl.yml +2 -0
  31. data/locales/no.yml +2 -0
  32. data/locales/pl.yml +2 -0
  33. data/locales/pt-PT.yml +12 -0
  34. data/locales/ro.yml +2 -0
  35. data/locales/ru.yml +2 -0
  36. data/locales/sk.yml +2 -0
  37. data/locales/sl.yml +2 -0
  38. data/locales/sq.yml +12 -0
  39. data/locales/sr.yml +2 -0
  40. data/locales/sv.yml +2 -0
  41. data/locales/th.yml +12 -0
  42. data/locales/tl.yml +2 -0
  43. data/locales/tr.yml +12 -0
  44. data/locales/uk.yml +2 -0
  45. data/locales/vi.yml +2 -0
  46. data/locales/zh-CN.yml +2 -0
  47. data/locales/zh-TW.yml +2 -0
  48. data/locales/zh.yml +2 -0
  49. data/muck-comments.gemspec +17 -78
  50. metadata +16 -28
  51. data/pkg/muck-comments-0.1.2.gem +0 -0
  52. data/pkg/muck-comments-0.1.3.gem +0 -0
  53. data/rdoc/classes/ActionController.html +0 -107
  54. data/rdoc/classes/ActionController/Routing.html +0 -107
  55. data/rdoc/classes/ActionController/Routing/RouteSet.html +0 -148
  56. data/rdoc/classes/ActiveRecord.html +0 -105
  57. data/rdoc/classes/ActiveRecord/Acts/MuckComment/ClassMethods.html +0 -160
  58. data/rdoc/classes/ActiveRecord/Acts/MuckComment/InstanceMethods.html +0 -178
  59. data/rdoc/classes/ActiveRecord/Acts/MuckComment/SingletonMethods.html +0 -212
  60. data/rdoc/classes/Acts/CommentableWithThreading/ClassMethods.html +0 -149
  61. data/rdoc/classes/Acts/CommentableWithThreading/InstanceMethods.html +0 -234
  62. data/rdoc/classes/Acts/CommentableWithThreading/SingletonMethods.html +0 -189
  63. data/rdoc/classes/MuckComments.html +0 -111
  64. data/rdoc/classes/MuckComments/Tasks.html +0 -146
  65. data/rdoc/created.rid +0 -1
  66. data/rdoc/files/README_rdoc.html +0 -182
  67. data/rdoc/files/lib/active_record/acts/muck_comment_rb.html +0 -101
  68. data/rdoc/files/lib/acts_as_commentable_with_threading_rb.html +0 -107
  69. data/rdoc/files/lib/muck_comments/initialize_routes_rb.html +0 -101
  70. data/rdoc/files/lib/muck_comments/tasks_rb.html +0 -110
  71. data/rdoc/files/lib/muck_comments_rb.html +0 -115
  72. data/rdoc/fr_class_index.html +0 -38
  73. data/rdoc/fr_file_index.html +0 -32
  74. data/rdoc/fr_method_index.html +0 -41
  75. data/rdoc/index.html +0 -24
  76. data/rdoc/rdoc-style.css +0 -208
@@ -1,146 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: MuckComments::Tasks</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">MuckComments::Tasks</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/muck_comments/tasks_rb.html">
59
- lib/muck_comments/tasks.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- ::Rake::TaskLib
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
-
82
-
83
- </div>
84
-
85
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000009">new</a>&nbsp;&nbsp;
90
- </div>
91
- </div>
92
-
93
- </div>
94
-
95
-
96
- <!-- if includes -->
97
-
98
- <div id="section">
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- <!-- if method_list -->
108
- <div id="methods">
109
- <h3 class="section-bar">Public Class methods</h3>
110
-
111
- <div id="method-M000009" class="method-detail">
112
- <a name="M000009"></a>
113
-
114
- <div class="method-heading">
115
- <a href="#M000009" class="method-signature">
116
- <span class="method-name">new</span><span class="method-args">()</span>
117
- </a>
118
- </div>
119
-
120
- <div class="method-description">
121
- <p><a class="source-toggle" href="#"
122
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
123
- <div class="method-source-code" id="M000009-source">
124
- <pre>
125
- <span class="ruby-comment cmt"># File lib/muck_comments/tasks.rb, line 7</span>
126
- 7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
127
- 8: <span class="ruby-identifier">define</span>
128
- 9: <span class="ruby-keyword kw">end</span>
129
- </pre>
130
- </div>
131
- </div>
132
- </div>
133
-
134
-
135
- </div>
136
-
137
-
138
- </div>
139
-
140
-
141
- <div id="validator-badges">
142
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
143
- </div>
144
-
145
- </body>
146
- </html>
data/rdoc/created.rid DELETED
@@ -1 +0,0 @@
1
- Fri, 19 Jun 2009 02:10:46 -0600
@@ -1,182 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: README.rdoc</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>README.rdoc</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>README.rdoc
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Tue Jun 16 23:04:54 -0600 2009</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <h1><a href="../classes/MuckComments.html">MuckComments</a></h1>
73
- <p>
74
- Add comments to any object. This gem is the muck version of
75
- acts_as_commentable_with_threading (<a
76
- href="http://github.com/elight/acts_as_commentable_with_threading/tree/master">github.com/elight/acts_as_commentable_with_threading/tree/master</a>)
77
- </p>
78
- <h2>Setup</h2>
79
- <p>
80
- Install the the awesome_nested_set gem (<a
81
- href="http://github.com/collectiveidea/awesome_nested_set/tree/master">github.com/collectiveidea/awesome_nested_set/tree/master</a>)
82
- </p>
83
- <pre>
84
- gem sources -a http://gems.github.com
85
- sudo gem install collectiveidea-awesome_nested_set
86
- </pre>
87
- <p>
88
- Then add it to your environment.rb:
89
- </p>
90
- <pre>
91
- config.gem &quot;collectiveidea-awesome_nested_set&quot;, :lib =&gt; 'awesome_nested_set'
92
- </pre>
93
- <h2>Usage</h2>
94
- <h3>Comment model</h3>
95
- <p>
96
- Create a model called comment in your project and add the following:
97
- </p>
98
- <pre>
99
- class Comment &lt; ActiveRecord::Base
100
- acts_as_muck_comment
101
- end
102
- </pre>
103
- <p>
104
- This let&#8216;s you add any other methods to the comment model that you
105
- see fit.
106
- </p>
107
- <h3>Comment controller</h3>
108
- <p>
109
- Override the comments controller to change the the security model. For
110
- example:
111
- </p>
112
- <pre>
113
- class CommentsController &lt; Muck::CommentsController
114
-
115
- before_filter :login_required # require the user to be logged in to make a comment
116
-
117
- # Modify this method to change how permissions are checked to see if a user can comment.
118
- # Each model that implements 'acts_as_muck_comment' can override can_comment? to
119
- # change how comment permissions are handled.
120
- def has_permission_to_comment(user, parent)
121
- parent.can_comment?(user)
122
- end
123
-
124
- end
125
- </pre>
126
- <h3>Comment partial</h3>
127
- <p>
128
- When calling create in the comments controller with :format =&gt;
129
- &#8216;json&#8217; the resulting json will include an &#8216;html&#8217;
130
- field that contains a rendered version of the comment html. To facilitate
131
- this process be sure to create a partial called
132
- &#8216;_comment.html.erb&#8217; under a directory with the same name as the
133
- parent object. The partial will be passed an object
134
- &#8216;comment_owner&#8217; that references the parent object.
135
- </p>
136
- <p>
137
- For example, for an object &#8216;activity&#8217; that acts_as_commentable
138
- create a partial &#8216;activities/_comment.html.erb&#8217;. The contents
139
- might look like this:
140
- </p>
141
- <pre>
142
- &lt;div id=&quot;&lt;%= comment.dom_id %&gt;&quot;&gt;
143
- &lt;span class=&quot;user&quot;&gt;&lt;%= link_to comment_owner.user, comment_owner.user %&gt;&lt;/span&gt;
144
- &lt;p&gt;&lt;%= h comment.body %&gt;&lt;/p&gt;
145
- &lt;/div&gt;
146
- </pre>
147
- <p>
148
- Copyright (c) 2009 Justin Ball, released under the MIT license
149
- </p>
150
-
151
- </div>
152
-
153
-
154
- </div>
155
-
156
-
157
- </div>
158
-
159
-
160
- <!-- if includes -->
161
-
162
- <div id="section">
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
- <!-- if method_list -->
172
-
173
-
174
- </div>
175
-
176
-
177
- <div id="validator-badges">
178
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
179
- </div>
180
-
181
- </body>
182
- </html>
@@ -1,101 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: muck_comment.rb</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>muck_comment.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/active_record/acts/muck_comment.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Sat Jun 13 15:17:58 -0600 2009</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
-
72
-
73
- </div>
74
-
75
-
76
- </div>
77
-
78
-
79
- <!-- if includes -->
80
-
81
- <div id="section">
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
- <!-- if method_list -->
91
-
92
-
93
- </div>
94
-
95
-
96
- <div id="validator-badges">
97
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
- </div>
99
-
100
- </body>
101
- </html>
@@ -1,107 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: acts_as_commentable_with_threading.rb</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>acts_as_commentable_with_threading.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/acts_as_commentable_with_threading.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Sat Jun 13 18:25:16 -0600 2009</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <p>
73
- ActsAsCommentableWithThreading
74
- </p>
75
-
76
- </div>
77
-
78
-
79
- </div>
80
-
81
-
82
- </div>
83
-
84
-
85
- <!-- if includes -->
86
-
87
- <div id="section">
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
- <!-- if method_list -->
97
-
98
-
99
- </div>
100
-
101
-
102
- <div id="validator-badges">
103
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
104
- </div>
105
-
106
- </body>
107
- </html>