motiro 0.6.9 → 0.6.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/README +1 -1
  2. data/Rakefile +2 -2
  3. data/app/core/version.rb +1 -1
  4. data/app/helpers/feed_helper.rb +2 -0
  5. data/app/reporters/darcs_reporter.rb +2 -3
  6. data/app/views/events/new.rhtml +14 -0
  7. data/app/views/feed/subversion.rhtml +26 -0
  8. data/app/views/report/events_detail.rhtml +12 -0
  9. data/build/build.rb +29 -0
  10. data/config/boot.rb +104 -14
  11. data/config/environment.rb +35 -38
  12. data/config/environments/development.rb +5 -7
  13. data/config/environments/production.rb +3 -3
  14. data/config/environments/test.rb +5 -2
  15. data/config/initializers/globalize.rb +5 -0
  16. data/config/initializers/inflections.rb +10 -0
  17. data/config/initializers/mime_types.rb +5 -0
  18. data/config/initializers/motiro_core.rb +5 -0
  19. data/config/motiro.yml +4 -4
  20. data/config/report/subversion.yml +26 -0
  21. data/doc/README_FOR_APP +1 -1
  22. data/lib/login_system.rb +2 -2
  23. data/lib/tasks/packaging.rake +4 -4
  24. data/public/404.html +27 -5
  25. data/public/422.html +30 -0
  26. data/public/500.html +27 -5
  27. data/public/dispatch.rb +2 -2
  28. data/public/javascripts/application.js +2 -0
  29. data/public/javascripts/controls.js +532 -319
  30. data/public/javascripts/dragdrop.js +521 -133
  31. data/public/javascripts/effects.js +708 -442
  32. data/public/javascripts/prototype.js +3393 -953
  33. data/public/robots.txt +5 -1
  34. data/public/selenium/tests/TestMainPage.html +42 -0
  35. data/public/selenium/tests/TestReportHTML.html +42 -0
  36. data/public/selenium/tests/TestReportRSS.html +37 -0
  37. data/public/selenium/tests/TestSubversionOnMain.html +32 -0
  38. data/public/selenium/tests/TestSuite.html +26 -0
  39. data/script/about +1 -1
  40. data/script/console +1 -1
  41. data/script/destroy +1 -1
  42. data/script/generate +1 -1
  43. data/script/performance/request +3 -0
  44. data/script/plugin +1 -1
  45. data/script/process/inspector +3 -0
  46. data/script/runner +1 -1
  47. data/script/server +1 -1
  48. data/test/fixtures/headlines.yml +6 -6
  49. data/test/functional/report_controller_test.rb +18 -18
  50. data/test/functional/root_controller_test.rb +1 -1
  51. data/test/test_helper.rb +11 -1
  52. data/test/unit/chief_editor_test.rb +20 -26
  53. data/test/unit/darcs_reporter_test.rb +6 -0
  54. data/test/unit/headline_test.rb +25 -8
  55. data/vendor/plugins/cache_test-0.2/doc/classes/Cosinux/FragmentCacheTest/Assertions.html +364 -0
  56. data/vendor/plugins/cache_test-0.2/doc/classes/Cosinux/PageCacheTest/IntegrationTestMethods.html +261 -0
  57. data/vendor/plugins/cache_test-0.2/doc/created.rid +1 -0
  58. data/vendor/plugins/cache_test-0.2/doc/files/CHANGELOG.html +128 -0
  59. data/vendor/plugins/cache_test-0.2/doc/files/MIT-LICENSE.html +129 -0
  60. data/vendor/plugins/cache_test-0.2/doc/files/README.html +272 -0
  61. data/vendor/plugins/cache_test-0.2/doc/files/init_rb.html +109 -0
  62. data/vendor/plugins/cache_test-0.2/doc/files/lib/fragment_cache_test_rb.html +101 -0
  63. data/vendor/plugins/cache_test-0.2/doc/files/lib/page_cache_test_rb.html +101 -0
  64. data/vendor/plugins/cache_test-0.2/doc/fr_class_index.html +28 -0
  65. data/vendor/plugins/cache_test-0.2/doc/fr_file_index.html +32 -0
  66. data/vendor/plugins/cache_test-0.2/doc/fr_method_index.html +32 -0
  67. data/vendor/plugins/cache_test-0.2/doc/index.html +24 -0
  68. data/vendor/plugins/cache_test-0.2/doc/rdoc-style.css +208 -0
  69. data/vendor/plugins/caching_monkey_patch/init.rb +13 -0
  70. data/vendor/plugins/rails_cron/CHANGELOG +8 -0
  71. data/vendor/plugins/rails_cron/LICENSE +7 -0
  72. data/vendor/plugins/rails_cron/README +77 -0
  73. data/vendor/plugins/rails_cron/init.rb +16 -0
  74. data/vendor/plugins/rails_cron/lib/acts_as_background.rb +14 -0
  75. data/vendor/plugins/rails_cron/lib/rails_cron.rb +128 -0
  76. data/vendor/plugins/rails_cron/tasks/startup.rake +50 -0
  77. metadata +466 -406
