motiro 0.6.10 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. data/AUTHORS +7 -11
  2. data/LICENSE +602 -262
  3. data/README +6 -7
  4. data/README.en +5 -6
  5. data/README.pt-br +6 -6
  6. data/app/controllers/account_controller.rb +5 -6
  7. data/app/controllers/application.rb +5 -6
  8. data/app/controllers/javascript_controller.rb +6 -7
  9. data/app/controllers/report_controller.rb +5 -6
  10. data/app/controllers/root_controller.rb +5 -1
  11. data/app/controllers/wiki_controller.rb +10 -8
  12. data/app/core/cache_reporter.rb +6 -7
  13. data/app/core/cache_reporter_fetcher.rb +6 -6
  14. data/app/core/chief_editor.rb +5 -6
  15. data/app/core/license.rb +598 -0
  16. data/app/core/reporter.rb +6 -7
  17. data/app/core/reporter_driver.rb +5 -5
  18. data/app/core/reporter_fetcher.rb +6 -7
  19. data/app/core/settings.rb +5 -6
  20. data/app/core/version.rb +1 -1
  21. data/app/core/wiki_reporter.rb +5 -6
  22. data/app/helpers/application_helper.rb +33 -16
  23. data/app/helpers/default_page_provider.rb +6 -7
  24. data/app/helpers/report_helper.rb +5 -6
  25. data/app/helpers/wiki_helper.rb +48 -0
  26. data/app/models/change.rb +5 -6
  27. data/app/models/chunk.rb +5 -6
  28. data/app/models/feed_observer.rb +6 -7
  29. data/app/models/headline.rb +5 -6
  30. data/app/models/page.rb +16 -7
  31. data/app/models/revision.rb +9 -9
  32. data/app/models/user.rb +6 -9
  33. data/app/models/wiki_reference.rb +5 -6
  34. data/app/models/wiki_sweeper.rb +6 -7
  35. data/app/ports/chdir_runner.rb +6 -7
  36. data/app/ports/runner.rb +5 -5
  37. data/app/reporters/darcs_connection.rb +6 -7
  38. data/app/reporters/darcs_reporter.rb +9 -10
  39. data/app/reporters/darcs_temp_repo.rb +5 -6
  40. data/app/reporters/events_reporter.rb +5 -6
  41. data/app/reporters/features_reporter.rb +5 -6
  42. data/app/reporters/subversion_reporter.rb +5 -6
  43. data/app/reporters/svn_connection.rb +6 -6
  44. data/app/reporters/svn_settings.rb +5 -5
  45. data/app/views/account/_authorization.rhtml +31 -23
  46. data/app/views/account/_availability.rhtml +1 -3
  47. data/app/views/javascript/motiro.rjs +6 -8
  48. data/app/views/layouts/_bottom.rhtml +7 -0
  49. data/app/views/report/list.rhtml +1 -1
  50. data/app/views/root/license.rhtml +5 -0
  51. data/app/views/wiki/_editbar.rhtml +2 -18
  52. data/app/views/wiki/_properties_show.rhtml +2 -1
  53. data/app/views/wiki/_show_event.rhtml +3 -1
  54. data/app/views/wiki/_show_feature.rhtml +2 -2
  55. data/app/views/wiki/diff.rhtml +2 -2
  56. data/app/views/wiki/page_feed.rxml +1 -13
  57. data/app/views/wiki/raw.rhtml +7 -0
  58. data/app/views/wiki/show.rhtml +1 -1
  59. data/app/views/wiki/sourcediff.rhtml +2 -2
  60. data/bin/motiro +5 -6
  61. data/config/initializers/motiro_core.rb +1 -0
  62. data/config/routes.rb +9 -6
  63. data/db/translation/pt-BR.rb +20 -6
  64. data/lib/array_extensions.rb +6 -7
  65. data/lib/diff_chunk_builder.rb +5 -6
  66. data/lib/differ.rb +5 -6
  67. data/lib/string_extensions.rb +5 -6
  68. data/lib/stub_hash.rb +5 -6
  69. data/lib/tasks/packaging.rake +7 -7
  70. data/lib/tasks/testing.rake +5 -6
  71. data/lib/tick_daemon.rb +5 -6
  72. data/lib/wiki_link_handler.rb +5 -6
  73. data/lib/wiki_renderer.rb +5 -6
  74. data/public/images/calendar.gif +0 -0
  75. data/public/images/done.gif +0 -0
  76. data/public/images/error.gif +0 -0
  77. data/public/images/not-done.gif +0 -0
  78. data/public/images/rss.gif +0 -0
  79. data/public/stylesheets/motiro.css +163 -170
  80. data/script/ticker +5 -6
  81. data/test/acceptance/account_test.rb +6 -7
  82. data/test/acceptance/darcs_test.rb +6 -7
  83. data/test/acceptance/events_test.rb +5 -6
  84. data/test/acceptance/main_page_test.rb +6 -7
  85. data/test/acceptance/subversion_test.rb +5 -6
  86. data/test/acceptance/ts_all_suites.rb +5 -6
  87. data/test/acceptance/wiki_test.rb +5 -6
  88. data/test/contract/darcs_test.rb +5 -6
  89. data/test/contract/svn_test.rb +5 -6
  90. data/test/fixtures/pages.yml +12 -0
  91. data/test/fixtures/revisions.yml +61 -0
  92. data/test/functional/report_controller_test.rb +5 -6
  93. data/test/functional/report_features_test.rb +5 -6
  94. data/test/functional/report_subversion_test.rb +5 -6
  95. data/test/functional/root_controller_test.rb +19 -4
  96. data/test/functional/wiki_controller_test.rb +66 -8
  97. data/test/lib/acceptance_test_case.rb +6 -7
  98. data/test/lib/darcs_excerpts.rb +5 -6
  99. data/test/lib/darcs_repo.rb +5 -6
  100. data/test/lib/hash_extensions.rb +5 -6
  101. data/test/lib/live_mode_test.rb +6 -7
  102. data/test/lib/netutils.rb +6 -7
  103. data/test/lib/platform_thread.rb +5 -5
  104. data/test/lib/selenium_extensions.rb +6 -7
  105. data/test/lib/stubio.rb +6 -7
  106. data/test/lib/webserver.rb +5 -6
  107. data/test/meta/darcs_repo_test.rb +6 -6
  108. data/test/meta/local_svn_test.rb +6 -7
  109. data/test/meta/platform_thread_test.rb +5 -5
  110. data/test/meta/stubio_test.rb +6 -7
  111. data/test/stubs/wiki_link_handler.rb +5 -6
  112. data/test/test_helper.rb +5 -6
  113. data/test/unit/array_extensions_test.rb +5 -6
  114. data/test/unit/cache_reporter_fetcher_test.rb +5 -6
  115. data/test/unit/cache_reporter_test.rb +5 -6
  116. data/test/unit/change_test.rb +5 -6
  117. data/test/unit/chdir_runner_test.rb +5 -6
  118. data/test/unit/chief_editor_test.rb +5 -6
  119. data/test/unit/darcs_connection_test.rb +5 -6
  120. data/test/unit/darcs_reporter_test.rb +14 -6
  121. data/test/unit/darcs_temp_repo_test.rb +5 -6
  122. data/test/unit/default_page_provider_test.rb +5 -6
  123. data/test/unit/diff_chunk_builder_test.rb +6 -7
  124. data/test/unit/headline_test.rb +5 -6
  125. data/test/unit/page_test.rb +45 -6
  126. data/test/unit/reporter_driver_test.rb +6 -7
  127. data/test/unit/reporter_test.rb +6 -7
  128. data/test/unit/revision_test.rb +17 -13
  129. data/test/unit/runner_test.rb +5 -6
  130. data/test/unit/string_extensions_test.rb +6 -7
  131. data/test/unit/svn_connection_test.rb +5 -5
  132. data/test/unit/svn_reporter_interaction_test.rb +6 -7
  133. data/test/unit/svn_reporter_test.rb +5 -6
  134. data/test/unit/svn_settings_test.rb +6 -7
  135. data/test/unit/user_test.rb +6 -11
  136. data/test/unit/wiki_link_handler_test.rb +5 -6
  137. data/test/unit/wiki_renderer_test.rb +7 -7
  138. data/test/unit/wiki_reporter_test.rb +5 -6
  139. data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiast.rb +15 -0
  140. data/vendor/mediacloth-trunk/lib/mediacloth/mediawikihtmlgenerator.rb +18 -3
  141. data/vendor/mediacloth-trunk/lib/mediacloth/mediawikilexer.rb +48 -9
  142. data/vendor/mediacloth-trunk/lib/mediacloth/mediawikilinkhandler.rb +7 -0
  143. data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiparser.rb +534 -485
  144. data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiparser.y +25 -1
  145. data/vendor/mediacloth-trunk/lib/mediacloth/mediawikiwalker.rb +13 -0
  146. data/vendor/mediacloth-trunk/test/data/html1 +3 -3
  147. data/vendor/mediacloth-trunk/test/data/html10 +16 -16
  148. data/vendor/mediacloth-trunk/test/data/html11 +1 -1
  149. data/vendor/mediacloth-trunk/test/data/html13 +1 -1
  150. data/vendor/mediacloth-trunk/test/data/html4 +1 -1
  151. data/vendor/mediacloth-trunk/test/data/html5 +4 -4
  152. data/vendor/mediacloth-trunk/test/data/html7 +13 -1
  153. data/vendor/mediacloth-trunk/test/data/html9 +1 -1
  154. data/vendor/mediacloth-trunk/test/data/input1 +2 -0
  155. data/vendor/mediacloth-trunk/test/data/input7 +13 -1
  156. data/vendor/mediacloth-trunk/test/data/lex1 +1 -1
  157. data/vendor/mediacloth-trunk/test/data/lex7 +13 -1
  158. data/vendor/mediacloth-trunk/test/htmlgenerator.rb +26 -1
  159. data/vendor/mediacloth-trunk/test/lexer.rb +10 -0
  160. metadata +95 -103
  161. data/build/build.rb +0 -29
  162. data/config/report/subversion.yml +0 -26
  163. data/public/images/calendar.png +0 -0
  164. data/public/images/done.png +0 -0
  165. data/public/images/not-done.png +0 -0
  166. data/public/images/rss.png +0 -0
