muck-activities 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. data/.gitignore +5 -0
  2. data/README.rdoc +21 -0
  3. data/Rakefile +26 -10
  4. data/VERSION +1 -1
  5. data/app/views/activities/_template_filter.html.erb +1 -1
  6. data/locales/ar.yml +3 -0
  7. data/locales/bg.yml +3 -0
  8. data/locales/ca.yml +3 -0
  9. data/locales/cs.yml +4 -1
  10. data/locales/da.yml +4 -1
  11. data/locales/de.yml +3 -0
  12. data/locales/el.yml +3 -0
  13. data/locales/en.yml +4 -1
  14. data/locales/es.yml +3 -0
  15. data/locales/et.yml +31 -0
  16. data/locales/fa.yml +31 -0
  17. data/locales/fi.yml +31 -0
  18. data/locales/fr.yml +3 -0
  19. data/locales/gl.yml +31 -0
  20. data/locales/hi.yml +31 -0
  21. data/locales/hr.yml +31 -0
  22. data/locales/hu.yml +31 -0
  23. data/locales/id.yml +31 -0
  24. data/locales/it.yml +3 -0
  25. data/locales/iw.yml +3 -0
  26. data/locales/ja.yml +3 -0
  27. data/locales/ko.yml +3 -0
  28. data/locales/lt.yml +3 -0
  29. data/locales/lv.yml +3 -0
  30. data/locales/mt.yml +31 -0
  31. data/locales/nl.yml +3 -0
  32. data/locales/no.yml +3 -0
  33. data/locales/pl.yml +3 -0
  34. data/locales/pt-PT.yml +31 -0
  35. data/locales/ro.yml +3 -0
  36. data/locales/ru.yml +3 -0
  37. data/locales/sk.yml +4 -1
  38. data/locales/sl.yml +3 -0
  39. data/locales/sq.yml +31 -0
  40. data/locales/sr.yml +3 -0
  41. data/locales/sv.yml +3 -0
  42. data/locales/th.yml +31 -0
  43. data/locales/tl.yml +3 -0
  44. data/locales/tr.yml +31 -0
  45. data/locales/uk.yml +3 -0
  46. data/locales/vi.yml +3 -0
  47. data/locales/zh-CN.yml +3 -0
  48. data/locales/zh-TW.yml +3 -0
  49. data/locales/zh.yml +3 -0
  50. data/muck-activities.gemspec +17 -81
  51. data/test/rails_root/app/models/user.rb +0 -7
  52. metadata +16 -23
  53. data/pkg/muck-activities-0.1.10.gem +0 -0
  54. data/pkg/muck-activities-0.1.11.gem +0 -0
  55. data/rdoc/classes/ActionController/Routing/RouteSet.html +0 -148
  56. data/rdoc/classes/ActionController/Routing.html +0 -107
  57. data/rdoc/classes/ActionController.html +0 -107
  58. data/rdoc/classes/MuckActivities/Tasks.html +0 -146
  59. data/rdoc/classes/MuckActivities.html +0 -111
  60. data/rdoc/classes/MuckActivity/ActMethods.html +0 -260
  61. data/rdoc/classes/MuckActivity/InstanceMethods.html +0 -376
  62. data/rdoc/created.rid +0 -1
  63. data/rdoc/files/README_rdoc.html +0 -204
  64. data/rdoc/files/lib/muck_activities/active_record/acts/muck_activity_rb.html +0 -101
  65. data/rdoc/files/lib/muck_activities/initialize_routes_rb.html +0 -101
  66. data/rdoc/files/lib/muck_activities/muck_activity_rb.html +0 -101
  67. data/rdoc/files/lib/muck_activities/tasks_rb.html +0 -110
  68. data/rdoc/files/lib/muck_activities_rb.html +0 -110
  69. data/rdoc/fr_class_index.html +0 -33
  70. data/rdoc/fr_file_index.html +0 -32
  71. data/rdoc/fr_method_index.html +0 -38
  72. data/rdoc/index.html +0 -24
  73. data/rdoc/rdoc-style.css +0 -208
