typo 5.2.98 → 5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) hide show
  1. data/app/controllers/admin/sidebar_controller.rb +15 -3
  2. data/app/helpers/sidebar_helper.rb +9 -4
  3. data/app/models/feedback.rb +10 -2
  4. data/app/models/page_cache.rb +5 -1
  5. data/app/views/admin/blacklist/_blacklist_patterns.html.erb +2 -0
  6. data/app/views/admin/categories/new.html.erb +1 -1
  7. data/app/views/admin/content/_form.html.erb +3 -3
  8. data/app/views/admin/content/_simple_editor.html.erb +2 -0
  9. data/app/views/admin/content/_visual_editor.html.erb +2 -0
  10. data/app/views/admin/pages/_form.html.erb +5 -5
  11. data/app/views/admin/pages/_simple_editor.html.erb +2 -0
  12. data/app/views/admin/pages/_visual_editor.html.erb +2 -0
  13. data/app/views/articles/_comment_box.html.erb +1 -1
  14. data/app/views/articles/_comment_failed.html.erb +1 -1
  15. data/app/views/articles/read.html.erb +1 -1
  16. data/config/environment.rb +3 -2
  17. data/lib/tasks/release.rake +3 -4
  18. data/lib/typo_version.rb +1 -1
  19. data/public/stylesheets/administration.css +37 -2
  20. data/public/stylesheets/administration_rtl.css +316 -437
  21. data/vendor/actionwebservice/CHANGELOG +320 -0
  22. data/vendor/actionwebservice/MIT-LICENSE +21 -0
  23. data/vendor/actionwebservice/README +381 -0
  24. data/vendor/actionwebservice/Rakefile +173 -0
  25. data/vendor/actionwebservice/TODO +32 -0
  26. data/vendor/actionwebservice/examples/googlesearch/README +143 -0
  27. data/vendor/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb +50 -0
  28. data/vendor/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb +57 -0
  29. data/vendor/actionwebservice/examples/googlesearch/delegated/google_search_service.rb +108 -0
  30. data/vendor/actionwebservice/examples/googlesearch/delegated/search_controller.rb +7 -0
  31. data/vendor/actionwebservice/examples/googlesearch/direct/google_search_api.rb +50 -0
  32. data/vendor/actionwebservice/examples/googlesearch/direct/search_controller.rb +58 -0
  33. data/vendor/actionwebservice/examples/metaWeblog/README +17 -0
  34. data/vendor/actionwebservice/examples/metaWeblog/apis/blogger_api.rb +60 -0
  35. data/vendor/actionwebservice/examples/metaWeblog/apis/blogger_service.rb +34 -0
  36. data/vendor/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb +67 -0
  37. data/vendor/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb +48 -0
  38. data/vendor/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb +16 -0
  39. data/vendor/actionwebservice/generators/web_service/USAGE +28 -0
  40. data/vendor/actionwebservice/generators/web_service/templates/api_definition.rb +5 -0
  41. data/vendor/actionwebservice/generators/web_service/templates/controller.rb +8 -0
  42. data/vendor/actionwebservice/generators/web_service/templates/functional_test.rb +19 -0
  43. data/vendor/actionwebservice/generators/web_service/web_service_generator.rb +29 -0
  44. data/vendor/actionwebservice/lib/action_web_service.rb +66 -0
  45. data/vendor/actionwebservice/lib/action_web_service/api.rb +297 -0
  46. data/vendor/actionwebservice/lib/action_web_service/base.rb +38 -0
  47. data/vendor/actionwebservice/lib/action_web_service/casting.rb +144 -0
  48. data/vendor/actionwebservice/lib/action_web_service/client.rb +3 -0
  49. data/vendor/actionwebservice/lib/action_web_service/client/base.rb +28 -0
  50. data/vendor/actionwebservice/lib/action_web_service/client/soap_client.rb +113 -0
  51. data/vendor/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb +58 -0
  52. data/vendor/actionwebservice/lib/action_web_service/container.rb +3 -0
  53. data/vendor/actionwebservice/lib/action_web_service/container/action_controller_container.rb +93 -0
  54. data/vendor/actionwebservice/lib/action_web_service/container/delegated_container.rb +86 -0
  55. data/vendor/actionwebservice/lib/action_web_service/container/direct_container.rb +69 -0
  56. data/vendor/actionwebservice/lib/action_web_service/dispatcher.rb +2 -0
  57. data/vendor/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +207 -0
  58. data/vendor/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +379 -0
  59. data/vendor/actionwebservice/lib/action_web_service/invocation.rb +202 -0
  60. data/vendor/actionwebservice/lib/action_web_service/protocol.rb +4 -0
  61. data/vendor/actionwebservice/lib/action_web_service/protocol/abstract.rb +112 -0
  62. data/vendor/actionwebservice/lib/action_web_service/protocol/discovery.rb +37 -0
  63. data/vendor/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +176 -0
  64. data/vendor/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +242 -0
  65. data/vendor/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +122 -0
  66. data/vendor/actionwebservice/lib/action_web_service/scaffolding.rb +281 -0
  67. data/vendor/actionwebservice/lib/action_web_service/struct.rb +64 -0
  68. data/vendor/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb +26 -0
  69. data/vendor/actionwebservice/lib/action_web_service/support/signature_types.rb +226 -0
  70. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/layout.html.erb +65 -0
  71. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/methods.html.erb +6 -0
  72. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.html.erb +29 -0
  73. data/vendor/actionwebservice/lib/action_web_service/templates/scaffolds/result.html.erb +30 -0
  74. data/vendor/actionwebservice/lib/action_web_service/test_invoke.rb +110 -0
  75. data/vendor/actionwebservice/lib/action_web_service/version.rb +9 -0
  76. data/vendor/actionwebservice/lib/actionwebservice.rb +1 -0
  77. data/vendor/actionwebservice/setup.rb +1379 -0
  78. data/vendor/actionwebservice/test/abstract_client.rb +183 -0
  79. data/vendor/actionwebservice/test/abstract_dispatcher.rb +547 -0
  80. data/vendor/actionwebservice/test/abstract_unit.rb +33 -0
  81. data/vendor/actionwebservice/test/api_test.rb +102 -0
  82. data/vendor/actionwebservice/test/apis/auto_load_api.rb +3 -0
  83. data/vendor/actionwebservice/test/apis/broken_auto_load_api.rb +2 -0
  84. data/vendor/actionwebservice/test/base_test.rb +42 -0
  85. data/vendor/actionwebservice/test/casting_test.rb +86 -0
  86. data/vendor/actionwebservice/test/client_soap_test.rb +155 -0
  87. data/vendor/actionwebservice/test/client_xmlrpc_test.rb +153 -0
  88. data/vendor/actionwebservice/test/container_test.rb +73 -0
  89. data/vendor/actionwebservice/test/dispatcher_action_controller_soap_test.rb +137 -0
  90. data/vendor/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +59 -0
  91. data/vendor/actionwebservice/test/fixtures/db_definitions/mysql.sql +8 -0
  92. data/vendor/actionwebservice/test/fixtures/users.yml +12 -0
  93. data/vendor/actionwebservice/test/gencov +3 -0
  94. data/vendor/actionwebservice/test/invocation_test.rb +185 -0
  95. data/vendor/actionwebservice/test/run +6 -0
  96. data/vendor/actionwebservice/test/scaffolded_controller_test.rb +146 -0
  97. data/vendor/actionwebservice/test/struct_test.rb +52 -0
  98. data/vendor/actionwebservice/test/test_invoke_test.rb +112 -0
  99. data/vendor/gems/calendar_date_select-1.15/.specification +56 -0
  100. data/vendor/gems/calendar_date_select-1.15/History.txt +237 -0
  101. data/vendor/gems/calendar_date_select-1.15/MIT-LICENSE +20 -0
  102. data/vendor/gems/calendar_date_select-1.15/Manifest.txt +42 -0
  103. data/vendor/gems/calendar_date_select-1.15/Rakefile +31 -0
  104. data/vendor/gems/calendar_date_select-1.15/Readme.txt +16 -0
  105. data/vendor/gems/calendar_date_select-1.15/init.rb +1 -0
  106. data/vendor/gems/calendar_date_select-1.15/js_test/functional/cds_test.html +334 -0
  107. data/vendor/gems/calendar_date_select-1.15/js_test/prototype.js +4184 -0
  108. data/vendor/gems/calendar_date_select-1.15/js_test/test.css +40 -0
  109. data/vendor/gems/calendar_date_select-1.15/js_test/unit/cds_helper_methods.html +46 -0
  110. data/vendor/gems/calendar_date_select-1.15/js_test/unittest.js +564 -0
  111. data/vendor/gems/calendar_date_select-1.15/lib/calendar_date_select.rb +33 -0
  112. data/vendor/gems/calendar_date_select-1.15/lib/calendar_date_select/calendar_date_select.rb +116 -0
  113. data/vendor/gems/calendar_date_select-1.15/lib/calendar_date_select/form_helpers.rb +225 -0
  114. data/vendor/gems/calendar_date_select-1.15/lib/calendar_date_select/includes_helper.rb +29 -0
  115. data/vendor/gems/calendar_date_select-1.15/public/blank_iframe.html +2 -0
  116. data/vendor/gems/calendar_date_select-1.15/public/images/calendar_date_select/calendar.gif +0 -0
  117. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/calendar_date_select.js +443 -0
  118. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_american.js +34 -0
  119. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_db.js +27 -0
  120. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
  121. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_euro_24hr_ymd.js +7 -0
  122. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_finnish.js +32 -0
  123. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_hyphen_ampm.js +37 -0
  124. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_iso_date.js +46 -0
  125. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/format_italian.js +24 -0
  126. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/de.js +11 -0
  127. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/fi.js +10 -0
  128. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/fr.js +10 -0
  129. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/pl.js +10 -0
  130. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/pt.js +11 -0
  131. data/vendor/gems/calendar_date_select-1.15/public/javascripts/calendar_date_select/locale/ru.js +10 -0
  132. data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/blue.css +130 -0
  133. data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/default.css +135 -0
  134. data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/plain.css +128 -0
  135. data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/red.css +135 -0
  136. data/vendor/gems/calendar_date_select-1.15/public/stylesheets/calendar_date_select/silver.css +133 -0
  137. data/vendor/gems/calendar_date_select-1.15/spec/calendar_date_select/calendar_date_select_spec.rb +14 -0
  138. data/vendor/gems/calendar_date_select-1.15/spec/calendar_date_select/form_helpers_spec.rb +166 -0
  139. data/vendor/gems/calendar_date_select-1.15/spec/spec_helper.rb +26 -0
  140. data/vendor/gems/coderay-0.8.260/.specification +2 -1
  141. data/vendor/gems/htmlentities-4.0.0/.specification +68 -0
  142. data/vendor/gems/htmlentities-4.0.0/COPYING.txt +21 -0
  143. data/vendor/gems/htmlentities-4.0.0/History.txt +47 -0
  144. data/vendor/gems/htmlentities-4.0.0/README.txt +44 -0
  145. data/vendor/gems/htmlentities-4.0.0/lib/htmlentities.rb +165 -0
  146. data/vendor/gems/htmlentities-4.0.0/lib/htmlentities/html4.rb +257 -0
  147. data/vendor/gems/htmlentities-4.0.0/lib/htmlentities/legacy.rb +27 -0
  148. data/vendor/gems/htmlentities-4.0.0/lib/htmlentities/string.rb +26 -0
  149. data/vendor/gems/htmlentities-4.0.0/lib/htmlentities/xhtml1.rb +258 -0
  150. data/vendor/gems/htmlentities-4.0.0/test/entities_test.rb +206 -0
  151. data/vendor/gems/htmlentities-4.0.0/test/html4_test.rb +24 -0
  152. data/vendor/gems/htmlentities-4.0.0/test/legacy_test.rb +34 -0
  153. data/vendor/gems/htmlentities-4.0.0/test/roundtrip_test.rb +94 -0
  154. data/vendor/gems/htmlentities-4.0.0/test/string_test.rb +24 -0
  155. data/vendor/gems/htmlentities-4.0.0/test/test_all.rb +3 -0
  156. data/vendor/gems/htmlentities-4.0.0/test/xhtml1_test.rb +23 -0
  157. data/vendor/gems/json-1.1.3/.require_paths +4 -0
  158. data/vendor/gems/json-1.1.3/.specification +58 -0
  159. data/vendor/gems/json-1.1.3/CHANGES +93 -0
  160. data/vendor/gems/json-1.1.3/GPL +340 -0
  161. data/vendor/gems/json-1.1.3/README +78 -0
  162. data/vendor/gems/json-1.1.3/RUBY +58 -0
  163. data/vendor/gems/json-1.1.3/Rakefile +309 -0
  164. data/vendor/gems/json-1.1.3/TODO +1 -0
  165. data/vendor/gems/json-1.1.3/VERSION +1 -0
  166. data/vendor/gems/json-1.1.3/benchmarks/benchmark.txt +133 -0
  167. data/vendor/gems/json-1.1.3/benchmarks/benchmark_generator.rb +48 -0
  168. data/vendor/gems/json-1.1.3/benchmarks/benchmark_parser.rb +26 -0
  169. data/vendor/gems/json-1.1.3/benchmarks/benchmark_rails.rb +26 -0
  170. data/vendor/gems/json-1.1.3/bin/edit_json.rb +10 -0
  171. data/vendor/gems/json-1.1.3/bin/prettify_json.rb +76 -0
  172. data/vendor/gems/json-1.1.3/data/example.json +1 -0
  173. data/vendor/gems/json-1.1.3/data/index.html +38 -0
  174. data/vendor/gems/json-1.1.3/data/prototype.js +4184 -0
  175. data/vendor/gems/json-1.1.3/ext/json/ext/generator.bundle +0 -0
  176. data/vendor/gems/json-1.1.3/ext/json/ext/generator/Makefile +149 -0
  177. data/vendor/gems/json-1.1.3/ext/json/ext/generator/extconf.rb +9 -0
  178. data/vendor/gems/json-1.1.3/ext/json/ext/generator/generator.bundle +0 -0
  179. data/vendor/gems/json-1.1.3/ext/json/ext/generator/generator.c +875 -0
  180. data/vendor/gems/json-1.1.3/ext/json/ext/generator/generator.o +0 -0
  181. data/vendor/gems/json-1.1.3/ext/json/ext/generator/unicode.c +182 -0
  182. data/vendor/gems/json-1.1.3/ext/json/ext/generator/unicode.h +53 -0
  183. data/vendor/gems/json-1.1.3/ext/json/ext/generator/unicode.o +0 -0
  184. data/vendor/gems/json-1.1.3/ext/json/ext/parser.bundle +0 -0
  185. data/vendor/gems/json-1.1.3/ext/json/ext/parser/Makefile +149 -0
  186. data/vendor/gems/json-1.1.3/ext/json/ext/parser/extconf.rb +9 -0
  187. data/vendor/gems/json-1.1.3/ext/json/ext/parser/parser.bundle +0 -0
  188. data/vendor/gems/json-1.1.3/ext/json/ext/parser/parser.c +1758 -0
  189. data/vendor/gems/json-1.1.3/ext/json/ext/parser/parser.o +0 -0
  190. data/vendor/gems/json-1.1.3/ext/json/ext/parser/parser.rl +638 -0
  191. data/vendor/gems/json-1.1.3/ext/json/ext/parser/unicode.c +154 -0
  192. data/vendor/gems/json-1.1.3/ext/json/ext/parser/unicode.h +58 -0
  193. data/vendor/gems/json-1.1.3/ext/json/ext/parser/unicode.o +0 -0
  194. data/vendor/gems/json-1.1.3/install.rb +26 -0
  195. data/vendor/gems/json-1.1.3/lib/json.rb +235 -0
  196. data/vendor/gems/json-1.1.3/lib/json/Array.xpm +21 -0
  197. data/vendor/gems/json-1.1.3/lib/json/FalseClass.xpm +21 -0
  198. data/vendor/gems/json-1.1.3/lib/json/Hash.xpm +21 -0
  199. data/vendor/gems/json-1.1.3/lib/json/Key.xpm +73 -0
  200. data/vendor/gems/json-1.1.3/lib/json/NilClass.xpm +21 -0
  201. data/vendor/gems/json-1.1.3/lib/json/Numeric.xpm +28 -0
  202. data/vendor/gems/json-1.1.3/lib/json/String.xpm +96 -0
  203. data/vendor/gems/json-1.1.3/lib/json/TrueClass.xpm +21 -0
  204. data/vendor/gems/json-1.1.3/lib/json/add/core.rb +135 -0
  205. data/vendor/gems/json-1.1.3/lib/json/add/rails.rb +58 -0
  206. data/vendor/gems/json-1.1.3/lib/json/common.rb +354 -0
  207. data/vendor/gems/json-1.1.3/lib/json/editor.rb +1362 -0
  208. data/vendor/gems/json-1.1.3/lib/json/ext.rb +13 -0
  209. data/vendor/gems/json-1.1.3/lib/json/json.xpm +1499 -0
  210. data/vendor/gems/json-1.1.3/lib/json/pure.rb +75 -0
  211. data/vendor/gems/json-1.1.3/lib/json/pure/generator.rb +394 -0
  212. data/vendor/gems/json-1.1.3/lib/json/pure/parser.rb +259 -0
  213. data/vendor/gems/json-1.1.3/lib/json/version.rb +9 -0
  214. data/vendor/gems/json-1.1.3/tests/fixtures/fail1.json +1 -0
  215. data/vendor/gems/json-1.1.3/tests/fixtures/fail10.json +1 -0
  216. data/vendor/gems/json-1.1.3/tests/fixtures/fail11.json +1 -0
  217. data/vendor/gems/json-1.1.3/tests/fixtures/fail12.json +1 -0
  218. data/vendor/gems/json-1.1.3/tests/fixtures/fail13.json +1 -0
  219. data/vendor/gems/json-1.1.3/tests/fixtures/fail14.json +1 -0
  220. data/vendor/gems/json-1.1.3/tests/fixtures/fail18.json +1 -0
  221. data/vendor/gems/json-1.1.3/tests/fixtures/fail19.json +1 -0
  222. data/vendor/gems/json-1.1.3/tests/fixtures/fail2.json +1 -0
  223. data/vendor/gems/json-1.1.3/tests/fixtures/fail20.json +1 -0
  224. data/vendor/gems/json-1.1.3/tests/fixtures/fail21.json +1 -0
  225. data/vendor/gems/json-1.1.3/tests/fixtures/fail22.json +1 -0
  226. data/vendor/gems/json-1.1.3/tests/fixtures/fail23.json +1 -0
  227. data/vendor/gems/json-1.1.3/tests/fixtures/fail24.json +1 -0
  228. data/vendor/gems/json-1.1.3/tests/fixtures/fail25.json +1 -0
  229. data/vendor/gems/json-1.1.3/tests/fixtures/fail27.json +2 -0
  230. data/vendor/gems/json-1.1.3/tests/fixtures/fail28.json +2 -0
  231. data/vendor/gems/json-1.1.3/tests/fixtures/fail3.json +1 -0
  232. data/vendor/gems/json-1.1.3/tests/fixtures/fail4.json +1 -0
  233. data/vendor/gems/json-1.1.3/tests/fixtures/fail5.json +1 -0
  234. data/vendor/gems/json-1.1.3/tests/fixtures/fail6.json +1 -0
  235. data/vendor/gems/json-1.1.3/tests/fixtures/fail7.json +1 -0
  236. data/vendor/gems/json-1.1.3/tests/fixtures/fail8.json +1 -0
  237. data/vendor/gems/json-1.1.3/tests/fixtures/fail9.json +1 -0
  238. data/vendor/gems/json-1.1.3/tests/fixtures/pass1.json +56 -0
  239. data/vendor/gems/json-1.1.3/tests/fixtures/pass15.json +1 -0
  240. data/vendor/gems/json-1.1.3/tests/fixtures/pass16.json +1 -0
  241. data/vendor/gems/json-1.1.3/tests/fixtures/pass17.json +1 -0
  242. data/vendor/gems/json-1.1.3/tests/fixtures/pass2.json +1 -0
  243. data/vendor/gems/json-1.1.3/tests/fixtures/pass26.json +1 -0
  244. data/vendor/gems/json-1.1.3/tests/fixtures/pass3.json +6 -0
  245. data/vendor/gems/json-1.1.3/tests/runner.rb +25 -0
  246. data/vendor/gems/json-1.1.3/tests/test_json.rb +293 -0
  247. data/vendor/gems/json-1.1.3/tests/test_json_addition.rb +161 -0
  248. data/vendor/gems/json-1.1.3/tests/test_json_fixtures.rb +30 -0
  249. data/vendor/gems/json-1.1.3/tests/test_json_generate.rb +100 -0
  250. data/vendor/gems/json-1.1.3/tests/test_json_rails.rb +118 -0
  251. data/vendor/gems/json-1.1.3/tests/test_json_unicode.rb +61 -0
  252. data/vendor/gems/json-1.1.3/tools/fuzz.rb +140 -0
  253. data/vendor/gems/json-1.1.3/tools/server.rb +62 -0
  254. data/vendor/plugins/localization/bin/make_language.rb +2 -2
  255. data/vendor/plugins/localization/lib/localization.rb +2 -2
  256. data/vendor/plugins/will_paginate/CHANGELOG.rdoc +110 -0
  257. data/vendor/plugins/will_paginate/LICENSE +18 -0
  258. data/vendor/plugins/will_paginate/README.rdoc +107 -0
  259. data/vendor/plugins/will_paginate/Rakefile +62 -0
  260. data/vendor/plugins/will_paginate/examples/apple-circle.gif +0 -0
  261. data/vendor/plugins/will_paginate/examples/index.haml +69 -0
  262. data/vendor/plugins/will_paginate/examples/index.html +92 -0
  263. data/vendor/plugins/will_paginate/examples/pagination.css +90 -0
  264. data/vendor/plugins/will_paginate/examples/pagination.sass +91 -0
  265. data/vendor/plugins/will_paginate/init.rb +1 -0
  266. data/vendor/plugins/will_paginate/lib/will_paginate.rb +82 -0
  267. data/vendor/plugins/will_paginate/lib/will_paginate/array.rb +16 -0
  268. data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +146 -0
  269. data/vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb +32 -0
  270. data/vendor/plugins/will_paginate/lib/will_paginate/finder.rb +260 -0
  271. data/vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb +170 -0
  272. data/vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb +37 -0
  273. data/vendor/plugins/will_paginate/lib/will_paginate/version.rb +9 -0
  274. data/vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb +383 -0
  275. data/vendor/plugins/will_paginate/test/boot.rb +21 -0
  276. data/vendor/plugins/will_paginate/test/collection_test.rb +143 -0
  277. data/vendor/plugins/will_paginate/test/console +8 -0
  278. data/vendor/plugins/will_paginate/test/database.yml +22 -0
  279. data/vendor/plugins/will_paginate/test/finder_test.rb +476 -0
  280. data/vendor/plugins/will_paginate/test/fixtures/admin.rb +3 -0
  281. data/vendor/plugins/will_paginate/test/fixtures/developer.rb +14 -0
  282. data/vendor/plugins/will_paginate/test/fixtures/developers_projects.yml +13 -0
  283. data/vendor/plugins/will_paginate/test/fixtures/project.rb +15 -0
  284. data/vendor/plugins/will_paginate/test/fixtures/projects.yml +6 -0
  285. data/vendor/plugins/will_paginate/test/fixtures/replies.yml +29 -0
  286. data/vendor/plugins/will_paginate/test/fixtures/reply.rb +7 -0
  287. data/vendor/plugins/will_paginate/test/fixtures/schema.rb +38 -0
  288. data/vendor/plugins/will_paginate/test/fixtures/topic.rb +10 -0
  289. data/vendor/plugins/will_paginate/test/fixtures/topics.yml +30 -0
  290. data/vendor/plugins/will_paginate/test/fixtures/user.rb +2 -0
  291. data/vendor/plugins/will_paginate/test/fixtures/users.yml +35 -0
  292. data/vendor/plugins/will_paginate/test/helper.rb +37 -0
  293. data/vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb +36 -0
  294. data/vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb +73 -0
  295. data/vendor/plugins/will_paginate/test/lib/load_fixtures.rb +11 -0
  296. data/vendor/plugins/will_paginate/test/lib/view_test_process.rb +165 -0
  297. data/vendor/plugins/will_paginate/test/tasks.rake +59 -0
  298. data/vendor/plugins/will_paginate/test/view_test.rb +363 -0
  299. data/vendor/plugins/will_paginate/will_paginate.gemspec +22 -0
  300. data/vendor/plugins/xml_sidebar/lib/xml_sidebar.rb +1 -1
  301. metadata +349 -16
  302. data/migrate.txt +0 -142
