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,59 @@
1
+ require 'rake/testtask'
2
+
3
+ desc 'Test the will_paginate plugin.'
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.pattern = 'test/**/*_test.rb'
6
+ t.verbose = true
7
+ t.libs << 'test'
8
+ end
9
+
10
+ # I want to specify environment variables at call time
11
+ class EnvTestTask < Rake::TestTask
12
+ attr_accessor :env
13
+
14
+ def ruby(*args)
15
+ env.each { |key, value| ENV[key] = value } if env
16
+ super
17
+ env.keys.each { |key| ENV.delete key } if env
18
+ end
19
+ end
20
+
21
+ for configuration in %w( sqlite3 mysql postgres )
22
+ EnvTestTask.new("test_#{configuration}") do |t|
23
+ t.pattern = 'test/finder_test.rb'
24
+ t.verbose = true
25
+ t.env = { 'DB' => configuration }
26
+ t.libs << 'test'
27
+ end
28
+ end
29
+
30
+ task :test_databases => %w(test_mysql test_sqlite3 test_postgres)
31
+
32
+ desc %{Test everything on SQLite3, MySQL and PostgreSQL}
33
+ task :test_full => %w(test test_mysql test_postgres)
34
+
35
+ desc %{Test everything with Rails 2.1.x, 2.0.x & 1.2.x gems}
36
+ task :test_all do
37
+ all = Rake::Task['test_full']
38
+ versions = %w(2.1.0 2.0.4 1.2.6)
39
+ versions.each do |version|
40
+ ENV['RAILS_VERSION'] = "~> #{version}"
41
+ all.invoke
42
+ reset_invoked unless version == versions.last
43
+ end
44
+ end
45
+
46
+ def reset_invoked
47
+ %w( test_full test test_mysql test_postgres ).each do |name|
48
+ Rake::Task[name].instance_variable_set '@already_invoked', false
49
+ end
50
+ end
51
+
52
+ task :rcov do
53
+ excludes = %w( lib/will_paginate/named_scope*
54
+ lib/will_paginate/core_ext.rb
55
+ lib/will_paginate.rb
56
+ rails* )
57
+
58
+ system %[rcov -Itest:lib test/*.rb -x #{excludes.join(',')}]
59
+ end
@@ -0,0 +1,363 @@
1
+ require 'helper'
2
+ require 'lib/view_test_process'
3
+
4
+ class AdditionalLinkAttributesRenderer < WillPaginate::LinkRenderer
5
+ def initialize(link_attributes = nil)
6
+ super()
7
+ @additional_link_attributes = link_attributes || { :default => 'true' }
8
+ end
9
+
10
+ def page_link(page, text, attributes = {})
11
+ @template.link_to text, url_for(page), attributes.merge(@additional_link_attributes)
12
+ end
13
+ end
14
+
15
+ class ViewTest < WillPaginate::ViewTestCase
16
+
17
+ ## basic pagination ##
18
+
19
+ def test_will_paginate
20
+ paginate do |pagination|
21
+ assert_select 'a[href]', 3 do |elements|
22
+ validate_page_numbers [2,3,2], elements
23
+ assert_select elements.last, ':last-child', "Next &raquo;"
24
+ end
25
+ assert_select 'span', 2
26
+ assert_select 'span.disabled:first-child', '&laquo; Previous'
27
+ assert_select 'span.current', '1'
28
+ assert_equal '&laquo; Previous 1 2 3 Next &raquo;', pagination.first.inner_text
29
+ end
30
+ end
31
+
32
+ def test_no_pagination_when_page_count_is_one
33
+ paginate :per_page => 30
34
+ assert_equal '', @html_result
35
+ end
36
+
37
+ def test_will_paginate_with_options
38
+ paginate({ :page => 2 },
39
+ :class => 'will_paginate', :previous_label => 'Prev', :next_label => 'Next') do
40
+ assert_select 'a[href]', 4 do |elements|
41
+ validate_page_numbers [1,1,3,3], elements
42
+ # test rel attribute values:
43
+ assert_select elements[1], 'a', '1' do |link|
44
+ assert_equal 'prev start', link.first['rel']
45
+ end
46
+ assert_select elements.first, 'a', "Prev" do |link|
47
+ assert_equal 'prev start', link.first['rel']
48
+ end
49
+ assert_select elements.last, 'a', "Next" do |link|
50
+ assert_equal 'next', link.first['rel']
51
+ end
52
+ end
53
+ assert_select 'span.current', '2'
54
+ end
55
+ end
56
+
57
+ def test_will_paginate_using_renderer_class
58
+ paginate({}, :renderer => AdditionalLinkAttributesRenderer) do
59
+ assert_select 'a[default=true]', 3
60
+ end
61
+ end
62
+
63
+ def test_will_paginate_using_renderer_instance
64
+ renderer = WillPaginate::LinkRenderer.new
65
+ renderer.gap_marker = '<span class="my-gap">~~</span>'
66
+
67
+ paginate({ :per_page => 2 }, :inner_window => 0, :outer_window => 0, :renderer => renderer) do
68
+ assert_select 'span.my-gap', '~~'
69
+ end
70
+
71
+ renderer = AdditionalLinkAttributesRenderer.new(:title => 'rendered')
72
+ paginate({}, :renderer => renderer) do
73
+ assert_select 'a[title=rendered]', 3
74
+ end
75
+ end
76
+
77
+ def test_prev_next_links_have_classnames
78
+ paginate do |pagination|
79
+ assert_select 'span.disabled.prev_page:first-child'
80
+ assert_select 'a.next_page[href]:last-child'
81
+ end
82
+ end
83
+
84
+ def test_prev_label_deprecated
85
+ assert_deprecated ':previous_label' do
86
+ paginate({ :page => 2 }, :prev_label => 'Deprecated') do
87
+ assert_select 'a[href]:first-child', 'Deprecated'
88
+ end
89
+ end
90
+ end
91
+
92
+ def test_full_output
93
+ paginate
94
+ expected = <<-HTML
95
+ <div class="pagination"><span class="disabled prev_page">&laquo; Previous</span>
96
+ <span class="current">1</span>
97
+ <a href="/foo/bar?page=2" rel="next">2</a>
98
+ <a href="/foo/bar?page=3">3</a>
99
+ <a href="/foo/bar?page=2" class="next_page" rel="next">Next &raquo;</a></div>
100
+ HTML
101
+ expected.strip!.gsub!(/\s{2,}/, ' ')
102
+
103
+ assert_dom_equal expected, @html_result
104
+ end
105
+
106
+ def test_escaping_of_urls
107
+ paginate({:page => 1, :per_page => 1, :total_entries => 2},
108
+ :page_links => false, :params => { :tag => '<br>' })
109
+
110
+ assert_select 'a[href]', 1 do |links|
111
+ query = links.first['href'].split('?', 2)[1]
112
+ assert_equal %w(page=2 tag=%3Cbr%3E), query.split('&amp;').sort
113
+ end
114
+ end
115
+
116
+ ## advanced options for pagination ##
117
+
118
+ def test_will_paginate_without_container
119
+ paginate({}, :container => false)
120
+ assert_select 'div.pagination', 0, 'main DIV present when it shouldn\'t'
121
+ assert_select 'a[href]', 3
122
+ end
123
+
124
+ def test_will_paginate_without_page_links
125
+ paginate({ :page => 2 }, :page_links => false) do
126
+ assert_select 'a[href]', 2 do |elements|
127
+ validate_page_numbers [1,3], elements
128
+ end
129
+ end
130
+ end
131
+
132
+ def test_will_paginate_windows
133
+ paginate({ :page => 6, :per_page => 1 }, :inner_window => 1) do |pagination|
134
+ assert_select 'a[href]', 8 do |elements|
135
+ validate_page_numbers [5,1,2,5,7,10,11,7], elements
136
+ assert_select elements.first, 'a', '&laquo; Previous'
137
+ assert_select elements.last, 'a', 'Next &raquo;'
138
+ end
139
+ assert_select 'span.current', '6'
140
+ assert_equal '&laquo; Previous 1 2 &hellip; 5 6 7 &hellip; 10 11 Next &raquo;', pagination.first.inner_text
141
+ end
142
+ end
143
+
144
+ def test_will_paginate_eliminates_small_gaps
145
+ paginate({ :page => 6, :per_page => 1 }, :inner_window => 2) do
146
+ assert_select 'a[href]', 12 do |elements|
147
+ validate_page_numbers [5,1,2,3,4,5,7,8,9,10,11,7], elements
148
+ end
149
+ end
150
+ end
151
+
152
+ def test_container_id
153
+ paginate do |div|
154
+ assert_nil div.first['id']
155
+ end
156
+
157
+ # magic ID
158
+ paginate({}, :id => true) do |div|
159
+ assert_equal 'fixnums_pagination', div.first['id']
160
+ end
161
+
162
+ # explicit ID
163
+ paginate({}, :id => 'custom_id') do |div|
164
+ assert_equal 'custom_id', div.first['id']
165
+ end
166
+ end
167
+
168
+ ## other helpers ##
169
+
170
+ def test_paginated_section
171
+ @template = <<-ERB
172
+ <% paginated_section collection, options do %>
173
+ <%= content_tag :div, '', :id => "developers" %>
174
+ <% end %>
175
+ ERB
176
+
177
+ paginate
178
+ assert_select 'div.pagination', 2
179
+ assert_select 'div.pagination + div#developers', 1
180
+ end
181
+
182
+ def test_page_entries_info
183
+ @template = '<%= page_entries_info collection %>'
184
+ array = ('a'..'z').to_a
185
+
186
+ paginate array.paginate(:page => 2, :per_page => 5)
187
+ assert_equal %{Displaying strings <b>6&nbsp;-&nbsp;10</b> of <b>26</b> in total},
188
+ @html_result
189
+
190
+ paginate array.paginate(:page => 7, :per_page => 4)
191
+ assert_equal %{Displaying strings <b>25&nbsp;-&nbsp;26</b> of <b>26</b> in total},
192
+ @html_result
193
+ end
194
+
195
+ def test_page_entries_info_with_longer_class_name
196
+ @template = '<%= page_entries_info collection %>'
197
+ collection = ('a'..'z').to_a.paginate
198
+ collection.first.stubs(:class).returns(mock('class', :name => 'ProjectType'))
199
+
200
+ paginate collection
201
+ assert @html_result.index('project types'), "expected <#{@html_result.inspect}> to mention 'project types'"
202
+ end
203
+
204
+ def test_page_entries_info_with_single_page_collection
205
+ @template = '<%= page_entries_info collection %>'
206
+
207
+ paginate(('a'..'d').to_a.paginate(:page => 1, :per_page => 5))
208
+ assert_equal %{Displaying <b>all 4</b> strings}, @html_result
209
+
210
+ paginate(['a'].paginate(:page => 1, :per_page => 5))
211
+ assert_equal %{Displaying <b>1</b> string}, @html_result
212
+
213
+ paginate([].paginate(:page => 1, :per_page => 5))
214
+ assert_equal %{No entries found}, @html_result
215
+ end
216
+
217
+ def test_page_entries_info_with_custom_entry_name
218
+ @template = '<%= page_entries_info collection, :entry_name => "author" %>'
219
+
220
+ entries = (1..20).to_a
221
+
222
+ paginate(entries.paginate(:page => 1, :per_page => 5))
223
+ assert_equal %{Displaying authors <b>1&nbsp;-&nbsp;5</b> of <b>20</b> in total}, @html_result
224
+
225
+ paginate(entries.paginate(:page => 1, :per_page => 20))
226
+ assert_equal %{Displaying <b>all 20</b> authors}, @html_result
227
+
228
+ paginate(['a'].paginate(:page => 1, :per_page => 5))
229
+ assert_equal %{Displaying <b>1</b> author}, @html_result
230
+
231
+ paginate([].paginate(:page => 1, :per_page => 5))
232
+ assert_equal %{No authors found}, @html_result
233
+ end
234
+
235
+ ## parameter handling in page links ##
236
+
237
+ def test_will_paginate_preserves_parameters_on_get
238
+ @request.params :foo => { :bar => 'baz' }
239
+ paginate
240
+ assert_links_match /foo%5Bbar%5D=baz/
241
+ end
242
+
243
+ def test_will_paginate_doesnt_preserve_parameters_on_post
244
+ @request.post
245
+ @request.params :foo => 'bar'
246
+ paginate
247
+ assert_no_links_match /foo=bar/
248
+ end
249
+
250
+ def test_adding_additional_parameters
251
+ paginate({}, :params => { :foo => 'bar' })
252
+ assert_links_match /foo=bar/
253
+ end
254
+
255
+ def test_adding_anchor_parameter
256
+ paginate({}, :params => { :anchor => 'anchor' })
257
+ assert_links_match /#anchor$/
258
+ end
259
+
260
+ def test_removing_arbitrary_parameters
261
+ @request.params :foo => 'bar'
262
+ paginate({}, :params => { :foo => nil })
263
+ assert_no_links_match /foo=bar/
264
+ end
265
+
266
+ def test_adding_additional_route_parameters
267
+ paginate({}, :params => { :controller => 'baz', :action => 'list' })
268
+ assert_links_match %r{\Wbaz/list\W}
269
+ end
270
+
271
+ def test_will_paginate_with_custom_page_param
272
+ paginate({ :page => 2 }, :param_name => :developers_page) do
273
+ assert_select 'a[href]', 4 do |elements|
274
+ validate_page_numbers [1,1,3,3], elements, :developers_page
275
+ end
276
+ end
277
+ end
278
+
279
+ def test_complex_custom_page_param
280
+ @request.params :developers => { :page => 2 }
281
+
282
+ paginate({ :page => 2 }, :param_name => 'developers[page]') do
283
+ assert_select 'a[href]', 4 do |links|
284
+ assert_links_match /\?developers%5Bpage%5D=\d+$/, links
285
+ validate_page_numbers [1,1,3,3], links, 'developers[page]'
286
+ end
287
+ end
288
+ end
289
+
290
+ def test_custom_routing_page_param
291
+ @request.symbolized_path_parameters.update :controller => 'dummy', :action => nil
292
+ paginate :per_page => 2 do
293
+ assert_select 'a[href]', 6 do |links|
294
+ assert_links_match %r{/page/(\d+)$}, links, [2, 3, 4, 5, 6, 2]
295
+ end
296
+ end
297
+ end
298
+
299
+ def test_custom_routing_page_param_with_dot_separator
300
+ @request.symbolized_path_parameters.update :controller => 'dummy', :action => 'dots'
301
+ paginate :per_page => 2 do
302
+ assert_select 'a[href]', 6 do |links|
303
+ assert_links_match %r{/page\.(\d+)$}, links, [2, 3, 4, 5, 6, 2]
304
+ end
305
+ end
306
+ end
307
+
308
+ def test_custom_routing_with_first_page_hidden
309
+ @request.symbolized_path_parameters.update :controller => 'ibocorp', :action => nil
310
+ paginate :page => 2, :per_page => 2 do
311
+ assert_select 'a[href]', 7 do |links|
312
+ assert_links_match %r{/ibocorp(?:/(\d+))?$}, links, [nil, nil, 3, 4, 5, 6, 3]
313
+ end
314
+ end
315
+ end
316
+
317
+ ## internal hardcore stuff ##
318
+
319
+ class LegacyCollection < WillPaginate::Collection
320
+ alias :page_count :total_pages
321
+ undef :total_pages
322
+ end
323
+
324
+ def test_deprecation_notices_with_page_count
325
+ collection = LegacyCollection.new(1, 1, 2)
326
+
327
+ assert_deprecated collection.class.name do
328
+ paginate collection
329
+ end
330
+ end
331
+
332
+ uses_mocha 'view internals' do
333
+ def test_collection_name_can_be_guessed
334
+ collection = mock
335
+ collection.expects(:total_pages).returns(1)
336
+
337
+ @template = '<%= will_paginate options %>'
338
+ @controller.controller_name = 'developers'
339
+ @view.assigns['developers'] = collection
340
+
341
+ paginate(nil)
342
+ end
343
+ end
344
+
345
+ def test_inferred_collection_name_raises_error_when_nil
346
+ @template = '<%= will_paginate options %>'
347
+ @controller.controller_name = 'developers'
348
+
349
+ e = assert_raise ArgumentError do
350
+ paginate(nil)
351
+ end
352
+ assert e.message.include?('@developers')
353
+ end
354
+
355
+ if ActionController::Base.respond_to? :rescue_responses
356
+ # only on Rails 2
357
+ def test_rescue_response_hook_presence
358
+ assert_equal :not_found,
359
+ ActionController::Base.rescue_responses['WillPaginate::InvalidPage']
360
+ end
361
+ end
362
+
363
+ end
@@ -0,0 +1,22 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'will_paginate'
3
+ s.version = '2.3.6'
4
+ s.date = '2008-10-26'
5
+
6
+ s.summary = "Most awesome pagination solution for Rails"
7
+ s.description = "The will_paginate library provides a simple, yet powerful and extensible API for ActiveRecord pagination and rendering of pagination links in ActionView templates."
8
+
9
+ s.authors = ['Mislav Marohnić', 'PJ Hyett']
10
+ s.email = 'mislav.marohnic@gmail.com'
11
+ s.homepage = 'http://github.com/mislav/will_paginate/wikis'
12
+
13
+ s.has_rdoc = true
14
+ s.rdoc_options = ['--main', 'README.rdoc']
15
+ s.rdoc_options << '--inline-source' << '--charset=UTF-8'
16
+ s.extra_rdoc_files = ['README.rdoc', 'LICENSE', 'CHANGELOG.rdoc']
17
+
18
+ s.add_dependency 'activesupport', ['>= 1.4.4']
19
+
20
+ s.files = %w(CHANGELOG.rdoc LICENSE README.rdoc Rakefile examples examples/apple-circle.gif examples/index.haml examples/index.html examples/pagination.css examples/pagination.sass init.rb lib lib/will_paginate lib/will_paginate.rb lib/will_paginate/array.rb lib/will_paginate/collection.rb lib/will_paginate/core_ext.rb lib/will_paginate/finder.rb lib/will_paginate/named_scope.rb lib/will_paginate/named_scope_patch.rb lib/will_paginate/version.rb lib/will_paginate/view_helpers.rb test test/boot.rb test/collection_test.rb test/console test/database.yml test/finder_test.rb test/fixtures test/fixtures/admin.rb test/fixtures/developer.rb test/fixtures/developers_projects.yml test/fixtures/project.rb test/fixtures/projects.yml test/fixtures/replies.yml test/fixtures/reply.rb test/fixtures/schema.rb test/fixtures/topic.rb test/fixtures/topics.yml test/fixtures/user.rb test/fixtures/users.yml test/helper.rb test/lib test/lib/activerecord_test_case.rb test/lib/activerecord_test_connector.rb test/lib/load_fixtures.rb test/lib/view_test_process.rb test/tasks.rake test/view_test.rb)
21
+ s.test_files = %w(test/boot.rb test/collection_test.rb test/console test/database.yml test/finder_test.rb test/fixtures test/fixtures/admin.rb test/fixtures/developer.rb test/fixtures/developers_projects.yml test/fixtures/project.rb test/fixtures/projects.yml test/fixtures/replies.yml test/fixtures/reply.rb test/fixtures/schema.rb test/fixtures/topic.rb test/fixtures/topics.yml test/fixtures/user.rb test/fixtures/users.yml test/helper.rb test/lib test/lib/activerecord_test_case.rb test/lib/activerecord_test_connector.rb test/lib/load_fixtures.rb test/lib/view_test_process.rb test/tasks.rake test/view_test.rb)
22
+ end
@@ -1,5 +1,5 @@
1
1
  class XmlSidebar < Sidebar
2
- display_name _("XML Syndication")
2
+ display_name "XML Syndication"
3
3
  description "RSS and Atom feeds"
4
4
 
5
5
  setting :articles, true, :input_type => :checkbox