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,62 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $KCODE='UTF8'
4
+ require 'webrick'
5
+ include WEBrick
6
+ $:.unshift 'ext'
7
+ $:.unshift 'lib'
8
+ require 'json'
9
+
10
+ class JSONServlet < HTTPServlet::AbstractServlet
11
+ @@count = 1
12
+
13
+ def do_GET(req, res)
14
+ obj = {
15
+ "TIME" => Time.now.strftime("%FT%T"),
16
+ "foo" => "Bär",
17
+ "bar" => "© ≠ €!",
18
+ 'a' => 2,
19
+ 'b' => 3.141,
20
+ 'COUNT' => @@count += 1,
21
+ 'c' => 'c',
22
+ 'd' => [ 1, "b", 3.14 ],
23
+ 'e' => { 'foo' => 'bar' },
24
+ 'g' => "松本行弘",
25
+ 'h' => 1000.0,
26
+ 'i' => 0.001,
27
+ 'j' => "\xf0\xa0\x80\x81",
28
+ }
29
+ res.body = JSON.generate obj
30
+ res['Content-Type'] = "application/json"
31
+ end
32
+ end
33
+
34
+ def create_server(err, dir, port)
35
+ dir = File.expand_path(dir)
36
+ err.puts "Surf to:", "http://#{Socket.gethostname}:#{port}"
37
+
38
+ s = HTTPServer.new(
39
+ :Port => port,
40
+ :DocumentRoot => dir,
41
+ :Logger => WEBrick::Log.new(err),
42
+ :AccessLog => [
43
+ [ err, WEBrick::AccessLog::COMMON_LOG_FORMAT ],
44
+ [ err, WEBrick::AccessLog::REFERER_LOG_FORMAT ],
45
+ [ err, WEBrick::AccessLog::AGENT_LOG_FORMAT ]
46
+ ]
47
+ )
48
+ s.mount("/json", JSONServlet)
49
+ s
50
+ end
51
+
52
+ default_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'data'))
53
+ dir = ARGV.shift || default_dir
54
+ port = (ARGV.shift || 6666).to_i
55
+ s = create_server(STDERR, dir, 6666)
56
+ t = Thread.new { s.start }
57
+ trap(:INT) do
58
+ s.shutdown
59
+ t.join
60
+ exit
61
+ end
62
+ sleep
@@ -6,11 +6,11 @@ class LangaugeFile
6
6
  end
7
7
 
8
8
  def generate_language_file(language,duplicate)
9
- filename = "lang\\#{language}.rb";
9
+ filename = File.join("lang", "#{language}.rb");
10
10
 
11
11
 
12
12
  stringMap = {}
13
- executeStage "Loading last langauge file #{filename}" do
13
+ executeStage "Loading last language file #{filename}" do
14
14
  File.read(filename).scan(/["](.*?)["],(.*)/u).each do |pp|
15
15
  stringMap[pp[0]] = pp[1]
16
16
  end
@@ -5,7 +5,7 @@ module Localization
5
5
  @@lang = :default
6
6
 
7
7
  def self._(string_to_localize, *args)
8
- translated = @@l10s[@@lang][string_to_localize] || string_to_localize
8
+ translated = @@l10s[@@lang][string_to_localize].nil? ? string_to_localize : @@l10s[@@lang][string_to_localize]
9
9
  return translated.call(*args).to_s if translated.is_a? Proc
10
10
  if translated.is_a? Array
11
11
  translated = if translated.size == 3
@@ -18,7 +18,7 @@ module Localization
18
18
  end
19
19
 
20
20
  def self.__(string_to_localize, *args)
21
- translated = @@l10s[@@lang][string_to_localize] || string_to_localize
21
+ translated = @@l10s[@@lang][string_to_localize].nil? ? string_to_localize : @@l10s[@@lang][string_to_localize]
22
22
  return translated.call(*args).to_s if translated.is_a? Proc
23
23
  if translated.is_a? Array
24
24
  translated = if translated.size == 3
