motiro 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. data/LICENSE +280 -0
  2. data/README +28 -0
  3. data/README.en +175 -0
  4. data/README.pt-br +175 -0
  5. data/Rakefile +10 -0
  6. data/app/controllers/account_controller.rb +62 -0
  7. data/app/controllers/application.rb +72 -0
  8. data/app/controllers/edition_controller.rb +13 -0
  9. data/app/controllers/javascript_controller.rb +21 -0
  10. data/app/controllers/report_controller.rb +79 -0
  11. data/app/controllers/root_controller.rb +7 -0
  12. data/app/controllers/wiki_controller.rb +102 -0
  13. data/app/core/cache_reporter.rb +53 -0
  14. data/app/core/cache_reporter_fetcher.rb +33 -0
  15. data/app/core/chief_editor.rb +69 -0
  16. data/app/core/reporter.rb +105 -0
  17. data/app/core/reporter_driver.rb +36 -0
  18. data/app/core/reporter_fetcher.rb +39 -0
  19. data/app/core/settings.rb +43 -0
  20. data/app/core/version.rb +1 -0
  21. data/app/core/wiki_page_not_found.rb +33 -0
  22. data/app/core/wiki_reporter.rb +83 -0
  23. data/app/helpers/account_helper.rb +2 -0
  24. data/app/helpers/application_helper.rb +68 -0
  25. data/app/helpers/default_page_provider.rb +28 -0
  26. data/app/helpers/report_helper.rb +2 -0
  27. data/app/helpers/root_helper.rb +2 -0
  28. data/app/helpers/wiki_helper.rb +3 -0
  29. data/app/models/change.rb +96 -0
  30. data/app/models/diff_table_builder.rb +285 -0
  31. data/app/models/event.rb +18 -0
  32. data/app/models/headline.rb +109 -0
  33. data/app/models/page.rb +114 -0
  34. data/app/models/page_sweeper.rb +26 -0
  35. data/app/models/user.rb +85 -0
  36. data/app/ports/chdir_runner.rb +36 -0
  37. data/app/ports/reporter_loader.rb +9 -0
  38. data/app/ports/runner.rb +64 -0
  39. data/app/reporters/darcs_connection.rb +54 -0
  40. data/app/reporters/darcs_reporter.rb +104 -0
  41. data/app/reporters/darcs_settings.rb +9 -0
  42. data/app/reporters/darcs_temp_repo.rb +40 -0
  43. data/app/reporters/events_reporter.rb +28 -0
  44. data/app/reporters/features_reporter.rb +24 -0
  45. data/app/reporters/subversion_reporter.rb +203 -0
  46. data/app/reporters/svn_connection.rb +62 -0
  47. data/app/reporters/svn_settings.rb +40 -0
  48. data/app/views/account/_authorization.rhtml +54 -0
  49. data/app/views/account/_availability.rhtml +5 -0
  50. data/app/views/account/availability.rhtml +1 -0
  51. data/app/views/account/login.rhtml +22 -0
  52. data/app/views/account/logout.rhtml +10 -0
  53. data/app/views/javascript/motiro.rjs +132 -0
  54. data/app/views/javascript/niftycube.rjs +300 -0
  55. data/app/views/layouts/_bottom.rhtml +5 -0
  56. data/app/views/layouts/_header.rhtml +7 -0
  57. data/app/views/layouts/_top.rhtml +25 -0
  58. data/app/views/layouts/application.rhtml +3 -0
  59. data/app/views/layouts/scaffold.rhtml +13 -0
  60. data/app/views/layouts/wiki_edit.rhtml +26 -0
  61. data/app/views/report/list.rhtml +32 -0
  62. data/app/views/report/older.rhtml +26 -0
  63. data/app/views/report/rss.rxml +29 -0
  64. data/app/views/report/show.rhtml +20 -0
  65. data/app/views/root/index.rhtml +33 -0
  66. data/app/views/wiki/_editbar.rhtml +26 -0
  67. data/app/views/wiki/_properties_edit.rhtml +5 -0
  68. data/app/views/wiki/_properties_show.rhtml +5 -0
  69. data/app/views/wiki/edit.rhtml +56 -0
  70. data/app/views/wiki/properties_edit.rhtml +1 -0
  71. data/app/views/wiki/show.rhtml +9 -0
  72. data/bin/motiro +44 -0
  73. data/config/boot.rb +19 -0
  74. data/config/database.yml +14 -0
  75. data/config/environment.rb +64 -0
  76. data/config/environments/development.rb +20 -0
  77. data/config/environments/production.rb +19 -0
  78. data/config/environments/test.rb +19 -0
  79. data/config/motiro.yml +43 -0
  80. data/config/routes.rb +79 -0
  81. data/db/migrate/005_globalize_migration.rb +11363 -0
  82. data/db/migrate/006_remove_headline_title.rb +14 -0
  83. data/db/migrate/007_stretch_rid.rb +11 -0
  84. data/db/migrate/008_add_page_editors.rb +12 -0
  85. data/db/migrate/009_add_page_original_author.rb +12 -0
  86. data/db/migrate/010_remove_empty_string_defaults_from_pages.rb +17 -0
  87. data/db/migrate/011_add_title_and_kind_to_pages.rb +13 -0
  88. data/db/migrate/012_page_modification_info.rb +13 -0
  89. data/db/migrate/013_nullify_initial_page_attributes.rb +21 -0
  90. data/db/migrate/014_events_are_wiki_pages.rb +13 -0
  91. data/db/migrate/015_migrate_previous_event_data.rb +23 -0
  92. data/db/migrate/1_initial_structure.rb +36 -0
  93. data/db/migrate/2_add_authentication.rb +12 -0
  94. data/db/migrate/3_drop_articles.rb +26 -0
  95. data/db/migrate/4_add_page_editing.rb +14 -0
  96. data/db/motirodb.sqlite.initial +0 -0
  97. data/db/schema_version +1 -0
  98. data/db/translation/pt-BR.rb +76 -0
  99. data/doc/README_FOR_APP +2 -0
  100. data/installer/rails_installer_defaults.yml +5 -0
  101. data/lib/import_translations.rb +154 -0
  102. data/lib/login_system.rb +89 -0
  103. data/lib/relative_time.rb +48 -0
  104. data/lib/string_extensions.rb +10 -0
  105. data/lib/stub_hash.rb +22 -0
  106. data/lib/tasks/packaging.rake +93 -0
  107. data/lib/tasks/testing.rake +32 -0
  108. data/lib/tick_daemon.rb +41 -0
  109. data/lib/translator.rb +67 -0
  110. data/lib/wiki_renderer.rb +42 -0
  111. data/lib/wiki_url_generator.rb +29 -0
  112. data/log/.keepdir +0 -0
  113. data/public/404.html +8 -0
  114. data/public/500.html +8 -0
  115. data/public/dispatch.cgi +10 -0
  116. data/public/dispatch.fcgi +24 -0
  117. data/public/dispatch.rb +10 -0
  118. data/public/favicon.ico +0 -0
  119. data/public/images/calendar.png +0 -0
  120. data/public/images/rss.png +0 -0
  121. data/public/javascripts/controls.js +750 -0
  122. data/public/javascripts/dragdrop.js +584 -0
  123. data/public/javascripts/effects.js +854 -0
  124. data/public/javascripts/prototype.js +1785 -0
  125. data/public/robots.txt +1 -0
  126. data/public/stylesheets/motiro.css +269 -0
  127. data/public/stylesheets/niftyCorners.css +35 -0
  128. data/public/stylesheets/scaffold.css +74 -0
  129. data/script/about +3 -0
  130. data/script/breakpointer +3 -0
  131. data/script/console +3 -0
  132. data/script/destroy +3 -0
  133. data/script/generate +3 -0
  134. data/script/performance/benchmarker +3 -0
  135. data/script/performance/profiler +3 -0
  136. data/script/plugin +3 -0
  137. data/script/process/reaper +3 -0
  138. data/script/process/spawner +3 -0
  139. data/script/process/spinner +3 -0
  140. data/script/runner +3 -0
  141. data/script/server +3 -0
  142. data/script/ticker +29 -0
  143. data/test/acceptance/account_test.rb +186 -0
  144. data/test/acceptance/darcs_test.rb +62 -0
  145. data/test/acceptance/events_test.rb +47 -0
  146. data/test/acceptance/main_page_test.rb +92 -0
  147. data/test/acceptance/subversion_test.rb +319 -0
  148. data/test/acceptance/ts_all_suites.rb +27 -0
  149. data/test/acceptance/wiki_test.rb +202 -0
  150. data/test/contract/darcs_test.rb +51 -0
  151. data/test/contract/remote_darcs_test.rb +61 -0
  152. data/test/contract/svn_test.rb +53 -0
  153. data/test/fixtures/changes.yml +25 -0
  154. data/test/fixtures/headlines.yml +45 -0
  155. data/test/fixtures/pages.yml +98 -0
  156. data/test/fixtures/users.yml +31 -0
  157. data/test/functional/account_controller_test.rb +96 -0
  158. data/test/functional/report_controller_test.rb +113 -0
  159. data/test/functional/report_features_test.rb +38 -0
  160. data/test/functional/report_subversion_test.rb +79 -0
  161. data/test/functional/root_controller_test.rb +127 -0
  162. data/test/functional/wiki_controller_test.rb +280 -0
  163. data/test/lib/acceptance_test_case.rb +43 -0
  164. data/test/lib/configuration.rb +53 -0
  165. data/test/lib/darcs_excerpts.rb +181 -0
  166. data/test/lib/darcs_repo.rb +77 -0
  167. data/test/lib/live_mode_test.rb +51 -0
  168. data/test/lib/local_svn.rb +157 -0
  169. data/test/lib/netutils.rb +42 -0
  170. data/test/lib/platform_thread.rb +62 -0
  171. data/test/lib/repoutils.rb +23 -0
  172. data/test/lib/selenium_extensions.rb +32 -0
  173. data/test/lib/stubio.rb +37 -0
  174. data/test/lib/svn_excerpts.rb +288 -0
  175. data/test/lib/test_configuration.rb +14 -0
  176. data/test/lib/webserver.rb +71 -0
  177. data/test/meta/configuration_test.rb +72 -0
  178. data/test/meta/darcs_repo_test.rb +118 -0
  179. data/test/meta/local_svn_test.rb +125 -0
  180. data/test/meta/platform_thread_test.rb +46 -0
  181. data/test/meta/stubio_test.rb +44 -0
  182. data/test/mocks/headline.rb +34 -0
  183. data/test/mocks/svn_reporter.rb +29 -0
  184. data/test/stubs/svn_settings.rb +19 -0
  185. data/test/stubs/url_generator.rb +24 -0
  186. data/test/test_helper.rb +36 -0
  187. data/test/unit/cache_reporter_fetcher_test.rb +46 -0
  188. data/test/unit/cache_reporter_test.rb +97 -0
  189. data/test/unit/caching_test.rb +78 -0
  190. data/test/unit/change_test.rb +152 -0
  191. data/test/unit/chdir_runner_test.rb +77 -0
  192. data/test/unit/chief_editor_test.rb +234 -0
  193. data/test/unit/darcs_connection_test.rb +109 -0
  194. data/test/unit/darcs_reporter_test.rb +146 -0
  195. data/test/unit/darcs_settings_test.rb +37 -0
  196. data/test/unit/darcs_temp_repo_test.rb +51 -0
  197. data/test/unit/default_page_provider_test.rb +46 -0
  198. data/test/unit/diff_table_builder_test.rb +602 -0
  199. data/test/unit/headline_test.rb +259 -0
  200. data/test/unit/page_test.rb +145 -0
  201. data/test/unit/relative_time_test.rb +56 -0
  202. data/test/unit/reporter_driver_test.rb +85 -0
  203. data/test/unit/reporter_fetcher_test.rb +31 -0
  204. data/test/unit/reporter_test.rb +81 -0
  205. data/test/unit/runner_test.rb +93 -0
  206. data/test/unit/settings_test.rb +55 -0
  207. data/test/unit/string_extensions_test.rb +10 -0
  208. data/test/unit/svn_connection_test.rb +183 -0
  209. data/test/unit/svn_reporter_interaction_test.rb +38 -0
  210. data/test/unit/svn_reporter_test.rb +286 -0
  211. data/test/unit/svn_settings_test.rb +86 -0
  212. data/test/unit/translator_test.rb +96 -0
  213. data/test/unit/user_test.rb +125 -0
  214. data/test/unit/wiki_renderer_test.rb +87 -0
  215. data/test/unit/wiki_reporter_test.rb +94 -0
  216. data/test/unit/wiki_url_generator_test.rb +31 -0
  217. data/vendor/motiro-installer.rb +159 -0
  218. data/vendor/plugins/globalize/LICENSE +9 -0
  219. data/vendor/plugins/globalize/README +49 -0
  220. data/vendor/plugins/globalize/data/country_data.csv +240 -0
  221. data/vendor/plugins/globalize/data/language_data.csv +188 -0
  222. data/vendor/plugins/globalize/data/translation_data.csv +3421 -0
  223. data/vendor/plugins/globalize/generators/globalize/USAGE +10 -0
  224. data/vendor/plugins/globalize/generators/globalize/globalize_generator.rb +42 -0
  225. data/vendor/plugins/globalize/generators/globalize/templates/migration.rb.gz +0 -0
  226. data/vendor/plugins/globalize/generators/globalize/templates/tiny_migration.rb.gz +0 -0
  227. data/vendor/plugins/globalize/init.rb +30 -0
  228. data/vendor/plugins/globalize/lib/globalize/localization/core_ext.rb +170 -0
  229. data/vendor/plugins/globalize/lib/globalize/localization/core_ext_hooks.rb +33 -0
  230. data/vendor/plugins/globalize/lib/globalize/localization/db_translate.rb +494 -0
  231. data/vendor/plugins/globalize/lib/globalize/localization/db_view_translator.rb +152 -0
  232. data/vendor/plugins/globalize/lib/globalize/localization/locale.rb +173 -0
  233. data/vendor/plugins/globalize/lib/globalize/localization/rfc_3066.rb +40 -0
  234. data/vendor/plugins/globalize/lib/globalize/models/country.rb +24 -0
  235. data/vendor/plugins/globalize/lib/globalize/models/currency.rb +188 -0
  236. data/vendor/plugins/globalize/lib/globalize/models/language.rb +84 -0
  237. data/vendor/plugins/globalize/lib/globalize/models/model_translation.rb +4 -0
  238. data/vendor/plugins/globalize/lib/globalize/models/translation.rb +9 -0
  239. data/vendor/plugins/globalize/lib/globalize/models/view_translation.rb +14 -0
  240. data/vendor/plugins/globalize/lib/globalize/rails/action_mailer.rb +125 -0
  241. data/vendor/plugins/globalize/lib/globalize/rails/action_view.rb +79 -0
  242. data/vendor/plugins/globalize/lib/globalize/rails/active_record.rb +129 -0
  243. data/vendor/plugins/globalize/lib/globalize/rails/active_record_helper.rb +33 -0
  244. data/vendor/plugins/globalize/populators/pop_dates.rb +81 -0
  245. data/vendor/plugins/globalize/populators/pop_migration.rb +18 -0
  246. data/vendor/plugins/globalize/populators/pop_pluralization.rb +26 -0
  247. data/vendor/plugins/globalize/populators/pop_seps.rb +32 -0
  248. data/vendor/plugins/globalize/tasks/data.rake +130 -0
  249. data/vendor/plugins/globalize/test/action_mailer_test/globalize_mailer/test.en-US.plain.text.rhtml +1 -0
  250. data/vendor/plugins/globalize/test/action_mailer_test/globalize_mailer/test.en.plain.text.rhtml +1 -0
  251. data/vendor/plugins/globalize/test/action_mailer_test/globalize_mailer/test.he.plain.text.rhtml +1 -0
  252. data/vendor/plugins/globalize/test/action_mailer_test/globalize_mailer/test.plain.text.rhtml +1 -0
  253. data/vendor/plugins/globalize/test/action_mailer_test.rb +54 -0
  254. data/vendor/plugins/globalize/test/config/database.yml.default +16 -0
  255. data/vendor/plugins/globalize/test/config/database.yml.example +22 -0
  256. data/vendor/plugins/globalize/test/core_ext_test.rb +61 -0
  257. data/vendor/plugins/globalize/test/currency_test.rb +141 -0
  258. data/vendor/plugins/globalize/test/date_helper_test.rb +634 -0
  259. data/vendor/plugins/globalize/test/db/schema.rb +90 -0
  260. data/vendor/plugins/globalize/test/db_translation_test.rb +374 -0
  261. data/vendor/plugins/globalize/test/fixtures/globalize_categories.yml +7 -0
  262. data/vendor/plugins/globalize/test/fixtures/globalize_categories_products.yml +7 -0
  263. data/vendor/plugins/globalize/test/fixtures/globalize_countries.yml +41 -0
  264. data/vendor/plugins/globalize/test/fixtures/globalize_languages.yml +64 -0
  265. data/vendor/plugins/globalize/test/fixtures/globalize_manufacturers.yml +5 -0
  266. data/vendor/plugins/globalize/test/fixtures/globalize_products.yml +29 -0
  267. data/vendor/plugins/globalize/test/fixtures/globalize_simples.yml +5 -0
  268. data/vendor/plugins/globalize/test/fixtures/globalize_translations.yml +354 -0
  269. data/vendor/plugins/globalize/test/locale_test.rb +27 -0
  270. data/vendor/plugins/globalize/test/mime_responds_test.rb +358 -0
  271. data/vendor/plugins/globalize/test/model_test.rb +17 -0
  272. data/vendor/plugins/globalize/test/standard_data_test_helper.rb +33 -0
  273. data/vendor/plugins/globalize/test/test_helper.rb +19 -0
  274. data/vendor/plugins/globalize/test/test_standard_data.rb +54 -0
  275. data/vendor/plugins/globalize/test/validation_test.rb +29 -0
  276. data/vendor/plugins/globalize/test/view_picking_test.rb +49 -0
  277. data/vendor/plugins/globalize/test/view_translation_test.rb +237 -0
  278. data/vendor/plugins/globalize/test/views/layouts/standard.rhtml +1 -0
  279. data/vendor/plugins/globalize/test/views/respond_to/all_types_with_layout.rhtml +1 -0
  280. data/vendor/plugins/globalize/test/views/respond_to/all_types_with_layout.rjs +1 -0
  281. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.en.rhtml +1 -0
  282. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.en.rjs +1 -0
  283. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.en.rxml +1 -0
  284. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.fr.rhtml +1 -0
  285. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.fr.rjs +1 -0
  286. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.fr.rxml +1 -0
  287. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.rhtml +1 -0
  288. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.rjs +1 -0
  289. data/vendor/plugins/globalize/test/views/respond_to/using_defaults.rxml +1 -0
  290. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.en.rhtml +1 -0
  291. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.en.rjs +1 -0
  292. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.en.rxml +1 -0
  293. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.fr.rhtml +1 -0
  294. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.fr.rjs +1 -0
  295. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.fr.rxml +1 -0
  296. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.rhtml +1 -0
  297. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.rjs +1 -0
  298. data/vendor/plugins/globalize/test/views/respond_to/using_defaults_with_type_list.rxml +1 -0
  299. data/vendor/plugins/globalize/test/views/test.he-IL.rhtml +1 -0
  300. data/vendor/plugins/globalize/test/views/test.rhtml +1 -0
  301. data/vendor/plugins/globalize/test/views/test2.he.rhtml +1 -0
  302. data/vendor/plugins/globalize/test/views/test2.rhtml +1 -0
  303. data/vendor/plugins/test_xml/MIT-LICENSE +20 -0
  304. data/vendor/plugins/test_xml/README +20 -0
  305. data/vendor/plugins/test_xml/Rakefile +22 -0
  306. data/vendor/plugins/test_xml/init.rb +7 -0
  307. data/vendor/plugins/test_xml/lib/xml_assertions.rb +22 -0
  308. data/vendor/plugins/test_xml/test/test_xml_test.rb +40 -0
  309. metadata +505 -0
