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,30 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'json'
5
+
6
+ class TC_JSONFixtures < Test::Unit::TestCase
7
+ def setup
8
+ $KCODE = 'UTF8'
9
+ fixtures = File.join(File.dirname(__FILE__), 'fixtures/*.json')
10
+ passed, failed = Dir[fixtures].partition { |f| f['pass'] }
11
+ @passed = passed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
12
+ @failed = failed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
13
+ end
14
+
15
+ def test_passing
16
+ for name, source in @passed
17
+ assert JSON.parse(source),
18
+ "Did not pass for fixture '#{name}'"
19
+ end
20
+ end
21
+
22
+ def test_failing
23
+ for name, source in @failed
24
+ assert_raises(JSON::ParserError, JSON::NestingError,
25
+ "Did not fail for fixture '#{name}'") do
26
+ JSON.parse(source)
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,100 @@
1
+ require 'test/unit'
2
+ require 'json'
3
+
4
+ class TC_JSONGenerate < Test::Unit::TestCase
5
+ include JSON
6
+
7
+ def setup
8
+ $KCODE = 'UTF8'
9
+ @hash = {
10
+ 'a' => 2,
11
+ 'b' => 3.141,
12
+ 'c' => 'c',
13
+ 'd' => [ 1, "b", 3.14 ],
14
+ 'e' => { 'foo' => 'bar' },
15
+ 'g' => "\"\0\037",
16
+ 'h' => 1000.0,
17
+ 'i' => 0.001
18
+ }
19
+ @json2 = '{"a":2,"b":3.141,"c":"c","d":[1,"b",3.14],"e":{"foo":"bar"},' +
20
+ '"g":"\\"\\u0000\\u001f","h":1000.0,"i":0.001}'
21
+ @json3 = <<'EOT'.chomp
22
+ {
23
+ "a": 2,
24
+ "b": 3.141,
25
+ "c": "c",
26
+ "d": [
27
+ 1,
28
+ "b",
29
+ 3.14
30
+ ],
31
+ "e": {
32
+ "foo": "bar"
33
+ },
34
+ "g": "\"\u0000\u001f",
35
+ "h": 1000.0,
36
+ "i": 0.001
37
+ }
38
+ EOT
39
+ end
40
+
41
+ def test_unparse
42
+ json = unparse(@hash)
43
+ assert_equal(JSON.parse(@json2), JSON.parse(json))
44
+ parsed_json = parse(json)
45
+ assert_equal(@hash, parsed_json)
46
+ json = generate({1=>2})
47
+ assert_equal('{"1":2}', json)
48
+ parsed_json = parse(json)
49
+ assert_equal({"1"=>2}, parsed_json)
50
+ end
51
+
52
+ def test_unparse_pretty
53
+ json = pretty_unparse(@hash)
54
+ assert_equal(JSON.parse(@json3), JSON.parse(json))
55
+ parsed_json = parse(json)
56
+ assert_equal(@hash, parsed_json)
57
+ json = pretty_generate({1=>2})
58
+ assert_equal(<<'EOT'.chomp, json)
59
+ {
60
+ "1": 2
61
+ }
62
+ EOT
63
+ parsed_json = parse(json)
64
+ assert_equal({"1"=>2}, parsed_json)
65
+ end
66
+
67
+ def test_states
68
+ json = generate({1=>2}, nil)
69
+ assert_equal('{"1":2}', json)
70
+ s = JSON.state.new(:check_circular => true)
71
+ #assert s.check_circular
72
+ h = { 1=>2 }
73
+ h[3] = h
74
+ assert_raises(JSON::CircularDatastructure) { generate(h) }
75
+ assert_raises(JSON::CircularDatastructure) { generate(h, s) }
76
+ s = JSON.state.new(:check_circular => true)
77
+ #assert s.check_circular
78
+ a = [ 1, 2 ]
79
+ a << a
80
+ assert_raises(JSON::CircularDatastructure) { generate(a, s) }
81
+ end
82
+
83
+ def test_allow_nan
84
+ assert_raises(GeneratorError) { generate([JSON::NaN]) }
85
+ assert_equal '[NaN]', generate([JSON::NaN], :allow_nan => true)
86
+ assert_equal '[NaN]', fast_generate([JSON::NaN])
87
+ assert_raises(GeneratorError) { pretty_generate([JSON::NaN]) }
88
+ assert_equal "[\n NaN\n]", pretty_generate([JSON::NaN], :allow_nan => true)
89
+ assert_raises(GeneratorError) { generate([JSON::Infinity]) }
90
+ assert_equal '[Infinity]', generate([JSON::Infinity], :allow_nan => true)
91
+ assert_equal '[Infinity]', fast_generate([JSON::Infinity])
92
+ assert_raises(GeneratorError) { pretty_generate([JSON::Infinity]) }
93
+ assert_equal "[\n Infinity\n]", pretty_generate([JSON::Infinity], :allow_nan => true)
94
+ assert_raises(GeneratorError) { generate([JSON::MinusInfinity]) }
95
+ assert_equal '[-Infinity]', generate([JSON::MinusInfinity], :allow_nan => true)
96
+ assert_equal '[-Infinity]', fast_generate([JSON::MinusInfinity])
97
+ assert_raises(GeneratorError) { pretty_generate([JSON::MinusInfinity]) }
98
+ assert_equal "[\n -Infinity\n]", pretty_generate([JSON::MinusInfinity], :allow_nan => true)
99
+ end
100
+ end
@@ -0,0 +1,118 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'json/add/rails'
5
+ require 'date'
6
+
7
+ class TC_JSONRails < Test::Unit::TestCase
8
+ include JSON
9
+
10
+ class A
11
+ def initialize(a)
12
+ @a = a
13
+ end
14
+
15
+ attr_reader :a
16
+
17
+ def ==(other)
18
+ a == other.a
19
+ end
20
+
21
+ def self.json_create(object)
22
+ new(*object['args'])
23
+ end
24
+
25
+ def to_json(*args)
26
+ {
27
+ 'json_class' => self.class.name,
28
+ 'args' => [ @a ],
29
+ }.to_json(*args)
30
+ end
31
+ end
32
+
33
+ class B
34
+ def self.json_creatable?
35
+ false
36
+ end
37
+
38
+ def to_json(*args)
39
+ {
40
+ 'json_class' => self.class.name,
41
+ }.to_json(*args)
42
+ end
43
+ end
44
+
45
+ class C
46
+ def to_json(*args)
47
+ {
48
+ 'json_class' => 'TC_JSONRails::Nix',
49
+ }.to_json(*args)
50
+ end
51
+ end
52
+
53
+ def setup
54
+ $KCODE = 'UTF8'
55
+ end
56
+
57
+ def test_extended_json
58
+ a = A.new(666)
59
+ assert A.json_creatable?
60
+ json = generate(a)
61
+ a_again = JSON.parse(json)
62
+ assert_kind_of a.class, a_again
63
+ assert_equal a, a_again
64
+ end
65
+
66
+ def test_extended_json_disabled
67
+ a = A.new(666)
68
+ assert A.json_creatable?
69
+ json = generate(a)
70
+ a_again = JSON.parse(json, :create_additions => true)
71
+ assert_kind_of a.class, a_again
72
+ assert_equal a, a_again
73
+ a_hash = JSON.parse(json, :create_additions => false)
74
+ assert_kind_of Hash, a_hash
75
+ assert_equal(
76
+ {"args"=>[666], "json_class"=>"TC_JSONRails::A"}.sort_by { |k,| k },
77
+ a_hash.sort_by { |k,| k }
78
+ )
79
+ end
80
+
81
+ def test_extended_json_fail1
82
+ b = B.new
83
+ assert !B.json_creatable?
84
+ json = generate(b)
85
+ assert_equal({ 'json_class' => B.name }, JSON.parse(json))
86
+ end
87
+
88
+ def test_extended_json_fail2
89
+ c = C.new # with rails addition all objects are theoretically creatable
90
+ assert C.json_creatable?
91
+ json = generate(c)
92
+ assert_raises(ArgumentError) { JSON.parse(json) }
93
+ end
94
+
95
+ def test_raw_strings
96
+ raw = ''
97
+ raw_array = []
98
+ for i in 0..255
99
+ raw << i
100
+ raw_array << i
101
+ end
102
+ json = raw.to_json_raw
103
+ json_raw_object = raw.to_json_raw_object
104
+ hash = { 'json_class' => 'String', 'raw'=> raw_array }
105
+ assert_equal hash, json_raw_object
106
+ json_raw = <<EOT.chomp
107
+ {\"json_class\":\"String\",\"raw\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]}
108
+ EOT
109
+ # "
110
+ assert_equal json_raw, json
111
+ raw_again = JSON.parse(json)
112
+ assert_equal raw, raw_again
113
+ end
114
+
115
+ def test_symbol
116
+ assert_equal '"foo"', JSON(:foo) # we don't want an object here
117
+ end
118
+ end
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'json'
5
+
6
+ class TC_JSONUnicode < Test::Unit::TestCase
7
+ include JSON
8
+
9
+ def setup
10
+ $KCODE = 'UTF8'
11
+ end
12
+
13
+ def test_unicode
14
+ assert_equal '""', ''.to_json
15
+ assert_equal '"\\b"', "\b".to_json
16
+ assert_equal '"\u0001"', 0x1.chr.to_json
17
+ assert_equal '"\u001f"', 0x1f.chr.to_json
18
+ assert_equal '" "', ' '.to_json
19
+ assert_equal "\"#{0x7f.chr}\"", 0x7f.chr.to_json
20
+ utf8 = [ "© ≠ €! \01" ]
21
+ json = '["\u00a9 \u2260 \u20ac! \u0001"]'
22
+ assert_equal json, utf8.to_json
23
+ assert_equal utf8, parse(json)
24
+ utf8 = ["\343\201\202\343\201\204\343\201\206\343\201\210\343\201\212"]
25
+ json = "[\"\\u3042\\u3044\\u3046\\u3048\\u304a\"]"
26
+ assert_equal json, utf8.to_json
27
+ assert_equal utf8, parse(json)
28
+ utf8 = ['საქართველო']
29
+ json = "[\"\\u10e1\\u10d0\\u10e5\\u10d0\\u10e0\\u10d7\\u10d5\\u10d4\\u10da\\u10dd\"]"
30
+ assert_equal json, utf8.to_json
31
+ assert_equal utf8, parse(json)
32
+ assert_equal '["\\u00c3"]', JSON.generate(["Ã"])
33
+ assert_equal ["€"], JSON.parse('["\u20ac"]')
34
+ utf8 = ["\xf0\xa0\x80\x81"]
35
+ json = '["\ud840\udc01"]'
36
+ assert_equal json, JSON.generate(utf8)
37
+ assert_equal utf8, JSON.parse(json)
38
+ end
39
+
40
+ def test_chars
41
+ (0..0x7f).each do |i|
42
+ json = '["\u%04x"]' % i
43
+ if RUBY_VERSION >= "1.9."
44
+ i = i.chr
45
+ end
46
+ assert_equal i, JSON.parse(json).first[0]
47
+ if i == ?\b
48
+ generated = JSON.generate(["" << i])
49
+ assert '["\b"]' == generated || '["\10"]' == generated
50
+ elsif [?\n, ?\r, ?\t, ?\f].include?(i)
51
+ assert_equal '[' << ('' << i).dump << ']', JSON.generate(["" << i])
52
+ elsif i.chr < 0x20.chr
53
+ assert_equal json, JSON.generate(["" << i])
54
+ end
55
+ end
56
+ assert_raises(JSON::GeneratorError) do
57
+ JSON.generate(["" << 0x80])
58
+ end
59
+ assert_equal "\302\200", JSON.parse('["\u0080"]').first
60
+ end
61
+ end
@@ -0,0 +1,140 @@
1
+ $KCODE='UTF8'
2
+ require 'json'
3
+
4
+ require 'iconv'
5
+ ISO_8859_1_TO_UTF8 = Iconv.new('utf-8', 'iso-8859-15')
6
+ class ::String
7
+ def to_utf8
8
+ ISO_8859_1_TO_UTF8.iconv self
9
+ end
10
+ end
11
+
12
+ class Fuzzer
13
+ def initialize(n, freqs = {})
14
+ sum = freqs.inject(0.0) { |s, x| s + x.last }
15
+ freqs.each_key { |x| freqs[x] /= sum }
16
+ s = 0.0
17
+ freqs.each_key do |x|
18
+ freqs[x] = s .. (s + t = freqs[x])
19
+ s += t
20
+ end
21
+ @freqs = freqs
22
+ @n = n
23
+ @alpha = (0..0xff).to_a
24
+ end
25
+
26
+ def random_string
27
+ s = ''
28
+ 30.times { s << @alpha[rand(@alpha.size)] }
29
+ s.to_utf8
30
+ end
31
+
32
+ def pick
33
+ r = rand
34
+ found = @freqs.find { |k, f| f.include? rand }
35
+ found && found.first
36
+ end
37
+
38
+ def make_pick
39
+ k = pick
40
+ case
41
+ when k == Hash, k == Array
42
+ k.new
43
+ when k == true, k == false, k == nil
44
+ k
45
+ when k == String
46
+ random_string
47
+ when k == Fixnum
48
+ rand(2 ** 30) - 2 ** 29
49
+ when k == Bignum
50
+ rand(2 ** 70) - 2 ** 69
51
+ end
52
+ end
53
+
54
+ def fuzz(current = nil)
55
+ if @n > 0
56
+ case current
57
+ when nil
58
+ @n -= 1
59
+ current = fuzz [ Hash, Array ][rand(2)].new
60
+ when Array
61
+ while @n > 0
62
+ @n -= 1
63
+ current << case p = make_pick
64
+ when Array, Hash
65
+ fuzz(p)
66
+ else
67
+ p
68
+ end
69
+ end
70
+ when Hash
71
+ while @n > 0
72
+ @n -= 1
73
+ current[random_string] = case p = make_pick
74
+ when Array, Hash
75
+ fuzz(p)
76
+ else
77
+ p
78
+ end
79
+ end
80
+ end
81
+ end
82
+ current
83
+ end
84
+ end
85
+
86
+ class MyState < JSON.state
87
+ WS = " \r\t\n"
88
+
89
+ def initialize
90
+ super(
91
+ :indent => make_spaces,
92
+ :space => make_spaces,
93
+ :space_before => make_spaces,
94
+ :object_nl => make_spaces,
95
+ :array_nl => make_spaces,
96
+ :max_nesting => false
97
+ )
98
+ end
99
+
100
+ def make_spaces
101
+ s = ''
102
+ rand(1).times { s << WS[rand(WS.size)] }
103
+ s
104
+ end
105
+ end
106
+
107
+ n = (ARGV.shift || 500).to_i
108
+ loop do
109
+ fuzzer = Fuzzer.new(n,
110
+ Hash => 25,
111
+ Array => 25,
112
+ String => 10,
113
+ Fixnum => 10,
114
+ Bignum => 10,
115
+ nil => 5,
116
+ true => 5,
117
+ false => 5
118
+ )
119
+ o1 = fuzzer.fuzz
120
+ json = JSON.generate o1, MyState.new
121
+ if $DEBUG
122
+ puts "-" * 80
123
+ puts json, json.size
124
+ else
125
+ puts json.size
126
+ end
127
+ begin
128
+ o2 = JSON.parse(json, :max_nesting => false)
129
+ rescue JSON::ParserError => e
130
+ puts "Caught #{e.class}: #{e.message}\n#{e.backtrace * "\n"}"
131
+ puts "o1 = #{o1.inspect}", "json = #{json}", "json_str = #{json.inspect}"
132
+ puts "locals = #{local_variables.inspect}"
133
+ exit
134
+ end
135
+ if o1 != o2
136
+ puts "mismatch", "o1 = #{o1.inspect}", "o2 = #{o2.inspect}",
137
+ "json = #{json}", "json_str = #{json.inspect}"
138
+ puts "locals = #{local_variables.inspect}"
139
+ end
140
+ end