@@ -0,0 +1,110 @@
1
+ == 2.3.6, released 2008-10-26
2
+
3
+ * Rails 2.2 fix: stop using `extract_attribute_names_from_match` inernal AR method, it no longer exists
4
+
5
+ == 2.3.5, released 2008-10-07
6
+
7
+ * update the backported named_scope implementation for Rails versions older than 2.1
8
+ * break out of scope of paginated_each() yielded block when used on named scopes
9
+ * fix paginate(:from)
10
+
11
+ == 2.3.4, released 2008-09-16
12
+
13
+ * Removed gem dependency to Active Support (causes trouble with vendored rails).
14
+ * Rails 2.1: fix a failing test and a deprecation warning.
15
+ * Cope with scoped :select when counting.
16
+
17
+ == 2.3.3, released 2008-08-29
18
+
19
+ * Ensure that paginate_by_sql doesn't change the original SQL query.
20
+ * RDoc love (now live at http://mislav.caboo.se/static/will_paginate/doc/)
21
+ * Rename :prev_label to :previous_label for consistency. old name still functions but is deprecated
22
+ * ActiveRecord 2.1: Remove :include option from count_all query when it's possible.
23
+
24
+ == 2.3.2, released 2008-05-16
25
+
26
+ * Fixed LinkRenderer#stringified_merge by removing "return" from iterator block
27
+ * Ensure that 'href' values in pagination links are escaped URLs
28
+
29
+ == 2.3.1, released 2008-05-04
30
+
31
+ * Fixed page numbers not showing with custom routes and implicit first page
32
+ * Try to use Hanna for documentation (falls back to default RDoc template if not)
33
+
34
+ == 2.3.0, released 2008-04-29
35
+
36
+ * Changed LinkRenderer to receive collection, options and reference to view template NOT in
37
+ constructor, but with the #prepare method. This is a step towards supporting passing of
38
+ LinkRenderer (or subclass) instances that may be preconfigured in some way
39
+ * LinkRenderer now has #page_link and #page_span methods for easier customization of output in
40
+ subclasses
41
+ * Changed page_entries_info() method to adjust its output according to humanized class name of
42
+ collection items. Override this with :entry_name parameter (singular).
43
+
44
+ page_entries_info(@posts)
45
+ #-> "Displaying all 12 posts"
46
+ page_entries_info(@posts, :entry_name => 'item')
47
+ #-> "Displaying all 12 items"
48
+
49
+ == 2.2.3, released 2008-04-26
50
+
51
+ * will_paginate gem is no longer published on RubyForge, but on
52
+ gems.github.com:
53
+
54
+ gem sources -a http://gems.github.com/ (you only need to do this once)
55
+ gem install mislav-will_paginate
56
+
57
+ * extract reusable pagination testing stuff into WillPaginate::View
58
+ * rethink the page URL construction mechanizm to be more bulletproof when
59
+ combined with custom routing for page parameter
60
+ * test that anchor parameter can be used in pagination links
61
+
62
+ == 2.2.2, released 2008-04-21
63
+
64
+ * Add support for page parameter in custom routes like "/foo/page/2"
65
+ * Change output of "page_entries_info" on single-page collection and erraneous
66
+ output with empty collection as reported by Tim Chater
67
+
68
+ == 2.2.1, released 2008-04-08
69
+
70
+ * take less risky path when monkeypatching named_scope; fix that it no longer
71
+ requires ActiveRecord::VERSION
72
+ * use strings in "respond_to?" calls to work around a bug in acts_as_ferret
73
+ stable (ugh)
74
+ * add rake release task
75
+
76
+
77
+ == 2.2.0, released 2008-04-07
78
+
79
+ === API changes
80
+ * Rename WillPaginate::Collection#page_count to "total_pages" for consistency.
81
+ If you implemented this interface, change your implementation accordingly.
82
+ * Remove old, deprecated style of calling Array#paginate as "paginate(page,
83
+ per_page)". If you want to specify :page, :per_page or :total_entries, use a
84
+ parameter hash.
85
+ * Rename LinkRenderer#url_options to "url_for" and drastically optimize it
86
+
87
+ === View changes
88
+ * Added "prev_page" and "next_page" CSS classes on previous/next page buttons
89
+ * Add examples of pagination links styling in "examples/index.html"
90
+ * Change gap in pagination links from "..." to
91
+ "<span class="gap">&hellip;</span>".
92
+ * Add "paginated_section", a block helper that renders pagination both above and
93
+ below content in the block
94
+ * Add rel="prev|next|start" to page links
95
+
96
+ === Other
97
+
98
+ * Add ability to opt-in for Rails 2.1 feature "named_scope" by calling
99
+ WillPaginate.enable_named_scope (tested in Rails 1.2.6 and 2.0.2)
100
+ * Support complex page parameters like "developers[page]"
101
+ * Move Array#paginate definition to will_paginate/array.rb. You can now easily
102
+ use pagination on arrays outside of Rails:
103
+
104
+ gem 'will_paginate'
105
+ require 'will_paginate/array'
106
+
107
+ * Add "paginated_each" method for iterating through every record by loading only
108
+ one page of records at the time
109
+ * Rails 2: Rescue from WillPaginate::InvalidPage error with 404 Not Found by
110
+ default
@@ -0,0 +1,18 @@
1
+ Copyright (c) 2007 PJ Hyett and Mislav Marohnić
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
+ the Software, and to permit persons to whom the Software is furnished to do so,
8
+ subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,107 @@
1
+ = WillPaginate
2
+
3
+ Pagination is just limiting the number of records displayed. Why should you let
4
+ it get in your way while developing, then? This plugin makes magic happen. Did
5
+ you ever want to be able to do just this on a model:
6
+
7
+ Post.paginate :page => 1, :order => 'created_at DESC'
8
+
9
+ ... and then render the page links with a single view helper? Well, now you
10
+ can.
11
+
12
+ Some resources to get you started:
13
+
14
+ * {Installation instructions}[http://github.com/mislav/will_paginate/wikis/installation]
15
+ on {the wiki}[http://github.com/mislav/will_paginate/wikis]
16
+ * Your mind reels with questions? Join our
17
+ {Google group}[http://groups.google.com/group/will_paginate].
18
+ * {How to report bugs}[http://github.com/mislav/will_paginate/wikis/report-bugs]
19
+
20
+
21
+ == Example usage
22
+
23
+ Use a paginate finder in the controller:
24
+
25
+ @posts = Post.paginate_by_board_id @board.id, :page => params[:page], :order => 'updated_at DESC'
26
+
27
+ Yeah, +paginate+ works just like +find+ -- it just doesn't fetch all the
28
+ records. Don't forget to tell it which page you want, or it will complain!
29
+ Read more on WillPaginate::Finder::ClassMethods.
30
+
31
+ Render the posts in your view like you would normally do. When you need to render
32
+ pagination, just stick this in:
33
+
34
+ <%= will_paginate @posts %>
35
+
36
+ You're done. (You can find the option list at WillPaginate::ViewHelpers.)
37
+
38
+ How does it know how much items to fetch per page? It asks your model by calling
39
+ its <tt>per_page</tt> class method. You can define it like this:
40
+
41
+ class Post < ActiveRecord::Base
42
+ cattr_reader :per_page
43
+ @@per_page = 50
44
+ end
45
+
46
+ ... or like this:
47
+
48
+ class Post < ActiveRecord::Base
49
+ def self.per_page
50
+ 50
51
+ end
52
+ end
53
+
54
+ ... or don't worry about it at all. WillPaginate defines it to be <b>30</b> by default.
55
+ But you can always specify the count explicitly when calling +paginate+:
56
+
57
+ @posts = Post.paginate :page => params[:page], :per_page => 50
58
+
59
+ The +paginate+ finder wraps the original finder and returns your resultset that now has
60
+ some new properties. You can use the collection as you would with any ActiveRecord
61
+ resultset. WillPaginate view helpers also need that object to be able to render pagination:
62
+
63
+ <ol>
64
+ <% for post in @posts -%>
65
+ <li>Render `post` in some nice way.</li>
66
+ <% end -%>
67
+ </ol>
68
+
69
+ <p>Now let's render us some pagination!</p>
70
+ <%= will_paginate @posts %>
71
+
72
+ More detailed documentation:
73
+
74
+ * WillPaginate::Finder::ClassMethods for pagination on your models;
75
+ * WillPaginate::ViewHelpers for your views.
76
+
77
+
78
+ == Authors and credits
79
+
80
+ Authors:: Mislav Marohnić, PJ Hyett
81
+ Original announcement:: http://errtheblog.com/post/929
82
+ Original PHP source:: http://www.strangerstudios.com/sandbox/pagination/diggstyle.php
83
+
84
+ All these people helped making will_paginate what it is now with their code
85
+ contributions or just simply awesome ideas:
86
+
87
+ Chris Wanstrath, Dr. Nic Williams, K. Adam Christensen, Mike Garey, Bence
88
+ Golda, Matt Aimonetti, Charles Brian Quinn, Desi McAdam, James Coglan, Matijs
89
+ van Zuijlen, Maria, Brendan Ribera, Todd Willey, Bryan Helmkamp, Jan Berkel,
90
+ Lourens Naudé, Rick Olson, Russell Norris, Piotr Usewicz, Chris Eppstein,
91
+ Denis Barushev, Ben Pickles.
92
+
93
+
94
+ == Usable pagination in the UI
95
+
96
+ There are some CSS styles to get you started in the "examples/" directory. They
97
+ are {showcased online here}[http://mislav.caboo.se/static/will_paginate/].
98
+
99
+ More reading about pagination as design pattern:
100
+
101
+ * {Pagination 101}[http://kurafire.net/log/archive/2007/06/22/pagination-101]
102
+ * {Pagination gallery}[http://www.smashingmagazine.com/2007/11/16/pagination-gallery-examples-and-good-practices/]
103
+ * {Pagination on Yahoo Design Pattern Library}[http://developer.yahoo.com/ypatterns/parent.php?pattern=pagination]
104
+
105
+ Want to discuss, request features, ask questions? Join the
106
+ {Google group}[http://groups.google.com/group/will_paginate].
107
+
@@ -0,0 +1,62 @@
1
+ require 'rubygems'
2
+ begin
3
+ hanna_dir = '/Users/mislav/Projects/Hanna/lib'
4
+ $:.unshift hanna_dir if File.exists? hanna_dir
5
+ require 'hanna/rdoctask'
6
+ rescue LoadError
7
+ require 'rake'
8
+ require 'rake/rdoctask'
9
+ end
10
+ load 'test/tasks.rake'
11
+
12
+ desc 'Default: run unit tests.'
13
+ task :default => :test
14
+
15
+ desc 'Generate RDoc documentation for the will_paginate plugin.'
16
+ Rake::RDocTask.new(:rdoc) do |rdoc|
17
+ rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG.rdoc').
18
+ include('lib/**/*.rb').
19
+ exclude('lib/will_paginate/named_scope*').
20
+ exclude('lib/will_paginate/array.rb').
21
+ exclude('lib/will_paginate/version.rb')
22
+
23
+ rdoc.main = "README.rdoc" # page to start on
24
+ rdoc.title = "will_paginate documentation"
25
+
26
+ rdoc.rdoc_dir = 'doc' # rdoc output folder
27
+ rdoc.options << '--inline-source' << '--charset=UTF-8'
28
+ rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
29
+ end
30
+
31
+ desc %{Update ".manifest" with the latest list of project filenames. Respect\
32
+ .gitignore by excluding everything that git ignores. Update `files` and\
33
+ `test_files` arrays in "*.gemspec" file if it's present.}
34
+ task :manifest do
35
+ list = Dir['**/*'].sort
36
+ spec_file = Dir['*.gemspec'].first
37
+ list -= [spec_file] if spec_file
38
+
39
+ File.read('.gitignore').each_line do |glob|
40
+ glob = glob.chomp.sub(/^\//, '')
41
+ list -= Dir[glob]
42
+ list -= Dir["#{glob}/**/*"] if File.directory?(glob) and !File.symlink?(glob)
43
+ puts "excluding #{glob}"
44
+ end
45
+
46
+ if spec_file
47
+ spec = File.read spec_file
48
+ spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
49
+ assignment = $1
50
+ bunch = $2 ? list.grep(/^test\//) : list
51
+ '%s%%w(%s)' % [assignment, bunch.join(' ')]
52
+ end
53
+
54
+ File.open(spec_file, 'w') {|f| f << spec }
55
+ end
56
+ File.open('.manifest', 'w') {|f| f << list.join("\n") }
57
+ end
58
+
59
+ task :examples do
60
+ %x(haml examples/index.haml examples/index.html)
61
+ %x(sass examples/pagination.sass examples/pagination.css)
62
+ end
@@ -0,0 +1,69 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title Samples of pagination styling for will_paginate
5
+ %link{ :rel => 'stylesheet', :type => 'text/css', :href => 'pagination.css' }
6
+ %style{ :type => 'text/css' }
7
+ :sass
8
+ html
9
+ :margin 0
10
+ :padding 0
11
+ :background #999
12
+ :font normal 76% "Lucida Grande", Verdana, Helvetica, sans-serif
13
+ body
14
+ :margin 2em
15
+ :padding 2em
16
+ :border 2px solid gray
17
+ :background white
18
+ :color #222
19
+ h1
20
+ :font-size 2em
21
+ :font-weight normal
22
+ :margin 0 0 1em 0
23
+ h2
24
+ :font-size 1.4em
25
+ :margin 1em 0 .5em 0
26
+ pre
27
+ :font-size 13px
28
+ :font-family Monaco, "DejaVu Sans Mono", "Bitstream Vera Mono", "Courier New", monospace
29
+
30
+ - pagination = '<span class="disabled prev_page">&laquo; Previous</span> <span class="current">1</span> <a href="./?page=2" rel="next">2</a> <a href="./?page=3">3</a> <a href="./?page=4">4</a> <a href="./?page=5">5</a> <a href="./?page=6">6</a> <a href="./?page=7">7</a> <a href="./?page=8">8</a> <a href="./?page=9">9</a> <span class="gap">&hellip;</span> <a href="./?page=29">29</a> <a href="./?page=30">30</a> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>'
31
+ - pagination_no_page_links = '<span class="disabled prev_page">&laquo; Previous</span> <a href="./?page=2" rel="next" class="next_page">Next &raquo;</a>'
32
+
33
+ %body
34
+ %h1 Samples of pagination styling for will_paginate
35
+ %p
36
+ Find these styles in <b>"examples/pagination.css"</b> of <i>will_paginate</i> library.
37
+ There is a Sass version of it for all you sassy people.
38
+ %p
39
+ Read about good rules for pagination:
40
+ %a{ :href => 'http://kurafire.net/log/archive/2007/06/22/pagination-101' } Pagination 101
41
+ %p
42
+ %em Warning:
43
+ page links below don't lead anywhere (so don't click on them).
44
+
45
+ %h2 Unstyled pagination <span style="font-weight:normal">(<i>ewww!</i>)</span>
46
+ %div= pagination
47
+
48
+ %h2 Digg.com
49
+ .digg_pagination= pagination
50
+
51
+ %h2 Digg-style, no page links
52
+ .digg_pagination= pagination_no_page_links
53
+ %p Code that renders this:
54
+ %pre= '<code>%s</code>' % %[<%= will_paginate @posts, :page_links => false %>].gsub('<', '&lt;').gsub('>', '&gt;')
55
+
56
+ %h2 Digg-style, extra content
57
+ .digg_pagination
58
+ .page_info Displaying entries <b>1&nbsp;-&nbsp;6</b> of <b>180</b> in total
59
+ = pagination
60
+ %p Code that renders this:
61
+ %pre= '<code>%s</code>' % %[<div class="digg_pagination">\n <div clas="page_info">\n <%= page_entries_info @posts %>\n </div>\n <%= will_paginate @posts, :container => false %>\n</div>].gsub('<', '&lt;').gsub('>', '&gt;')
62
+
63
+ %h2 Apple.com store
64
+ .apple_pagination= pagination
65
+
66
+ %h2 Flickr.com
67
+ .flickr_pagination
68
+ = pagination
69
+ .page_info (118 photos)