data/public/robots.txt ADDED
@@ -0,0 +1 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
@@ -0,0 +1,269 @@
1
+ body {
2
+ font: normal 10pt Verdana,sans-serif;
3
+ background-color: #f0f0f0;
4
+ text-align: left;
5
+ padding: 1em 2em;
6
+ }
7
+
8
+ #notice {
9
+ border: 2px solid red;
10
+ padding: 0.5em;
11
+ margin-bottom: 1em;
12
+ background-color: red;
13
+ font: bold smaller sans-serif;
14
+ color: #ffffff;
15
+ }
16
+
17
+ #summary {
18
+ font: smaller courier;
19
+ }
20
+
21
+ #changes {
22
+ display: none;
23
+ }
24
+
25
+ #header {
26
+ margin: 0;
27
+ padding: 0;
28
+ position: relative;
29
+ height: 3em;
30
+ }
31
+
32
+ div.authorization_cell {
33
+ width: 9.1em;
34
+ float: left;
35
+ }
36
+
37
+ #rightside {
38
+ float: right;
39
+ }
40
+
41
+ div.pagetext {
42
+ background-color: #FFF;
43
+ margin: 4px 0 4px 0;
44
+ padding: 0 .8em .4em .8em;
45
+ border: 1px solid #679cd2;
46
+ }
47
+
48
+ div.channel div.pagetext, div.pagetext div.pagetext {
49
+ background-color: #FFF;
50
+ margin: 0;
51
+ padding: 0;
52
+ border: 0;
53
+ }
54
+
55
+ div#crumbs {
56
+ border-bottom: solid #d0d0d0 1px;
57
+ margin-bottom: -1em;
58
+ padding: .2em 0 .2em 0;
59
+ color: #808080
60
+ }
61
+
62
+ #mainpage {
63
+ margin: 4px 332px 4px 0;
64
+ }
65
+
66
+ div.channel {
67
+ width: 316px;
68
+ margin: 4px 4px 4px 4px;
69
+ }
70
+
71
+ div.channel-title {
72
+ font-weight: bold;
73
+ margin:0;
74
+ padding: 0 2px 1px 8px;
75
+ color: #000;
76
+ background: #a0ccee;
77
+ }
78
+
79
+ div.channel-body-outer {
80
+ padding: 0 9px 0 9px;
81
+ background: #a0ccee;
82
+ }
83
+
84
+ a.feed {
85
+ display: block;
86
+ float: right;
87
+ margin: 14px 10px;
88
+ }
89
+
90
+ div.window {
91
+ background-color: #a0ccee;
92
+ padding: 8px 8px 8px 8px;
93
+ margin: 0 0 .48em 0;
94
+ }
95
+
96
+ div.inner {
97
+ background: #FFF;
98
+ padding: 4px 4px 12px 4px;
99
+ }
100
+
101
+ div.toolbar {
102
+ font-size: 0.8em;
103
+ }
104
+
105
+ div.editbar {
106
+ border-top: 1px dotted #9C9C9C;
107
+ }
108
+
109
+ div.editbar p { margin-top: 0 }
110
+
111
+ div.channel_toolbar {
112
+ border-bottom: 1px dotted #9C9C9C;
113
+ }
114
+
115
+
116
+ .disabled {
117
+ color: gray;
118
+ }
119
+
120
+ .marked {
121
+ color: #F00;
122
+ background: #FFA;
123
+ }
124
+
125
+ .changed {
126
+ background:#FFD;
127
+ }
128
+
129
+ table.diff {
130
+ border: solid gray;
131
+ border-width: 1px 0 1px 0;
132
+ font-family: monospace;
133
+ font-size: 0.72em;
134
+ }
135
+
136
+ table.diff pre {
137
+ margin: 0;
138
+ padding: 0;
139
+ text-align: left;
140
+ }
141
+
142
+ table.diff tr {
143
+ margin: 0 0 0 0;
144
+ padding: 0 0 0 0;
145
+ border: 0;
146
+ }
147
+
148
+ table.diff td {
149
+ padding: 0 0.4em 0 0.4em;
150
+ }
151
+
152
+ table.diff td.left {
153
+ border:solid;
154
+ border-color: black gray black black;
155
+ }
156
+
157
+ table.diff td.right {
158
+ border:solid black;
159
+ }
160
+
161
+ table.diff td.line_number {
162
+ text-align: center;
163
+ border:solid gray;
164
+ border-width: 0 1px 0 1px;
165
+ }
166
+
167
+ table.oldernews {
168
+ border-spacing: 0;
169
+ text-align: left;
170
+ font-size: .85em;
171
+ width: 100%;
172
+ }
173
+
174
+ table.oldernews tr.even { background-color: #fff; }
175
+
176
+ table.oldernews tr.odd { background-color: #eee; }
177
+
178
+ table.oldernews thead { background-color: #d0d0d0; }
179
+
180
+ table.oldernews tbody th { border: 1px #c9c9c9 solid; }
181
+
182
+ table.oldernews tbody td { border: 1px #c9c9c9 solid; }
183
+
184
+ table.oldernews .date { border-right-width: 0; }
185
+
186
+ table.oldernews .relative { border-left-width: 0; }
187
+
188
+ input {
189
+ border: solid 1px #80aacc;
190
+ margin: .2em 0 0 0;
191
+ }
192
+
193
+ input.button {
194
+ background-color: #b0ddff;
195
+ }
196
+
197
+ input.checkbox {
198
+ border: none;
199
+ }
200
+
201
+ input#txtTitle {
202
+ font-size: x-large;
203
+ font-family: courier;
204
+ margin-top: .2em;
205
+ margin-bottom: .4em;
206
+ }
207
+
208
+ textarea {
209
+ border: solid 1px #80aacc;
210
+ width: 100%;
211
+ }
212
+
213
+ div#editor div.inner {
214
+ background-color: #e8f2f2;
215
+ }
216
+
217
+ div#page_properties {
218
+ margin: 0;
219
+ float: left;
220
+ width: 42em;
221
+ }
222
+
223
+ div#loading {
224
+ display: none;
225
+ background-color: #123bd7;
226
+ color: #fff;
227
+ float: right;
228
+ padding: 0.2em;
229
+ }
230
+
231
+ div#wiki_reference {
232
+ margin: 0;
233
+ margin-left: 43.6em;
234
+ }
235
+
236
+ div#page_properties div.inner {
237
+ background-color: #e8f2f2;
238
+ }
239
+
240
+ #footer {
241
+ padding: 4px 6px 2px 8px;
242
+ font-size: x-small;
243
+ text-align: center;
244
+ color: gray;
245
+ clear: left;
246
+ }
247
+
248
+ span.warning {
249
+ border: 1px solid #F33;
250
+ background: #FFA;
251
+ padding: 0 3px 0 3px
252
+ }
253
+
254
+ #username_not_available {
255
+ position: absolute;
256
+ top: 12px;
257
+ left: 64px;
258
+ z-index: 6;
259
+ }
260
+
261
+ #passwords_do_not_match {
262
+ position: absolute;
263
+ top: 12px;
264
+ left: 174px;
265
+ z-index: 6;
266
+ }
267
+
268
+ a:link { color: #3333f0 }
269
+ a:visited { color: #88d }
@@ -0,0 +1,35 @@
1
+ /*Nifty Corners Cube CSS by Alessandro Fulciniti
2
+ The following classes are added dinamically by javascript,
3
+ and their use should be avoided in the markup */
4
+
5
+ b.niftycorners,b.niftyfill{display:block}
6
+ b.niftycorners *{display:block;height: 1px;line-height:1px;font-size: 1px;
7
+ overflow:hidden;border-style:solid;border-width: 0 1px}
8
+ /*normal*/
9
+ b.r1{margin: 0 3px;border-width: 0 2px}
10
+ b.r2{margin: 0 2px}
11
+ b.r3{margin: 0 1px}
12
+ b.r4{height: 2px}
13
+ b.rb1{margin: 0 8px;border-width:0 2px}
14
+ b.rb2{margin: 0 6px;border-width:0 2px}
15
+ b.rb3{margin: 0 5px}
16
+ b.rb4{margin: 0 4px}
17
+ b.rb5{margin: 0 3px}
18
+ b.rb6{margin: 0 2px}
19
+ b.rb7{margin: 0 1px;height:2px}
20
+ b.rb8{margin: 0;height:2px}
21
+ b.rs1{margin: 0 1px}
22
+ /*transparent inside*/
23
+ b.t1{border-width: 0 5px}
24
+ b.t2{border-width: 0 3px}
25
+ b.t3{border-width: 0 2px}
26
+ b.t4{height: 2px}
27
+ b.tb1{border-width: 0 10px}
28
+ b.tb2{border-width: 0 8px}
29
+ b.tb3{border-width: 0 6px}
30
+ b.tb4{border-width: 0 5px}
31
+ b.tb5{border-width: 0 4px}
32
+ b.tb6{border-width: 0 3px}
33
+ b.tb7{border-width: 0 2px;height:2px}
34
+ b.tb8{border-width: 0 1px;height:2px}
35
+ b.ts1{border-width: 0 2px}
@@ -0,0 +1,74 @@
1
+ body { background-color: #fff; color: #333; }
2
+
3
+ body, p, ol, ul, td {
4
+ font-family: verdana, arial, helvetica, sans-serif;
5
+ font-size: 13px;
6
+ line-height: 18px;
7
+ }
8
+
9
+ pre {
10
+ background-color: #eee;
11
+ padding: 10px;
12
+ font-size: 11px;
13
+ }
14
+
15
+ a { color: #000; }
16
+ a:visited { color: #666; }
17
+ a:hover { color: #fff; background-color:#000; }
18
+
19
+ .fieldWithErrors {
20
+ padding: 2px;
21
+ background-color: red;
22
+ display: table;
23
+ }
24
+
25
+ #errorExplanation {
26
+ width: 400px;
27
+ border: 2px solid red;
28
+ padding: 7px;
29
+ padding-bottom: 12px;
30
+ margin-bottom: 20px;
31
+ background-color: #f0f0f0;
32
+ }
33
+
34
+ #errorExplanation h2 {
35
+ text-align: left;
36
+ font-weight: bold;
37
+ padding: 5px 5px 5px 15px;
38
+ font-size: 12px;
39
+ margin: -7px;
40
+ background-color: #c00;
41
+ color: #fff;
42
+ }
43
+
44
+ #errorExplanation p {
45
+ color: #333;
46
+ margin-bottom: 0;
47
+ padding: 5px;
48
+ }
49
+
50
+ #errorExplanation ul li {
51
+ font-size: 12px;
52
+ list-style: square;
53
+ }
54
+
55
+ div.uploadStatus {
56
+ margin: 5px;
57
+ }
58
+
59
+ div.progressBar {
60
+ margin: 5px;
61
+ }
62
+
63
+ div.progressBar div.border {
64
+ background-color: #fff;
65
+ border: 1px solid grey;
66
+ width: 100%;
67
+ }
68
+
69
+ div.progressBar div.background {
70
+ background-color: #333;
71
+ height: 18px;
72
+ width: 0%;
73
+ }
74
+
data/script/about ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/about'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/breakpointer'
data/script/console ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/console'
data/script/destroy ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/destroy'
data/script/generate ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/generate'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/benchmarker'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/profiler'
data/script/plugin ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/plugin'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/reaper'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/spawner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/spinner'
data/script/runner ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/runner'
data/script/server ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/server'
data/script/ticker ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Motiro - A project tracking tool
4
+ # Copyright (C) 2006 Thiago Arrais
5
+ #
6
+ # This program is free software; you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation; either version 2 of the License, or
9
+ # any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program; if not, write to the Free Software
18
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
+
20
+ $:.push File.expand_path(File.dirname(__FILE__) + '/../vendor')
21
+ $:.push File.expand_path(File.dirname(__FILE__) + '/../vendor/rails/activesupport/lib')
22
+
23
+ require 'rubygems'
24
+ require 'daemons'
25
+ require 'active_support'
26
+
27
+ Daemons.run File.dirname(__FILE__) + '/../lib/tick_daemon.rb',
28
+ :dir_mode => :script, :dir => '../log',
29
+ :multiple => false, :backtrace => true, :monitor => true
@@ -0,0 +1,186 @@
1
+ # Motiro - A project tracking tool
2
+ # Copyright (C) 2006-2007 Thiago Arrais
3
+ #
4
+ # This program is free software; you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation; either version 2 of the License, or
7
+ # any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program; if not, write to the Free Software
16
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
+
18
+ require File.dirname(__FILE__) + '/../test_helper'
19
+ require 'acceptance_test_case'
20
+
21
+ class AccountAcceptanceTest < AcceptanceTestCase
22
+
23
+ fixtures :users
24
+ fixtures :headlines
25
+
26
+ def test_welcomes_user
27
+ log_as(:bob)
28
+ assert_text_present 'Welcome, bob'
29
+ end
30
+
31
+ def test_switches_languages_when_logged_in
32
+ log_as(:bob)
33
+
34
+ assert_text_present 'Welcome, bob'
35
+ assert_element_present "//a[text() = 'Edit']"
36
+
37
+ click "//a[@id='pt-BR']"
38
+ wait_for_page_to_load(1500)
39
+
40
+ assert_text_present 'Bem-vindo, bob'
41
+ assert_element_present "//a[text() = 'Editar']"
42
+ end
43
+
44
+ def test_registering_new_user
45
+ open '/en'
46
+
47
+ assert_text_present 'New user?'
48
+ assert_not_visible "//label[@for='user_password_confirmation']"
49
+ assert_not_visible 'id=user_password_confirmation'
50
+
51
+ click 'chk_new_user'
52
+
53
+ assert_visible "//label[@for='user_password_confirmation']"
54
+ assert_visible 'id=user_password_confirmation'
55
+
56
+ click 'chk_new_user'
57
+
58
+ assert_not_visible "//label[@for='user_password_confirmation']"
59
+ assert_not_visible 'id=user_password_confirmation'
60
+
61
+ click 'chk_new_user'
62
+
63
+ type 'user_login', 'paul'
64
+ type 'user_password', 'mccartney'
65
+ type 'user_password_confirmation', 'mccartney'
66
+
67
+ click 'login'
68
+ wait_for_page_to_load(1500)
69
+
70
+ assert_text_present 'Welcome, paul'
71
+
72
+ log_out
73
+ log_as(:paul, 'mccartney')
74
+
75
+ assert_text_present 'Welcome, paul'
76
+ end
77
+
78
+ def test_register_existing_user
79
+ open '/'
80
+
81
+ click 'chk_new_user'
82
+ type 'user_login', 'eric'
83
+ sleep 1
84
+ wait_for_condition "selenium.page().findElement('id=username_not_available')", 1000
85
+ end
86
+
87
+ def test_do_not_show_error_tooltip_when_not_registering_new_user
88
+ open '/'
89
+
90
+ type 'user_login', 'eric'
91
+ sleep 1
92
+ assert_element_not_present 'id=username_not_available'
93
+ end
94
+
95
+ def test_edition_disabled_without_authentication
96
+ open('/en')
97
+ assert_element_present "//span[contains(text(), 'requires authentication') and @class = 'disabled']"
98
+ end
99
+
100
+ def test_edition_enabled_when_authenticated
101
+ #TODO refactor this to a declarative style
102
+ #see http://www.testing.com/cgi-bin/blog/2005/12/19
103
+ log_as(:bob)
104
+
105
+ assert_location 'exact:http://localhost:3000/en'
106
+
107
+ assert_element_present "//a[text() = 'Edit']"
108
+ click "//a[text() = 'Edit']"
109
+
110
+ wait_for_page_to_load(1000)
111
+
112
+ assert_element_present "//input[@name='btnSave']"
113
+ assert_element_present "//input[@name='btnDiscard']"
114
+ assert_element_present "//textarea[@id='txaEditor']"
115
+ end
116
+
117
+ def test_returns_to_previous_page_after_logged_in
118
+ gita = headlines('gita')
119
+ open "/report/#{gita.reported_by}/#{gita.rid}"
120
+
121
+ assert_text_present gita.description
122
+
123
+ type 'user_login', 'bob'
124
+ type 'user_password', 'test'
125
+ click 'login'
126
+ wait_for_page_to_load 1500
127
+
128
+ assert_location "exact:http://localhost:3000/report/#{gita.reported_by}/#{gita.rid}"
129
+ assert_text_present gita.description
130
+ end
131
+
132
+ def test_shows_passwords_do_not_match_warning
133
+ open '/'
134
+
135
+ click 'chk_new_user'
136
+
137
+ type 'user_login', 'neil'
138
+ type 'user_password', 'young'
139
+ sleep 1.2
140
+
141
+ assert_not_visible 'id=passwords_do_not_match'
142
+
143
+ type 'user_password_confirmation', 'youmg'
144
+ sleep 1.2
145
+
146
+ assert_visible 'id=passwords_do_not_match'
147
+ end
148
+
149
+ def test_signout_redirects_to_previous_page
150
+ log_as(:bob)
151
+
152
+ click 'signout'
153
+ wait_for_page_to_load 1500
154
+
155
+ assert_location "exact:http://localhost:3000/en"
156
+ end
157
+
158
+ def test_login_failure_shows_error_on_main_page
159
+ check_if_login_failure_shows_error_on_page('/', 'Latest news from Subversion')
160
+ end
161
+
162
+ def test_login_failure_shows_error_on_other_pages
163
+ rid = headlines('gita').rid
164
+ check_if_login_failure_shows_error_on_page(
165
+ "/report/subversion/#{rid}",
166
+ "Revision #{rid}")
167
+ end
168
+
169
+ private
170
+
171
+ def check_if_login_failure_shows_error_on_page(addr, text)
172
+ open(addr)
173
+
174
+ assert_text_not_present('Incorrect username or password')
175
+
176
+ type('user_login', 'failure')
177
+ type('user_password', 'invalid')
178
+ click('login')
179
+
180
+ wait_for_page_to_load(1500)
181
+
182
+ assert_text_present(text)
183
+ assert_text_present('Incorrect username or password')
184
+ end
185
+
186
+ end