@@ -1,204 +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>Mon Jun 15 10:31:17 -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/MuckActivities.html">MuckActivities</a></h1>
73
- <h2>Installation</h2>
74
- <p>
75
- The muck activities engine is part of the muck framework and relies upon
76
- the muck_engine. Install with
77
- </p>
78
- <pre>
79
- sudo gem install muck-activites
80
- </pre>
81
- <p>
82
- This should also install the dependencies.
83
- </p>
84
- <h2>Usage</h2>
85
- <p>
86
- This engine implements simple activity tracking.
87
- </p>
88
- <p>
89
- Models that can have activity feed should call &#8216;has_activities&#8216;
90
- </p>
91
- <pre>
92
- Example:
93
- class User
94
- has_activities
95
- end
96
- </pre>
97
- <p>
98
- Adding an item to the activity feed requires
99
- &#8216;acts_as_activity_source&#8217; which then profiles the method
100
- &#8216;add_activity&#8216;
101
- </p>
102
- <pre>
103
- add_activity(feed_to, actor, item, template, check_method)
104
-
105
- feed_to - contains an array of objects (typically users) that have use acts_as_activity_user
106
- actor - the user performing the action
107
- item - a reference to the object that
108
- template - the template (partial) to use to render the activity
109
- check_method - and optional method to call on each object in the feed_to array that determines whether or not to add the activity
110
-
111
- Example:
112
- add_activity(user.feed_to, user, comment, 'comment')
113
- </pre>
114
- <h3>Authorization</h3>
115
- <p>
116
- By default &#8216;has_activities&#8217; will add a simple
117
- &#8216;can_view?&#8217; method:
118
- </p>
119
- <pre>
120
- def can_view?(check_object)
121
- self == check_object
122
- end
123
- </pre>
124
- <p>
125
- This method determines whether or not the check_object has access to the
126
- current object&#8216;s activity feeds. For example, if the intent is to
127
- recover the activities for a given user where the user is
128
- &#8217;@parent&#8217; thus:
129
- </p>
130
- <pre>
131
- @parent.can_view?(current_user)
132
- </pre>
133
- <p>
134
- The can view method will determine whether or not the current_user has the
135
- right to view the activity feed.
136
- </p>
137
- <p>
138
- In most instances you will need to override this method to implement proper
139
- security. For example, for a group that has an activity feed you might add
140
- a can_view? method like this:
141
- </p>
142
- <pre>
143
- def can_view?(check_object)
144
- self.member?(check_object) || (check_object.is_a?(User) &amp;&amp; check_object.admin?)
145
- end
146
- </pre>
147
- <h2>Configuration</h2>
148
- <p>
149
- If you would like to enable comments for your project&#8216;s activities
150
- feeds you can do so by adding an entry to GlobalConfig.yml (configuration
151
- file added by muck)
152
- </p>
153
- <pre>
154
- enable_activity_comments: true
155
- </pre>
156
- <p>
157
- If you would like to add live updates to the user&#8216;s activity feed you
158
- can do so by adding an entry to GlobalConfig.yml (configuration file added
159
- by muck)
160
- </p>
161
- <pre>
162
- enable_live_activity_updates: true
163
- live_activity_update_interval: 5
164
- </pre>
165
- <p>
166
- Note that this will poll the server every 5 seconds and so will increase
167
- server load and bandwidth usage.
168
- </p>
169
- <p>
170
- Copyright (c) 2009 Justin Ball, released under the MIT license
171
- </p>
172
-
173
- </div>
174
-
175
-
176
- </div>
177
-
178
-
179
- </div>
180
-
181
-
182
- <!-- if includes -->
183
-
184
- <div id="section">
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
- <!-- if method_list -->
194
-
195
-
196
- </div>
197
-
198
-
199
- <div id="validator-badges">
200
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
201
- </div>
202
-
203
- </body>
204
- </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_activity.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_activity.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/muck_activities/active_record/acts/muck_activity.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Wed Jun 17 17:28:20 -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,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: initialize_routes.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>initialize_routes.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/muck_activities/initialize_routes.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Mon Jun 15 09:56:53 -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,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_activity.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_activity.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/muck_activities/muck_activity.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Wed Jun 17 17:30:24 -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,110 +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: tasks.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>tasks.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/muck_activities/tasks.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Wed Jun 17 17:23:53 -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
- <div id="requires-list">
73
- <h3 class="section-bar">Required files</h3>
74
-
75
- <div class="name-list">
76
- rake&nbsp;&nbsp;
77
- rake/tasklib&nbsp;&nbsp;
78
- fileutils&nbsp;&nbsp;
79
- </div>
80
- </div>
81
-
82
- </div>
83
-
84
-
85
- </div>
86
-
87
-
88
- <!-- if includes -->
89
-
90
- <div id="section">
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
- <!-- if method_list -->
100
-
101
-
102
- </div>
103
-
104
-
105
- <div id="validator-badges">
106
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
107
- </div>
108
-
109
- </body>
110
- </html>