@@ -14,7 +14,7 @@ token TEXT BOLD_START BOLD_END ITALIC_START ITALIC_END LINK_START LINK_END LINKS
14
14
  PARA_START PARA_END UL_START UL_END OL_START OL_END LI_START LI_END
15
15
  DL_START DL_END DT_START DT_END DD_START DD_END TAG_START TAG_END ATTR_NAME ATTR_VALUE
16
16
  TABLE_START TABLE_END ROW_START ROW_END HEAD_START HEAD_END CELL_START CELL_END
17
- KEYWORD VARIABLE_START VARIABLE_END
17
+ KEYWORD VARIABLE_START VARIABLE_END CATEGORY
18
18
 
19
19
 
20
20
  rule
@@ -99,6 +99,20 @@ contents:
99
99
  l.children = val[2] unless val[2].nil? or val[2].empty?
100
100
  result = l
101
101
  }
102
+ | INTLINK_START CATEGORY TEXT cat_sort_contents INTLINK_END
103
+ {
104
+ l = CategoryAST.new
105
+ l.locator = val[2]
106
+ l.sort_as = val[3]
107
+ result = l
108
+ }
109
+ | INTLINK_START RESOURCESEP CATEGORY TEXT intlink_repeated_contents INTLINK_END
110
+ {
111
+ l = CategoryLinkAST.new
112
+ l.locator = val[3]
113
+ l.children = val[4] unless val[4].nil? or val[4].empty?
114
+ result = l
115
+ }
102
116
  | table