@@ -0,0 +1,73 @@
1
+ require File.dirname(__FILE__) + '/abstract_unit'
2
+
3
+ module ContainerTest
4
+ $immediate_service = Object.new
5
+ $deferred_service = Object.new
6
+
7
+ class DelegateContainer < ActionController::Base
8
+ web_service_dispatching_mode :delegated
9
+
10
+ attr :flag
11
+ attr :previous_flag
12
+
13
+ def initialize
14
+ @previous_flag = nil
15
+ @flag = true
16
+ end
17
+
18
+ web_service :immediate_service, $immediate_service
19
+ web_service(:deferred_service) { @previous_flag = @flag; @flag = false; $deferred_service }
20
+ end
21
+
22
+ class DirectContainer < ActionController::Base
23
+ web_service_dispatching_mode :direct
24
+ end
25
+
26
+ class InvalidContainer
27
+ include ActionWebService::Container::Direct
28
+ end
29
+ end
30
+
31
+ class TC_Container < Test::Unit::TestCase
32
+ include ContainerTest
33
+
34
+ def setup
35
+ @delegate_container = DelegateContainer.new
36
+ @direct_container = DirectContainer.new
37
+ end
38
+
39
+ def test_registration
40
+ assert(DelegateContainer.has_web_service?(:immediate_service))
41
+ assert(DelegateContainer.has_web_service?(:deferred_service))
42
+ assert(!DelegateContainer.has_web_service?(:fake_service))
43
+ assert_raises(ActionWebService::Container::Delegated::ContainerError) do
44
+ DelegateContainer.web_service('invalid')
45
+ end
46
+ end
47
+
48
+ def test_service_object
49
+ assert_raises(ActionWebService::Container::Delegated::ContainerError) do
50
+ @delegate_container.web_service_object(:nonexistent)
51
+ end
52
+ assert(@delegate_container.flag == true)
53
+ assert(@delegate_container.web_service_object(:immediate_service) == $immediate_service)
54
+ assert(@delegate_container.previous_flag.nil?)
55
+ assert(@delegate_container.flag == true)
56
+ assert(@delegate_container.web_service_object(:deferred_service) == $deferred_service)
57
+ assert(@delegate_container.previous_flag == true)
58
+ assert(@delegate_container.flag == false)
59
+ end
60
+
61
+ def test_direct_container
62
+ assert(DirectContainer.web_service_dispatching_mode == :direct)
63
+ end
64
+
65
+ def test_validity
66
+ assert_raises(ActionWebService::Container::Direct::ContainerError) do
67
+ InvalidContainer.web_service_api :test
68
+ end
69
+ assert_raises(ActionWebService::Container::Direct::ContainerError) do
70
+ InvalidContainer.web_service_api 50.0
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,137 @@
1
+ $:.unshift(File.dirname(__FILE__) + '/apis')
2
+ require File.dirname(__FILE__) + '/abstract_dispatcher'
3
+ require 'wsdl/parser'
4
+
5
+ class ActionController::Base
6
+ class << self
7
+ alias :inherited_without_name_error :inherited
8
+ def inherited(child)
9
+ begin
10
+ inherited_without_name_error(child)
11
+ rescue NameError => e
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ class AutoLoadController < ActionController::Base; end
18
+ class FailingAutoLoadController < ActionController::Base; end
19
+ class BrokenAutoLoadController < ActionController::Base; end
20
+
21
+ class TC_DispatcherActionControllerSoap < Test::Unit::TestCase
22
+ include DispatcherTest
23
+ include DispatcherCommonTests
24
+
25
+ def setup
26
+ @direct_controller = DirectController.new
27
+ @delegated_controller = DelegatedController.new
28
+ @virtual_controller = VirtualController.new
29
+ @layered_controller = LayeredController.new
30
+ @protocol = ActionWebService::Protocol::Soap::SoapProtocol.create(@direct_controller)
31
+ end
32
+
33
+ def test_wsdl_generation
34
+ ensure_valid_wsdl_generation DelegatedController.new, DispatcherTest::WsdlNamespace
35
+ ensure_valid_wsdl_generation DirectController.new, DispatcherTest::WsdlNamespace
36
+ end
37
+
38
+ def test_wsdl_action
39
+ delegated_types = ensure_valid_wsdl_action DelegatedController.new
40
+ delegated_names = delegated_types.map{|x| x.name.name}
41
+ assert(delegated_names.include?('DispatcherTest..NodeArray'))
42
+ assert(delegated_names.include?('DispatcherTest..Node'))
43
+ direct_types = ensure_valid_wsdl_action DirectController.new
44
+ direct_names = direct_types.map{|x| x.name.name}
45
+ assert(direct_names.include?('DispatcherTest..NodeArray'))
46
+ assert(direct_names.include?('DispatcherTest..Node'))
47
+ assert(direct_names.include?('IntegerArray'))
48
+ end
49
+
50
+ def test_autoloading
51
+ assert(!AutoLoadController.web_service_api.nil?)
52
+ assert(AutoLoadController.web_service_api.has_public_api_method?('Void'))
53
+ assert(FailingAutoLoadController.web_service_api.nil?)
54
+ assert_raises(MissingSourceFile) do
55
+ FailingAutoLoadController.require_web_service_api :blah
56
+ end
57
+ assert_raises(ArgumentError) do
58
+ FailingAutoLoadController.require_web_service_api 50.0
59
+ end
60
+ assert(BrokenAutoLoadController.web_service_api.nil?)
61
+ end
62
+
63
+ def test_layered_dispatching
64
+ mt_cats = do_method_call(@layered_controller, 'mt.getCategories')
65
+ assert_equal(["mtCat1", "mtCat2"], mt_cats)
66
+ blogger_cats = do_method_call(@layered_controller, 'blogger.getCategories')
67
+ assert_equal(["bloggerCat1", "bloggerCat2"], blogger_cats)
68
+ end
69
+
70
+ def test_utf8
71
+ @direct_controller.web_service_exception_reporting = true
72
+ $KCODE = 'u'
73
+ assert_equal(Utf8String, do_method_call(@direct_controller, 'TestUtf8'))
74
+ retval = SOAP::Processor.unmarshal(@response_body).body.response
75
+ assert retval.is_a?(SOAP::SOAPString)
76
+
77
+ # If $KCODE is not set to UTF-8, any strings with non-ASCII UTF-8 data
78
+ # will be sent back as base64 by SOAP4R. By the time we get it here though,
79
+ # it will be decoded back into a string. So lets read the base64 value
80
+ # from the message body directly.
81
+ $KCODE = 'NONE'
82
+ do_method_call(@direct_controller, 'TestUtf8')
83
+ retval = SOAP::Processor.unmarshal(@response_body).body.response
84
+ assert retval.is_a?(SOAP::SOAPBase64)
85
+ assert_equal "T25lIFdvcmxkIENhZsOp", retval.data.to_s
86
+ end
87
+
88
+ protected
89
+ def exception_message(soap_fault_exception)
90
+ soap_fault_exception.detail.cause.message
91
+ end
92
+
93
+ def is_exception?(obj)
94
+ obj.respond_to?(:detail) && obj.detail.respond_to?(:cause) && \
95
+ obj.detail.cause.is_a?(Exception)
96
+ end
97
+
98
+ def service_name(container)
99
+ container.is_a?(DelegatedController) ? 'test_service' : 'api'
100
+ end
101
+
102
+ def ensure_valid_wsdl_generation(controller, expected_namespace)
103
+ wsdl = controller.generate_wsdl
104
+ ensure_valid_wsdl(controller, wsdl, expected_namespace)
105
+ end
106
+
107
+ def ensure_valid_wsdl(controller, wsdl, expected_namespace)
108
+ definitions = WSDL::Parser.new.parse(wsdl)
109
+ assert(definitions.is_a?(WSDL::Definitions))
110
+ definitions.bindings.each do |binding|
111
+ assert(binding.name.name.index(':').nil?)
112
+ end
113
+ definitions.services.each do |service|
114
+ service.ports.each do |port|
115
+ assert(port.name.name.index(':').nil?)
116
+ end
117
+ end
118
+ types = definitions.collect_complextypes.map{|x| x.name}
119
+ types.each do |type|
120
+ assert(type.namespace == expected_namespace)
121
+ end
122
+ location = definitions.services[0].ports[0].soap_address.location
123
+ if controller.is_a?(DelegatedController)
124
+ assert_match %r{http://test.host/dispatcher_test/delegated/test_service$}, location
125
+ elsif controller.is_a?(DirectController)
126
+ assert_match %r{http://test.host/dispatcher_test/direct/api$}, location
127
+ end
128
+ definitions.collect_complextypes
129
+ end
130
+
131
+ def ensure_valid_wsdl_action(controller)
132
+ test_request = ActionController::TestRequest.new({ 'action' => 'wsdl' })
133
+ test_response = ActionController::TestResponse.new
134
+ wsdl = controller.process(test_request, test_response).body
135
+ ensure_valid_wsdl(controller, wsdl, DispatcherTest::WsdlNamespace)
136
+ end
137
+ end
@@ -0,0 +1,59 @@
1
+ require File.dirname(__FILE__) + '/abstract_dispatcher'
2
+
3
+ class TC_DispatcherActionControllerXmlRpc < Test::Unit::TestCase
4
+ include DispatcherTest
5
+ include DispatcherCommonTests
6
+
7
+ def setup
8
+ @direct_controller = DirectController.new
9
+ @delegated_controller = DelegatedController.new
10
+ @layered_controller = LayeredController.new
11
+ @virtual_controller = VirtualController.new
12
+ @protocol = ActionWebService::Protocol::XmlRpc::XmlRpcProtocol.create(@direct_controller)
13
+ end
14
+
15
+ def test_layered_dispatching
16
+ mt_cats = do_method_call(@layered_controller, 'mt.getCategories')
17
+ assert_equal(["mtCat1", "mtCat2"], mt_cats)
18
+ blogger_cats = do_method_call(@layered_controller, 'blogger.getCategories')
19
+ assert_equal(["bloggerCat1", "bloggerCat2"], blogger_cats)
20
+ end
21
+
22
+ def test_multicall
23
+ response = do_method_call(@layered_controller, 'system.multicall', [
24
+ {'methodName' => 'mt.getCategories'},
25
+ {'methodName' => 'blogger.getCategories'},
26
+ {'methodName' => 'mt.bool'},
27
+ {'methodName' => 'blogger.str', 'params' => ['2000']},
28
+ {'methodName' => 'mt.alwaysFail'},
29
+ {'methodName' => 'blogger.alwaysFail'},
30
+ {'methodName' => 'mt.blah'},
31
+ {'methodName' => 'blah.blah'},
32
+ {'methodName' => 'mt.person'}
33
+ ])
34
+ assert_equal [
35
+ [["mtCat1", "mtCat2"]],
36
+ [["bloggerCat1", "bloggerCat2"]],
37
+ [true],
38
+ ["2500"],
39
+ {"faultCode" => 3, "faultString" => "MT AlwaysFail"},
40
+ {"faultCode" => 3, "faultString" => "Blogger AlwaysFail"},
41
+ {"faultCode" => 4, "faultMessage" => "no such method 'blah' on API DispatcherTest::MTAPI"},
42
+ {"faultCode" => 4, "faultMessage" => "no such web service 'blah'"},
43
+ [{"name"=>"person1", "id"=>1}]
44
+ ], response
45
+ end
46
+
47
+ protected
48
+ def exception_message(xmlrpc_fault_exception)
49
+ xmlrpc_fault_exception.faultString
50
+ end
51
+
52
+ def is_exception?(obj)
53
+ obj.is_a?(XMLRPC::FaultException)
54
+ end
55
+
56
+ def service_name(container)
57
+ container.is_a?(DelegatedController) ? 'test_service' : 'api'
58
+ end
59
+ end
@@ -0,0 +1,8 @@
1
+ CREATE TABLE `users` (
2
+ `id` int(11) NOT NULL auto_increment,
3
+ `name` varchar(30) default NULL,
4
+ `active` tinyint(4) default NULL,
5
+ `balance` decimal(5, 2) default NULL,
6
+ `created_on` date default NULL,
7
+ PRIMARY KEY (`id`)
8
+ ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -0,0 +1,12 @@
1
+ user1:
2
+ id: 1
3
+ name: Kent
4
+ active: 1
5
+ balance: 12.2
6
+ created_on: <%= Date.today %>
7
+ user2:
8
+ id: 2
9
+ name: David
10
+ active: 1
11
+ balance: 16.4
12
+ created_on: <%= Date.today %>
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+
3
+ rcov -x '.*_test\.rb,rubygems,abstract_,/run,/apis' ./run
@@ -0,0 +1,185 @@
1
+ require File.dirname(__FILE__) + '/abstract_unit'
2
+
3
+ module InvocationTest
4
+ class API < ActionWebService::API::Base
5
+ api_method :add, :expects => [:int, :int], :returns => [:int]
6
+ api_method :transmogrify, :expects_and_returns => [:string]
7
+ api_method :fail_with_reason
8
+ api_method :fail_generic
9
+ api_method :no_before
10
+ api_method :no_after
11
+ api_method :only_one
12
+ api_method :only_two
13
+ end
14
+
15
+ class Interceptor
16
+ attr :args
17
+
18
+ def initialize
19
+ @args = nil
20
+ end
21
+
22
+ def intercept(*args)
23
+ @args = args
24
+ end
25
+ end
26
+
27
+ InterceptorClass = Interceptor.new
28
+
29
+ class Service < ActionController::Base
30
+ web_service_api API
31
+
32
+ before_invocation :intercept_before, :except => [:no_before]
33
+ after_invocation :intercept_after, :except => [:no_after]
34
+ prepend_after_invocation :intercept_after_first, :except => [:no_after]
35
+ prepend_before_invocation :intercept_only, :only => [:only_one, :only_two]
36
+ after_invocation(:only => [:only_one]) do |*args|
37
+ args[0].instance_variable_set('@block_invoked', args[1])
38
+ end
39
+ after_invocation InterceptorClass, :only => [:only_one]
40
+
41
+ attr_accessor :before_invoked
42
+ attr_accessor :after_invoked
43
+ attr_accessor :after_first_invoked
44
+ attr_accessor :only_invoked
45
+ attr_accessor :block_invoked
46
+ attr_accessor :invocation_result
47
+
48
+ def initialize
49
+ @before_invoked = nil
50
+ @after_invoked = nil
51
+ @after_first_invoked = nil
52
+ @only_invoked = nil
53
+ @invocation_result = nil
54
+ @block_invoked = nil
55
+ end
56
+
57
+ def add(a, b)
58
+ a + b
59
+ end
60
+
61
+ def transmogrify(str)
62
+ str.upcase
63
+ end
64
+
65
+ def fail_with_reason
66
+ end
67
+
68
+ def fail_generic
69
+ end
70
+
71
+ def no_before
72
+ 5
73
+ end
74
+
75
+ def no_after
76
+ end
77
+
78
+ def only_one
79
+ end
80
+
81
+ def only_two
82
+ end
83
+
84
+ protected
85
+ def intercept_before(name, args)
86
+ @before_invoked = name
87
+ return [false, "permission denied"] if name == :fail_with_reason
88
+ return false if name == :fail_generic
89
+ end
90
+
91
+ def intercept_after(name, args, result)
92
+ @after_invoked = name
93
+ @invocation_result = result
94
+ end
95
+
96
+ def intercept_after_first(name, args, result)
97
+ @after_first_invoked = name
98
+ end
99
+
100
+ def intercept_only(name, args)
101
+ raise "Interception error" unless name == :only_one || name == :only_two
102
+ @only_invoked = name
103
+ end
104
+ end
105
+ end
106
+
107
+ class TC_Invocation < Test::Unit::TestCase
108
+ include ActionWebService::Invocation
109
+
110
+ def setup
111
+ @service = InvocationTest::Service.new
112
+ end
113
+
114
+ def test_invocation
115
+ assert(perform_invocation(:add, 5, 10) == 15)
116
+ assert(perform_invocation(:transmogrify, "hello") == "HELLO")
117
+ assert_raises(NoMethodError) do
118
+ perform_invocation(:nonexistent_method_xyzzy)
119
+ end
120
+ end
121
+
122
+ def test_interceptor_registration
123
+ assert(InvocationTest::Service.before_invocation_interceptors.length == 2)
124
+ assert(InvocationTest::Service.after_invocation_interceptors.length == 4)
125
+ assert_equal(:intercept_only, InvocationTest::Service.before_invocation_interceptors[0])
126
+ assert_equal(:intercept_after_first, InvocationTest::Service.after_invocation_interceptors[0])
127
+ end
128
+
129
+ def test_interception
130
+ assert(@service.before_invoked.nil?)
131
+ assert(@service.after_invoked.nil?)
132
+ assert(@service.only_invoked.nil?)
133
+ assert(@service.block_invoked.nil?)
134
+ assert(@service.invocation_result.nil?)
135
+ perform_invocation(:add, 20, 50)
136
+ assert(@service.before_invoked == :add)
137
+ assert(@service.after_invoked == :add)
138
+ assert(@service.invocation_result == 70)
139
+ end
140
+
141
+ def test_interception_canceling
142
+ reason = nil
143
+ perform_invocation(:fail_with_reason){|r| reason = r}
144
+ assert(@service.before_invoked == :fail_with_reason)
145
+ assert(@service.after_invoked.nil?)
146
+ assert(@service.invocation_result.nil?)
147
+ assert(reason == "permission denied")
148
+ reason = true
149
+ @service.before_invoked = @service.after_invoked = @service.invocation_result = nil
150
+ perform_invocation(:fail_generic){|r| reason = r}
151
+ assert(@service.before_invoked == :fail_generic)
152
+ assert(@service.after_invoked.nil?)
153
+ assert(@service.invocation_result.nil?)
154
+ assert(reason == true)
155
+ end
156
+
157
+ def test_interception_except_conditions
158
+ perform_invocation(:no_before)
159
+ assert(@service.before_invoked.nil?)
160
+ assert(@service.after_first_invoked == :no_before)
161
+ assert(@service.after_invoked == :no_before)
162
+ assert(@service.invocation_result == 5)
163
+ @service.before_invoked = @service.after_invoked = @service.invocation_result = nil
164
+ perform_invocation(:no_after)
165
+ assert(@service.before_invoked == :no_after)
166
+ assert(@service.after_invoked.nil?)
167
+ assert(@service.invocation_result.nil?)
168
+ end
169
+
170
+ def test_interception_only_conditions
171
+ assert(@service.only_invoked.nil?)
172
+ perform_invocation(:only_one)
173
+ assert(@service.only_invoked == :only_one)
174
+ assert(@service.block_invoked == :only_one)
175
+ assert(InvocationTest::InterceptorClass.args[1] == :only_one)
176
+ @service.only_invoked = nil
177
+ perform_invocation(:only_two)
178
+ assert(@service.only_invoked == :only_two)
179
+ end
180
+
181
+ private
182
+ def perform_invocation(method_name, *args, &block)
183
+ @service.perform_invocation(method_name, args, &block)
184
+ end
185
+ end