@@ -0,0 +1 @@
1
+ Tue Oct 17 17:22:31 CEST 2006
@@ -0,0 +1,128 @@
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: CHANGELOG</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>CHANGELOG</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>CHANGELOG
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Tue Oct 17 16:46:41 CEST 2006</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
+ *0.2* (October 17th, 2006)
74
+ </p>
75
+ <ul>
76
+ <li>overrides default page caching method to record page cached and expired and
77
+ use that information instead of going to the filesystem to see if cached
78
+ file exists or not.
79
+
80
+ </li>
81
+ <li>add unit testing
82
+
83
+ </li>
84
+ <li>add method for action and fragment caching
85
+
86
+ </li>
87
+ </ul>
88
+ <p>
89
+ *0.1* (October 5th, 2006)
90
+ </p>
91
+ <ul>
92
+ <li>first plugin release
93
+
94
+ </li>
95
+ </ul>
96
+
97
+ </div>
98
+
99
+
100
+ </div>
101
+
102
+
103
+ </div>
104
+
105
+
106
+ <!-- if includes -->
107
+
108
+ <div id="section">
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <!-- if method_list -->
118
+
119
+
120
+ </div>
121
+
122
+
123
+ <div id="validator-badges">
124
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
125
+ </div>
126
+
127
+ </body>
128
+ </html>
@@ -0,0 +1,129 @@
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: MIT-LICENSE</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>MIT-LICENSE</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>MIT-LICENSE
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Wed Feb 15 11:48:46 CET 2006</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
+ Copyright &#169; 2006 Damien Merenne
74
+ </p>
75
+ <p>
76
+ Permission is hereby granted, free of charge, to any person obtaining a
77
+ copy of this software and associated documentation files (the
78
+ &quot;Software&quot;), to deal in the Software without restriction,
79
+ including without limitation the rights to use, copy, modify, merge,
80
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
81
+ permit persons to whom the Software is furnished to do so, subject to the
82
+ following conditions:
83
+ </p>
84
+ <p>
85
+ The above copyright notice and this permission notice shall be included in
86
+ all copies or substantial portions of the Software.
87
+ </p>
88
+ <p>
89
+ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
90
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
91
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
92
+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
93
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
94
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
95
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
96
+ </p>
97
+
98
+ </div>
99
+
100
+
101
+ </div>
102
+
103
+
104
+ </div>
105
+
106
+
107
+ <!-- if includes -->
108
+
109
+ <div id="section">
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+ <!-- if method_list -->
119
+
120
+
121
+ </div>
122
+
123
+
124
+ <div id="validator-badges">
125
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
126
+ </div>
127
+
128
+ </body>
129
+ </html>
@@ -0,0 +1,272 @@
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</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</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>README
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Tue Oct 17 16:41:58 CEST 2006</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>Cache Test Plugin</h1>
73
+ <p>
74
+ This plugin adds assertions in test cases to check the caching logic of
75
+ your application.
76
+ </p>
77
+ <h2>1. Installation</h2>
78
+ <p>
79
+ Unpack into the vendor/plugin and that should be it.
80
+ </p>
81
+ <h2>2. Usage</h2>
82
+ <h3>Testing page caching</h3>
83
+ <p>
84
+ First create an integration test. Then, to test caching of the
85
+ &quot;/pages/about&quot; and &quot;/pages/contact&quot; pages, add a method
86
+ like this:
87
+ </p>
88
+ <pre>
89
+ def test_caching
90
+ assert_cache_pages(&quot;/pages/about&quot;, &quot;/pages/contact&quot;)
91
+ end
92
+ </pre>
93
+ <p>
94
+ The assert_cache_pages method will
95
+ </p>
96
+ <ul>
97
+ <li>first make sure that the urls are not cached,
98
+
99
+ </li>
100
+ <li>execute a get on each request,
101
+
102
+ </li>
103
+ <li>assert that the corresponding cache files have been created.
104
+
105
+ </li>
106
+ </ul>
107
+ <p>
108
+ You can also give a block to the assert_cache_pages method. Instead of
109
+ executing a get on each url, it will yield the urls. For example:
110
+ </p>
111
+ <pre>
112
+ def test_caching
113
+ assert_cache_pages(&quot;/pages/about&quot;, &quot;/pages/contact&quot;) do |url_about, url_contact|
114
+ post url_about
115
+ post url_contact
116
+ end
117
+ end
118
+ </pre>
119
+ <h3>Testing expiration of pages</h3>
120
+ <p>
121
+ You will also certainly want (and that&#8217;s really the most interesting
122
+ part) to check if your cached pages expires when the user is doing some
123
+ action. For that, here is the assert_expire method:
124
+ </p>
125
+ <pre>
126
+ def test_expiring
127
+ assert_expire_pages(&quot;/news/list&quot;, &quot;/news/show/1&quot;) do |*urls|
128
+ post &quot;/news/delete/1&quot;
129
+ end
130
+ end
131
+ </pre>
132
+ <p>
133
+ Here the assert_expire_pages method will
134
+ </p>
135
+ <ul>
136
+ <li>check that the urls are cached,
137
+
138
+ </li>
139
+ <li>execute the post request,
140
+
141
+ </li>
142
+ <li>and assert that the urls are no more cached.
143
+
144
+ </li>
145
+ </ul>
146
+ <p>
147
+ This is great for testing your cache sweepers logic.
148
+ </p>
149
+ <h3>Testing action caching</h3>
150
+ <p>
151
+ To test caching of the &quot;bar&quot; action of the foo
152
+ &quot;controller&quot; in an integration test, do
153
+ </p>
154
+ <pre>
155
+ assert_cache_actions(:controller =&gt; &quot;foo&quot;, :action =&gt; &quot;bar&quot;) do
156
+ get &quot;/foo/bar&quot;
157
+ end
158
+ </pre>
159
+ <p>
160
+ The assert_cache_actions method will
161
+ </p>
162
+ <ul>
163
+ <li>first make sure that the actions are not cached,
164
+
165
+ </li>
166
+ <li>yield the given block
167
+
168
+ </li>
169
+ <li>assert that the corresponding action fragment have been stored.
170
+
171
+ </li>
172
+ </ul>
173
+ <h3>Testing expiration of actions</h3>
174
+ <p>
175
+ To check that some actions are expired, use the assert_expire_actions
176
+ method:
177
+ </p>
178
+ <pre>
179
+ assert_expire_actions(:controller =&gt; &quot;foo&quot;, :action =&gt; &quot;bar&quot;) do |*urls|
180
+ post &quot;/foo/expire_cache&quot;
181
+ end
182
+ </pre>
183
+ <p>
184
+ Here the assert_expire_actions method will
185
+ </p>
186
+ <ul>
187
+ <li>check that the actions fragments are cached,
188
+
189
+ </li>
190
+ <li>execute the post request,
191
+
192
+ </li>
193
+ <li>and assert that the fragments are no more cached.
194
+
195
+ </li>
196
+ </ul>
197
+ <p>
198
+ In functional test, there can be only one controller, so you are not
199
+ required to give the :controller option and if they are no parameters to
200
+ the action, you can simply call
201
+ </p>
202
+ <pre>
203
+ assert_cache_actions(:foo, :bar) do
204
+ get :bar
205
+ get :foo
206
+ end
207
+ </pre>
208
+ <h2>Testing fragments caching</h2>
209
+ <p>
210
+ To check that your fragments are cached when doing some action, do
211
+ </p>
212
+ <pre>
213
+ assert_cache_fragments(:controller =&gt; &quot;foo&quot;, :action =&gt; &quot;bar&quot;, :action_suffix =&gt; &quot;baz&quot;) do
214
+ get &quot;/foo/bar&quot;
215
+ end
216
+ </pre>
217
+ <h2>Testing expiration of fragments</h2>
218
+ <p>
219
+ To check that your fragments are expired when doing some action, do
220
+ </p>
221
+ <pre>
222
+ assert_expire_fragments(:controller =&gt; &quot;foo&quot;, :action =&gt; &quot;bar&quot;, :action_suffix =&gt; &quot;baz&quot;) do
223
+ get &quot;/foo/expire&quot;
224
+ end
225
+ </pre>
226
+ <p>
227
+ In functional test, your not required to give the :controller option.
228
+ </p>
229
+ <h2>3. License</h2>
230
+ <p>
231
+ This plugin is licensed under the MIT license. Complete license text is
232
+ included in the <a href="MIT-LICENSE.html">MIT-LICENSE</a> file.
233
+ </p>
234
+ <h2>4. Author</h2>
235
+ <p>
236
+ This plugin was created by Damien Merenne &lt;dam@cosinux.org&gt; and is
237
+ located at <a
238
+ href="http://blog.cosinux.org/pages/page-cache-test">blog.cosinux.org/pages/page-cache-test</a>.
239
+ </p>
240
+
241
+ </div>
242
+
243
+
244
+ </div>
245
+
246
+
247
+ </div>
248
+
249
+
250
+ <!-- if includes -->
251
+
252
+ <div id="section">
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <!-- if method_list -->
262
+
263
+
264
+ </div>
265
+
266
+
267
+ <div id="validator-badges">
268
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
269
+ </div>
270
+
271
+ </body>
272
+ </html>