103
117
  ;
104
118
 
@@ -191,6 +205,16 @@ intlink_repeated_contents:
191
205
  }
192
206
  ;
193
207
 
208
+ cat_sort_contents:
209
+ {
210
+ result = nil
211
+ }
212
+ | INTLINKSEP TEXT
213
+ {
214
+ result = val[1]
215
+ }
216
+ ;
217
+
194
218
  reslink_repeated_contents:
195
219
  {
196
220
  result = nil
@@ -31,12 +31,14 @@ protected
31
31
  r = parse_link(c) if c.class == LinkAST
32
32
  r = parse_internal_link(c) if c.class == InternalLinkAST
33
33
  r = parse_resource_link(c) if c.class == ResourceLinkAST
34
+ r = parse_category_link(c) if c.class == CategoryLinkAST
34
35
  r = parse_internal_link_item(c) if c.class == InternalLinkItemAST
35
36
  r = parse_table(c) if c.class == TableAST
36
37
  r = parse_table_row(c) if c.class == TableRowAST
37
38
  r = parse_table_cell(c) if c.class == TableCellAST
38
39
  r = parse_element(c) if c.class == ElementAST
39
40
  r = parse_variable(c) if c.class == VariableAST
41
+ r = parse_category(c) if c.class == CategoryAST
40
42
  r = parse_keyword(c) if c.class == KeywordAST
41
43
  r
42
44
  end
@@ -110,6 +112,13 @@ protected
110
112
  end
111
113
  end
112
114
 
115
+ #Reimplement this
116
+ def parse_category_link(ast)
117
+ ast.children.map do |c|
118
+ parse_internal_link_item(c) if c.class == InternalLinkItemAST
119
+ end
120
+ end
121
+
113
122
  #Reimplement this
114
123
  def parse_internal_link_item(ast)
115
124
  parse_wiki_ast(ast)
@@ -139,6 +148,10 @@ protected
139
148
  def parse_variable(ast)
140
149
  end
141
150
 
151
+ #Reimplement this
152
+ def parse_category(ast)
153
+ end
154
+
142
155
  #Reimplement this
143
156
  def parse_keyword(ast)
144
157
  end
@@ -10,11 +10,11 @@ Another one.
10
10
 
11
11
  </p><p>We can have headlines:
12
12
 
13
- </p><h1><a name='Headline1'></a> Headline1 </h1><h2><a name='Headline2'></a> Headline2 </h2><h3><a name='Headline3'></a> Headline3 </h3><h4><a name='Headline4'></a> Headline4 </h4><h5><a name='Headline5'></a> Headline5 </h5><h6><a name='Headline6'></a> Headline6 </h6><h7><a name='Headline7'></a> Headline7 </h7><p>
13
+ </p><h1><a name='Headline1'></a> Headline1 </h1><h2><a name='Headline2'></a> Headline2 </h2><h3><a name='Headline3'></a> Headline3 </h3><h4><a name='Headline4'></a> Headline4 </h4><h5><a name='Headline5'></a> Headline5 </h5><h6><a name='Headline6'></a> Headline6 </h6><h7><a name='Headline7'></a> Headline7 </h7><p><br />
14
14
 
15
15
  </p><p>Headlines may have formatting:
16
16
 
17
- </p><h1><a name='See_for_more_info'></a> See <a href="javascript:void(0)">Internal Link</a> for more info </h1><h2><a name='This_is_an_important_heading'></a> This is an <b>important</b> heading </h2><p>
17
+ </p><h1><a name='See_for_more_info'></a> See <a href="javascript:void(0)">Internal Link</a> for more info </h1><h2><a name='This_is_an_important_heading'></a> This is an <b>important</b> heading </h2><p><br />
18
18
 
19
19
  </p><pre> This is a preformatted <b> </b> &lt;&lt; <i> </i> text
20
20
  yes
@@ -23,4 +23,4 @@ This is a text after the line.
23
23
 
24
24
  </p><ul><li>foo
25
25
  </li><li> foo2
26
- </li></ul>
26
+ </li></ul><h2><a name='There_aren_t_any_closing_quotes_inside_this_headline_s_name'></a> There aren't any closing quotes inside this headline's name </h2>
@@ -1,17 +1,17 @@
1
1
  <p>Some examples of tables.
2
2
 
3
3
  </p><table></table>
4
- <p>
4
+ <p><br />
5
5
 
6
6
  </p><table><tr></tr>
7
7
  </table>
8
- <p>
8
+ <p><br />
9
9
 
10
10
  </p><table><tr><td> a
11
11
  </td><td> b
12
12
  </td></tr>
13
13
  </table>
14
- <p>
14
+ <p><br />
15
15
 
16
16
  </p><table><tr><td> a
17
17
  </td><td> b
@@ -20,14 +20,14 @@
20
20
  </td><td> 2
21
21
  </td></tr>
22
22
  </table>
23
- <p>
23
+ <p><br />
24
24
 
25
25
  </p><table><tr><td> a </td><td> b
26
26
  </td></tr>
27
27
  <tr><td> 1 </td><td> 2
28
28
  </td></tr>
29
29
  </table>
30
- <p>
30
+ <p><br />
31
31
 
32
32
  </p><table><tr><th> a
33
33
  </th><th> b
@@ -36,14 +36,14 @@
36
36
  </td><td> 2
37
37
  </td></tr>
38
38
  </table>
39
- <p>
39
+ <p><br />
40
40
 
41
41
  </p><table><tr><th> a </th><th> b
42
42
  </th></tr>
43
43
  <tr><td> 1 </td><td> 2
44
44
  </td></tr>
45
45
  </table>
46
- <p>
46
+ <p><br />
47
47
 
48
48
  </p><table><tr><td> a
49
49
  </td></tr>
@@ -51,7 +51,7 @@
51
51
  </td><td> 2
52
52
  </td></tr>
53
53
  </table>
54
- <p>
54
+ <p><br />
55
55
 
56
56
  </p><table><tr><td> a
57
57
  </td><td> b
@@ -59,7 +59,7 @@
59
59
  <tr><td> 1
60
60
  </td></tr>
61
61
  </table>
62
- <p>
62
+ <p><br />
63
63
 
64
64
  </p><table><tr><td> a
65
65
  </td><td> b
@@ -67,19 +67,19 @@
67
67
  <tr><td></td><td> 2
68
68
  </td></tr>
69
69
  </table>
70
- <p>
70
+ <p><br />
71
71
 
72
72
  </p><table><tr><td> <a href="http://example.com">Example</a></td><td> <b>bold</b></td></tr>
73
73
  <tr><td> <a href="javascript:void(0)">Example</a></td><td> <a href="javascript:void(0)">image:example.jpg(1, 2, 3)</a></td></tr>
74
74
  </table>
75
- <p>
75
+ <p><br />
76
76
 
77
77
  </p><table><tr><td> <a href="http://example.com">Example</a></td><td> <b>bold
78
78
  </b></td></tr>
79
79
  <tr><td> <a href="javascript:void(0)">Example</a></td><td> <b>bold <i>italic
80
80
  </i></b></td></tr>
81
81
  </table>
82
- <p>
82
+ <p><br />
83
83
 
84
84
  </p><table><tr><td> a
85
85
  </td><td> b
@@ -89,7 +89,7 @@
89
89
  </li><li> two
90
90
  </li></ul></td></tr>
91
91
  </table>
92
- <p>
92
+ <p><br />
93
93
 
94
94
  </p><table><tr><td> a
95
95
  </td><td> b
@@ -104,7 +104,7 @@
104
104
  </table>
105
105
  </td></tr>
106
106
  </table>
107
- <p>
107
+ <p><br />
108
108
 
109
109
  </p><table border="1"><tr><th> a
110
110
  </th><th> b
@@ -113,7 +113,7 @@
113
113
  </td><td> 2
114
114
  </td></tr>
115
115
  </table>
116
- <p>
116
+ <p><br />
117
117
 
118
118
  </p><p>
119
119
  Text before
@@ -121,7 +121,7 @@ Text before
121
121
  </td><td> b
122
122
  </td></tr>
123
123
  </table>
124
- <p>
124
+ <p><br />
125
125
 
126
126
  </p><p>Text before with <i>italic
127
127
  </i></p><table><tr><td> a
@@ -1,4 +1,4 @@
1
- <h2><a name='Examples_of_XHTML_markup_and_escaping_of_XML_characters'></a>Examples of XHTML markup and escaping of XML characters</h2><p>
1
+ <h2><a name='Examples_of_XHTML_markup_and_escaping_of_XML_characters'></a>Examples of XHTML markup and escaping of XML characters</h2><p><br />
2
2
 
3
3
  </p><p>Here is a <tt>code sample</tt>.
4
4
 
@@ -6,6 +6,6 @@
6
6
  <ul><li>2.1.1 <a href='#Sub_Sub_Headline_2i'> Sub Sub Headline <i>2i</i> </a></li>
7
7
  <li>2.1.2 <a href='#Sub_Sub_Headline_2ii'> Sub Sub Headline <b>2ii</b> </a></li>
8
8
  </ul><li>2.2 <a href='#Sub_Headline_2b'> Sub Headline 2b </a></li>
9
- </ul></ul><p>
9
+ </ul></ul><p><br />
10
10
 
11
11
  </p><h1><a name='Headline1'></a> Headline1 </h1><h2><a name='Sub_Headline_1a'></a> Sub Headline 1a </h2><h2><a name='Sub_Headline_1b'></a> Sub Headline 1b </h2><h1><a name='Headline2'></a> Headline2 </h1><h2><a name='Sub_Headline_2a'></a> Sub Headline 2a </h2><h3><a name='Sub_Sub_Headline_2i'></a> Sub Sub Headline <i>2i</i> </h3><h3><a name='Sub_Sub_Headline_2ii'></a> Sub Sub Headline <b>2ii</b> </h3><h2><a name='Sub_Headline_2b'></a> Sub Headline 2b </h2>
@@ -40,7 +40,7 @@ Text
40
40
  </p><p><i>Some italic and now <b>bold
41
41
  </b></i></p><ul><li> one
42
42
  </li><li> two
43
- </li></ul><p>
43
+ </li></ul><p><br />
44
44
 
45
45
  </p><p><i>Some italic and now <b>bold
46
46
 
@@ -36,19 +36,19 @@ Mixed lists
36
36
  Dictionary lists
37
37
 
38
38
  </p><dl><dt>d
39
- </dt></dl><p>
39
+ </dt></dl><p><br />
40
40
 
41
41
  </p><dl><dd>t
42
- </dd></dl><p>
42
+ </dd></dl><p><br />
43
43
 
44
44
  </p><dl><dt>d
45
45
  </dt><dd>t
46
- </dd></dl><p>
46
+ </dd></dl><p><br />
47
47
 
48
48
  </p><dl><dt>d
49
49
  </dt><dd>t
50
50
  </dd><dd>t
51
- </dd></dl><p>
51
+ </dd></dl><p><br />
52
52
 
53
53
  </p><dl><dt>d
54
54
  </dt><dd>t
@@ -42,4 +42,16 @@
42
42
 
43
43
  </p><p>[[]]
44
44
 
45
- </p><p><a href="javascript:void(0)"> </a></p>
45
+ </p><p><a href="javascript:void(0)"> </a>
46
+
47
+ </p><p>
48
+
49
+ </p><p>
50
+
51
+ </p><p>
52
+
53
+ </p><p><a href="javascript:void(0)">Category</a>
54
+
55
+ </p><p><a href="javascript:void(0)">Category name</a>
56
+
57
+ </p><p><a href="javascript:void(0)">Foo</a></p>
@@ -11,4 +11,4 @@
11
11
 
12
12
  </p><p>Text escaped in a heading:
13
13
 
14
- </p><h2><a name='Heading_with_''''></a>Heading with '''</h2>
14
+ </p><h2><a name='Heading_with____'></a>Heading with '''</h2>
@@ -32,3 +32,5 @@ This is a text after the line.
32
32
 
33
33
  *foo
34
34
  * foo2
35
+
36
+ == There aren't any closing quotes inside this headline's name ==
@@ -42,4 +42,16 @@ http://sun.com
42
42
 
43
43
  [[]]
44
44
 
45
- [[ ]]
45
+ [[ ]]
46
+
47
+ [[Category:Category]]
48
+
49
+ [[Category:Category name]]
50
+
51
+ [[Category:Category name|Sort as]]
52
+
53
+ [[:Category:Category]]
54
+
55
+ [[:Category:Category name]]
56
+
57
+ [[:Category:Category name|Foo]]
@@ -23,4 +23,4 @@ This is a text after the line.
23
23
 
24
24
  PARA_ENDUL_STARTLI_STARTTEXTfoo
25
25
  LI_ENDLI_STARTTEXT foo2
26
- LI_ENDUL_ENDfalsefalse
26
+ LI_ENDUL_ENDSECTION_START==TEXT There aren't any closing quotes inside this headline's name SECTION_END==falsefalse
@@ -42,4 +42,16 @@ PARA_ENDPARA_STARTTEXT[ ]
42
42
 
43
43
  PARA_ENDPARA_STARTTEXT[[]]
44
44
 
45
- PARA_ENDPARA_STARTINTLINK_START[[TEXT INTLINK_END]]PARA_ENDfalsefalse
45
+ PARA_ENDPARA_STARTINTLINK_START[[TEXT INTLINK_END]]TEXT
46
+
47
+ PARA_ENDPARA_STARTINTLINK_START[[CATEGORYCategory:TEXTCategoryINTLINK_END]]TEXT
48
+
49
+ PARA_ENDPARA_STARTINTLINK_START[[CATEGORYCategory:TEXTCategory nameINTLINK_END]]TEXT
50
+
51
+ PARA_ENDPARA_STARTINTLINK_START[[CATEGORYCategory:TEXTCategory nameINTLINKSEP|TEXTSort asINTLINK_END]]TEXT
52
+
53
+ PARA_ENDPARA_STARTINTLINK_START[[RESOURCESEP:CATEGORYCategory:TEXTCategoryINTLINK_END]]TEXT
54
+
55
+ PARA_ENDPARA_STARTINTLINK_START[[RESOURCESEP:CATEGORYCategory:TEXTCategory nameINTLINK_END]]TEXT
56
+
57
+ PARA_ENDPARA_STARTINTLINK_START[[RESOURCESEP:CATEGORYCategory:TEXTCategory nameINTLINKSEP|TEXTFooINTLINK_END]]PARA_ENDfalsefalse
@@ -18,7 +18,7 @@ class HTMLGenerator_Test < Test::Unit::TestCase
18
18
  end
19
19
 
20
20
  def test_uses_element_attributes_from_link_handler
21
- assert_generates '<p><a class="empty" href="http://www.example.com/wiki/InternalLink">This is just an internal link</a></p>',
21
+ assert_generates '<p><a href="http://www.example.com/wiki/InternalLink" class="empty">This is just an internal link</a></p>',
22
22
  '[[InternalLink|This is just an internal link]]',
23
23
  ClassEmptyLinkHandler.new
24
24
  end
@@ -47,6 +47,18 @@ class HTMLGenerator_Test < Test::Unit::TestCase
47
47
  FullLinkHandler.new
48
48
  end
49
49
 
50
+ def test_handles_category_links
51
+ assert_generates '<p><a class="category" href="http://www.mywiki.net/wiki/Category:Foo">More articles on Foo</a></p>',
52
+ "[[:Category:Foo|More articles on Foo]]",
53
+ CategoryLinkHandler.new
54
+ end
55
+
56
+ def test_handles_category_directives
57
+ assert_generates '<p><div id="catlinks">This page belongs to the <a class="category" href="http://www.mywiki.net/wiki/Category:Foo">Foo category</a></div></p>',
58
+ "[[Category:Foo]]",
59
+ CategoryDirectiveHandler.new
60
+ end
61
+
50
62
  private
51
63
 
52
64
  def assert_generates(result, input, link_handler=nil, message=nil)
@@ -95,3 +107,16 @@ class FullLinkHandler < MediaWikiLinkHandler
95
107
  end
96
108
  end
97
109
 
110
+ class CategoryLinkHandler
111
+ def link_for_category(locator, text)
112
+ %(<a class="category" href="http://www.mywiki.net/wiki/Category:#{locator}">#{text}</a>)
113
+ end
114
+ end
115
+
116
+ class CategoryDirectiveHandler
117
+ def category_add(name, sort)
118
+ %(<div id="catlinks">This page belongs to the <a class="category" href="http://www.mywiki.net/wiki/Category:#{name}">#{name} category</a></div>)
119
+ end
120
+ end
121
+
122
+
@@ -137,6 +137,10 @@ class Lexer_Test < Test::Unit::TestCase
137
137
  [[:PARA_START, ""], [:LINK_START, ""], [:TEXT, "http://example.com"], [:LINK_END, ""],
138
138
  [:PARA_END, ""], [false, false]],
139
139
  lex("http://example.com"))
140
+ assert_equal(
141
+ [[:PARA_START, ""], [:LINK_START, ""], [:TEXT, "https://example.com"], [:LINK_END, ""],
142
+ [:PARA_END, ""], [false, false]],
143
+ lex("https://example.com"))
140
144
  assert_equal(
141
145
  [[:PARA_START, ""], [:LINK_START, ""], [:TEXT, "http://example.com"], [:LINK_END, ""],
142
146
  [:PARA_END, ""], [false, false]],
@@ -333,6 +337,12 @@ class Lexer_Test < Test::Unit::TestCase
333
337
  lex("<nowiki><u>uuu</u></nowiki>"))
334
338
  end
335
339
 
340
+ def test_math
341
+ assert_equal([[:PARA_START, ""], [:TAG_START, "math"], [:TEXT, "1 == 1 == 1"], [:TAG_END, "math"],
342
+ [:PARA_END, ""], [false, false]],
343
+ lex("<math>1 == 1 == 1</math>"))
344
+ end
345
+
336
346
  def test_variable
337
347
  assert_equal([[:PARA_START, ""], [:VARIABLE_START, "{{"], [:TEXT, "ref"], [:VARIABLE_END, "}}"],
338
348
  [:PARA_END, ""], [false, false]],
metadata CHANGED
@@ -1,81 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.4
3
+ specification_version: 1
2
4
  name: motiro
3
5
  version: !ruby/object:Gem::Version
4
- version: 0.6.10
6
+ version: 0.6.11
7
+ date: 2008-05-12 00:00:00 -03:00
8
+ summary: Simple project tracking tool
9
+ require_paths:
10
+ - .
11
+ email: thiago.arrais@gmail.com
12
+ homepage: http://www.motiro.org
13
+ rubyforge_project: motiro
14
+ description:
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
5
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
6
29
  authors:
7
30
  - Thiago Arrais
8
- autorequire:
9
- bindir: bin
10
- cert_chain: []
11
-
12
- date: 2008-03-12 00:00:00 -03:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: rails
17
- version_requirement:
18
- version_requirements: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - "="
21
- - !ruby/object:Gem::Version
22
- version: 2.0.2
23
- version:
24
- - !ruby/object:Gem::Dependency
25
- name: daemons
26
- version_requirement:
27
- version_requirements: !ruby/object:Gem::Requirement
28
- requirements:
29
- - - ">="
30
- - !ruby/object:Gem::Version
31
- version: 1.0.6
32
- version:
33
- - !ruby/object:Gem::Dependency
34
- name: sqlite3-ruby
35
- version_requirement:
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 1.2.1
41
- version:
42
- - !ruby/object:Gem::Dependency
43
- name: flexmock
44
- version_requirement:
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: 0.6.1
50
- version:
51
- - !ruby/object:Gem::Dependency
52
- name: rails-app-installer
53
- version_requirement:
54
- version_requirements: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - "="
57
- - !ruby/object:Gem::Version
58
- version: 0.2.0
59
- version:
60
- - !ruby/object:Gem::Dependency
61
- name: diff-lcs
62
- version_requirement:
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: 1.1.2
68
- version:
69
- description:
70
- email: thiago.arrais@gmail.com
71
- executables:
72
- - motiro
73
- extensions: []
74
-
75
- extra_rdoc_files: []
76
-
77
31
  files:
78
- - components
79
32
  - installer
80
33
  - installer/rails_installer_defaults.yml
81
34
  - script
@@ -98,8 +51,6 @@ files:
98
51
  - script/console
99
52
  - script/breakpointer
100
53
  - Rakefile
101
- - build
102
- - build/build.rb
103
54
  - db
104
55
  - db/motirodb.sqlite.initial
105
56
  - db/schema_version
@@ -149,8 +100,6 @@ files:
149
100
  - config/initializers/globalize.rb
150
101
  - config/initializers/mime_types.rb
151
102
  - config/motiro.yml
152
- - config/report
153
- - config/report/subversion.yml
154
103
  - config/routes.rb
155
104
  - bin
156
105
  - bin/motiro
@@ -171,6 +120,7 @@ files:
171
120
  - app/views/wiki/edit.rhtml
172
121
  - app/views/wiki/show.rhtml
173
122
  - app/views/wiki/_show_event.rhtml
123
+ - app/views/wiki/raw.rhtml
174
124
  - app/views/wiki/_properties_edit.rhtml
175
125
  - app/views/wiki/_editor.rhtml
176
126
  - app/views/events
@@ -186,6 +136,7 @@ files:
186
136
  - app/views/javascript/motiro.rjs
187
137
  - app/views/root
188
138
  - app/views/root/index.rhtml
139
+ - app/views/root/license.rhtml
189
140
  - app/views/layouts
190
141
  - app/views/layouts/_bottom.rhtml
191
142
  - app/views/layouts/_header.rhtml
@@ -209,6 +160,7 @@ files:
209
160
  - app/core/wiki_reporter.rb
210
161
  - app/core/reporter_driver.rb
211
162
  - app/core/cache_reporter.rb
163
+ - app/core/license.rb
212
164
  - app/core/chief_editor.rb
213
165
  - app/core/reporter_fetcher.rb
214
166
  - app/core/wiki_page_not_found.rb
@@ -283,10 +235,11 @@ files:
283
235
  - public/dispatch.rb
284
236
  - public/favicon.ico
285
237
  - public/images
286
- - public/images/rss.png
287
- - public/images/done.png
288
- - public/images/not-done.png
289
- - public/images/calendar.png
238
+ - public/images/not-done.gif
239
+ - public/images/calendar.gif
240
+ - public/images/rss.gif
241
+ - public/images/done.gif
242
+ - public/images/error.gif
290
243
  - public/stylesheets
291
244
  - public/stylesheets/niftyCorners.css
292
245
  - public/stylesheets/scaffold.css
@@ -628,31 +581,70 @@ files:
628
581
  - vendor/mediacloth.rb
629
582
  - log/.keepdir
630
583
  - vendor/motiro-installer.rb
631
- has_rdoc: false
632
- homepage: http://www.motiro.org
633
- post_install_message:
584
+ test_files: []
585
+
634
586
  rdoc_options: []
635
587
 
636
- require_paths:
637
- - .
638
- required_ruby_version: !ruby/object:Gem::Requirement
639
- requirements:
640
- - - ">="
641
- - !ruby/object:Gem::Version
642
- version: "0"
643
- version:
644
- required_rubygems_version: !ruby/object:Gem::Requirement
645
- requirements:
646
- - - ">="
647
- - !ruby/object:Gem::Version
648
- version: "0"
649
- version:
650
- requirements: []
588
+ extra_rdoc_files: []
651
589
 
652
- rubyforge_project: motiro
653
- rubygems_version: 1.0.1
654
- signing_key:
655
- specification_version: 2
656
- summary: Simple project tracking tool
657
- test_files: []
590
+ executables:
591
+ - motiro
592
+ extensions: []
658
593
 
594
+ requirements: []
595
+
596
+ dependencies:
597
+ - !ruby/object:Gem::Dependency
598
+ name: rails
599
+ version_requirement:
600
+ version_requirements: !ruby/object:Gem::Version::Requirement
601
+ requirements:
602
+ - - "="
603
+ - !ruby/object:Gem::Version
604
+ version: 2.0.2
605
+ version:
606
+ - !ruby/object:Gem::Dependency
607
+ name: daemons
608
+ version_requirement:
609
+ version_requirements: !ruby/object:Gem::Version::Requirement
610
+ requirements:
611
+ - - ">="
612
+ - !ruby/object:Gem::Version
613
+ version: 1.0.6
614
+ version:
615
+ - !ruby/object:Gem::Dependency
616
+ name: sqlite3-ruby
617
+ version_requirement:
618
+ version_requirements: !ruby/object:Gem::Version::Requirement
619
+ requirements:
620
+ - - ">="
621
+ - !ruby/object:Gem::Version
622
+ version: 1.2.1
623
+ version:
624
+ - !ruby/object:Gem::Dependency
625
+ name: flexmock
626
+ version_requirement:
627
+ version_requirements: !ruby/object:Gem::Version::Requirement
628
+ requirements:
629
+ - - ">="
630
+ - !ruby/object:Gem::Version
631
+ version: 0.6.1
632
+ version:
633
+ - !ruby/object:Gem::Dependency
634
+ name: rails-app-installer
635
+ version_requirement:
636
+ version_requirements: !ruby/object:Gem::Version::Requirement
637
+ requirements:
638
+ - - "="
639
+ - !ruby/object:Gem::Version
640
+ version: 0.2.0
641
+ version:
642
+ - !ruby/object:Gem::Dependency
643
+ name: diff-lcs
644
+ version_requirement:
645
+ version_requirements: !ruby/object:Gem::Version::Requirement
646
+ requirements:
647
+ - - ">="
648
+ - !ruby/object:Gem::Version
649
+ version: 1.1.2
650
+ version: