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,202 @@
1
+ module ActionWebService # :nodoc:
2
+ module Invocation # :nodoc:
3
+ class InvocationError < ActionWebService::ActionWebServiceError # :nodoc:
4
+ end
5
+
6
+ def self.included(base) # :nodoc:
7
+ base.extend(ClassMethods)
8
+ base.send(:include, ActionWebService::Invocation::InstanceMethods)
9
+ end
10
+
11
+ # Invocation interceptors provide a means to execute custom code before
12
+ # and after method invocations on ActionWebService::Base objects.
13
+ #
14
+ # When running in _Direct_ dispatching mode, ActionController filters
15
+ # should be used for this functionality instead.
16
+ #
17
+ # The semantics of invocation interceptors are the same as ActionController
18
+ # filters, and accept the same parameters and options.
19
+ #
20
+ # A _before_ interceptor can also cancel execution by returning +false+,
21
+ # or returning a <tt>[false, "cancel reason"]</tt> array if it wishes to supply
22
+ # a reason for canceling the request.
23
+ #
24
+ # === Example
25
+ #
26
+ # class CustomService < ActionWebService::Base
27
+ # before_invocation :intercept_add, :only => [:add]
28
+ #
29
+ # def add(a, b)
30
+ # a + b
31
+ # end
32
+ #
33
+ # private
34
+ # def intercept_add
35
+ # return [false, "permission denied"] # cancel it
36
+ # end
37
+ # end
38
+ #
39
+ # Options:
40
+ # [<tt>:except</tt>] A list of methods for which the interceptor will NOT be called
41
+ # [<tt>:only</tt>] A list of methods for which the interceptor WILL be called
42
+ module ClassMethods
43
+ # Appends the given +interceptors+ to be called
44
+ # _before_ method invocation.
45
+ def append_before_invocation(*interceptors, &block)
46
+ conditions = extract_conditions!(interceptors)
47
+ interceptors << block if block_given?
48
+ add_interception_conditions(interceptors, conditions)
49
+ append_interceptors_to_chain("before", interceptors)
50
+ end
51
+
52
+ # Prepends the given +interceptors+ to be called
53
+ # _before_ method invocation.
54
+ def prepend_before_invocation(*interceptors, &block)
55
+ conditions = extract_conditions!(interceptors)
56
+ interceptors << block if block_given?
57
+ add_interception_conditions(interceptors, conditions)
58
+ prepend_interceptors_to_chain("before", interceptors)
59
+ end
60
+
61
+ alias :before_invocation :append_before_invocation
62
+
63
+ # Appends the given +interceptors+ to be called
64
+ # _after_ method invocation.
65
+ def append_after_invocation(*interceptors, &block)
66
+ conditions = extract_conditions!(interceptors)
67
+ interceptors << block if block_given?
68
+ add_interception_conditions(interceptors, conditions)
69
+ append_interceptors_to_chain("after", interceptors)
70
+ end
71
+
72
+ # Prepends the given +interceptors+ to be called
73
+ # _after_ method invocation.
74
+ def prepend_after_invocation(*interceptors, &block)
75
+ conditions = extract_conditions!(interceptors)
76
+ interceptors << block if block_given?
77
+ add_interception_conditions(interceptors, conditions)
78
+ prepend_interceptors_to_chain("after", interceptors)
79
+ end
80
+
81
+ alias :after_invocation :append_after_invocation
82
+
83
+ def before_invocation_interceptors # :nodoc:
84
+ read_inheritable_attribute("before_invocation_interceptors")
85
+ end
86
+
87
+ def after_invocation_interceptors # :nodoc:
88
+ read_inheritable_attribute("after_invocation_interceptors")
89
+ end
90
+
91
+ def included_intercepted_methods # :nodoc:
92
+ read_inheritable_attribute("included_intercepted_methods") || {}
93
+ end
94
+
95
+ def excluded_intercepted_methods # :nodoc:
96
+ read_inheritable_attribute("excluded_intercepted_methods") || {}
97
+ end
98
+
99
+ private
100
+ def append_interceptors_to_chain(condition, interceptors)
101
+ write_inheritable_array("#{condition}_invocation_interceptors", interceptors)
102
+ end
103
+
104
+ def prepend_interceptors_to_chain(condition, interceptors)
105
+ interceptors = interceptors + read_inheritable_attribute("#{condition}_invocation_interceptors")
106
+ write_inheritable_attribute("#{condition}_invocation_interceptors", interceptors)
107
+ end
108
+
109
+ def extract_conditions!(interceptors)
110
+ return nil unless interceptors.last.is_a? Hash
111
+ interceptors.pop
112
+ end
113
+
114
+ def add_interception_conditions(interceptors, conditions)
115
+ return unless conditions
116
+ included, excluded = conditions[:only], conditions[:except]
117
+ write_inheritable_hash("included_intercepted_methods", condition_hash(interceptors, included)) && return if included
118
+ write_inheritable_hash("excluded_intercepted_methods", condition_hash(interceptors, excluded)) if excluded
119
+ end
120
+
121
+ def condition_hash(interceptors, *methods)
122
+ interceptors.inject({}) {|hash, interceptor| hash.merge(interceptor => methods.flatten.map {|method| method.to_s})}
123
+ end
124
+ end
125
+
126
+ module InstanceMethods # :nodoc:
127
+ def self.included(base)
128
+ base.class_eval do
129
+ alias_method_chain :perform_invocation, :interception
130
+ end
131
+ end
132
+
133
+ def perform_invocation_with_interception(method_name, params, &block)
134
+ return if before_invocation(method_name, params, &block) == false
135
+ return_value = perform_invocation_without_interception(method_name, params)
136
+ after_invocation(method_name, params, return_value)
137
+ return_value
138
+ end
139
+
140
+ def perform_invocation(method_name, params)
141
+ send(method_name, *params)
142
+ end
143
+
144
+ def before_invocation(name, args, &block)
145
+ call_interceptors(self.class.before_invocation_interceptors, [name, args], &block)
146
+ end
147
+
148
+ def after_invocation(name, args, result)
149
+ call_interceptors(self.class.after_invocation_interceptors, [name, args, result])
150
+ end
151
+
152
+ private
153
+
154
+ def call_interceptors(interceptors, interceptor_args, &block)
155
+ if interceptors and not interceptors.empty?
156
+ interceptors.each do |interceptor|
157
+ next if method_exempted?(interceptor, interceptor_args[0].to_s)
158
+ result = case
159
+ when interceptor.is_a?(Symbol)
160
+ self.send(interceptor, *interceptor_args)
161
+ when interceptor_block?(interceptor)
162
+ interceptor.call(self, *interceptor_args)
163
+ when interceptor_class?(interceptor)
164
+ interceptor.intercept(self, *interceptor_args)
165
+ else
166
+ raise(
167
+ InvocationError,
168
+ "Interceptors need to be either a symbol, proc/method, or a class implementing a static intercept method"
169
+ )
170
+ end
171
+ reason = nil
172
+ if result.is_a?(Array)
173
+ reason = result[1] if result[1]
174
+ result = result[0]
175
+ end
176
+ if result == false
177
+ block.call(reason) if block && reason
178
+ return false
179
+ end
180
+ end
181
+ end
182
+ end
183
+
184
+ def interceptor_block?(interceptor)
185
+ interceptor.respond_to?("call") && (interceptor.arity == 3 || interceptor.arity == -1)
186
+ end
187
+
188
+ def interceptor_class?(interceptor)
189
+ interceptor.respond_to?("intercept")
190
+ end
191
+
192
+ def method_exempted?(interceptor, method_name)
193
+ case
194
+ when self.class.included_intercepted_methods[interceptor]
195
+ !self.class.included_intercepted_methods[interceptor].include?(method_name)
196
+ when self.class.excluded_intercepted_methods[interceptor]
197
+ self.class.excluded_intercepted_methods[interceptor].include?(method_name)
198
+ end
199
+ end
200
+ end
201
+ end
202
+ end
@@ -0,0 +1,4 @@
1
+ require 'action_web_service/protocol/abstract'
2
+ require 'action_web_service/protocol/discovery'
3
+ require 'action_web_service/protocol/soap_protocol'
4
+ require 'action_web_service/protocol/xmlrpc_protocol'
@@ -0,0 +1,112 @@
1
+ module ActionWebService # :nodoc:
2
+ module Protocol # :nodoc:
3
+ class ProtocolError < ActionWebServiceError # :nodoc:
4
+ end
5
+
6
+ class AbstractProtocol # :nodoc:
7
+ def setup(controller)
8
+ end
9
+
10
+ def decode_action_pack_request(action_pack_request)
11
+ end
12
+
13
+ def encode_action_pack_request(service_name, public_method_name, raw_body, options={})
14
+ klass = options[:request_class] || SimpleActionPackRequest
15
+ request = klass.new
16
+ request.request_parameters['action'] = service_name.to_s
17
+ request.env['RAW_POST_DATA'] = raw_body
18
+ request.env['REQUEST_METHOD'] = 'POST'
19
+ request.env['HTTP_CONTENT_TYPE'] = 'text/xml'
20
+ request
21
+ end
22
+
23
+ def decode_request(raw_request, service_name, protocol_options={})
24
+ end
25
+
26
+ def encode_request(method_name, params, param_types)
27
+ end
28
+
29
+ def decode_response(raw_response)
30
+ end
31
+
32
+ def encode_response(method_name, return_value, return_type, protocol_options={})
33
+ end
34
+
35
+ def protocol_client(api, protocol_name, endpoint_uri, options)
36
+ end
37
+
38
+ def register_api(api)
39
+ end
40
+ end
41
+
42
+ class Request # :nodoc:
43
+ attr :protocol
44
+ attr_accessor :method_name
45
+ attr_accessor :method_params
46
+ attr :service_name
47
+ attr_accessor :api
48
+ attr_accessor :api_method
49
+ attr :protocol_options
50
+
51
+ def initialize(protocol, method_name, method_params, service_name, api=nil, api_method=nil, protocol_options=nil)
52
+ @protocol = protocol
53
+ @method_name = method_name
54
+ @method_params = method_params
55
+ @service_name = service_name
56
+ @api = api
57
+ @api_method = api_method
58
+ @protocol_options = protocol_options || {}
59
+ end
60
+ end
61
+
62
+ class Response # :nodoc:
63
+ attr :body
64
+ attr :content_type
65
+ attr :return_value
66
+
67
+ def initialize(body, content_type, return_value)
68
+ @body = body
69
+ @content_type = content_type
70
+ @return_value = return_value
71
+ end
72
+ end
73
+
74
+ class SimpleActionPackRequest < ActionController::AbstractRequest # :nodoc:
75
+ def initialize
76
+ @env = {}
77
+ @qparams = {}
78
+ @rparams = {}
79
+ @cookies = {}
80
+ reset_session
81
+ end
82
+
83
+ def query_parameters
84
+ @qparams
85
+ end
86
+
87
+ def request_parameters
88
+ @rparams
89
+ end
90
+
91
+ def env
92
+ @env
93
+ end
94
+
95
+ def host
96
+ ''
97
+ end
98
+
99
+ def cookies
100
+ @cookies
101
+ end
102
+
103
+ def session
104
+ @session
105
+ end
106
+
107
+ def reset_session
108
+ @session = {}
109
+ end
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,37 @@
1
+ module ActionWebService # :nodoc:
2
+ module Protocol # :nodoc:
3
+ module Discovery # :nodoc:
4
+ def self.included(base)
5
+ base.extend(ClassMethods)
6
+ base.send(:include, ActionWebService::Protocol::Discovery::InstanceMethods)
7
+ end
8
+
9
+ module ClassMethods # :nodoc:
10
+ def register_protocol(klass)
11
+ write_inheritable_array("web_service_protocols", [klass])
12
+ end
13
+ end
14
+
15
+ module InstanceMethods # :nodoc:
16
+ private
17
+ def discover_web_service_request(action_pack_request)
18
+ (self.class.read_inheritable_attribute("web_service_protocols") || []).each do |protocol|
19
+ protocol = protocol.create(self)
20
+ request = protocol.decode_action_pack_request(action_pack_request)
21
+ return request unless request.nil?
22
+ end
23
+ nil
24
+ end
25
+
26
+ def create_web_service_client(api, protocol_name, endpoint_uri, options)
27
+ (self.class.read_inheritable_attribute("web_service_protocols") || []).each do |protocol|
28
+ protocol = protocol.create(self)
29
+ client = protocol.protocol_client(api, protocol_name, endpoint_uri, options)
30
+ return client unless client.nil?
31
+ end
32
+ nil
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,176 @@
1
+ require 'action_web_service/protocol/soap_protocol/marshaler'
2
+ require 'soap/streamHandler'
3
+ require 'action_web_service/client/soap_client'
4
+
5
+ module ActionWebService # :nodoc:
6
+ module API # :nodoc:
7
+ class Base # :nodoc:
8
+ def self.soap_client(endpoint_uri, options={})
9
+ ActionWebService::Client::Soap.new self, endpoint_uri, options
10
+ end
11
+ end
12
+ end
13
+
14
+ module Protocol # :nodoc:
15
+ module Soap # :nodoc:
16
+ def self.included(base)
17
+ base.register_protocol(SoapProtocol)
18
+ base.class_inheritable_option(:wsdl_service_name)
19
+ base.class_inheritable_option(:wsdl_namespace)
20
+ end
21
+
22
+ class SoapProtocol < AbstractProtocol # :nodoc:
23
+ AWSEncoding = 'UTF-8'
24
+ XSDEncoding = 'UTF8'
25
+
26
+ attr :marshaler
27
+
28
+ def initialize(namespace=nil)
29
+ namespace ||= 'urn:ActionWebService'
30
+ @marshaler = SoapMarshaler.new namespace
31
+ end
32
+
33
+ def self.create(controller)
34
+ SoapProtocol.new(controller.wsdl_namespace)
35
+ end
36
+
37
+ def decode_action_pack_request(action_pack_request)
38
+ return nil unless soap_action = has_valid_soap_action?(action_pack_request)
39
+ service_name = action_pack_request.parameters['action']
40
+ input_encoding = parse_charset(action_pack_request.env['HTTP_CONTENT_TYPE'])
41
+ protocol_options = {
42
+ :soap_action => soap_action,
43
+ :charset => input_encoding
44
+ }
45
+ decode_request(action_pack_request.raw_post, service_name, protocol_options)
46
+ end
47
+
48
+ def encode_action_pack_request(service_name, public_method_name, raw_body, options={})
49
+ request = super
50
+ request.env['HTTP_SOAPACTION'] = '/soap/%s/%s' % [service_name, public_method_name]
51
+ request
52
+ end
53
+
54
+ def decode_request(raw_request, service_name, protocol_options={})
55
+ envelope = SOAP::Processor.unmarshal(raw_request, :charset => protocol_options[:charset])
56
+ unless envelope
57
+ raise ProtocolError, "Failed to parse SOAP request message"
58
+ end
59
+ request = envelope.body.request
60
+ method_name = request.elename.name
61
+ params = request.collect{ |k, v| marshaler.soap_to_ruby(request[k]) }
62
+ Request.new(self, method_name, params, service_name, nil, nil, protocol_options)
63
+ end
64
+
65
+ def encode_request(method_name, params, param_types)
66
+ param_types.each{ |type| marshaler.register_type(type) } if param_types
67
+ qname = XSD::QName.new(marshaler.namespace, method_name)
68
+ param_def = []
69
+ if param_types
70
+ params = param_types.zip(params).map do |type, param|
71
+ param_def << ['in', type.name, marshaler.lookup_type(type).mapping]
72
+ [type.name, marshaler.ruby_to_soap(param)]
73
+ end
74
+ else
75
+ params = []
76
+ end
77
+ request = SOAP::RPC::SOAPMethodRequest.new(qname, param_def)
78
+ request.set_param(params)
79
+ envelope = create_soap_envelope(request)
80
+ SOAP::Processor.marshal(envelope)
81
+ end
82
+
83
+ def decode_response(raw_response)
84
+ envelope = SOAP::Processor.unmarshal(raw_response)
85
+ unless envelope
86
+ raise ProtocolError, "Failed to parse SOAP request message"
87
+ end
88
+ method_name = envelope.body.request.elename.name
89
+ return_value = envelope.body.response
90
+ return_value = marshaler.soap_to_ruby(return_value) unless return_value.nil?
91
+ [method_name, return_value]
92
+ end
93
+
94
+ def encode_response(method_name, return_value, return_type, protocol_options={})
95
+ if return_type
96
+ return_binding = marshaler.register_type(return_type)
97
+ marshaler.annotate_arrays(return_binding, return_value)
98
+ end
99
+ qname = XSD::QName.new(marshaler.namespace, method_name)
100
+ if return_value.nil?
101
+ response = SOAP::RPC::SOAPMethodResponse.new(qname, nil)
102
+ else
103
+ if return_value.is_a?(Exception)
104
+ detail = SOAP::Mapping::SOAPException.new(return_value)
105
+ response = SOAP::SOAPFault.new(
106
+ SOAP::SOAPQName.new('%s:%s' % [SOAP::SOAPNamespaceTag, 'Server']),
107
+ SOAP::SOAPString.new(return_value.to_s),
108
+ SOAP::SOAPString.new(self.class.name),
109
+ marshaler.ruby_to_soap(detail))
110
+ else
111
+ if return_type
112
+ param_def = [['retval', 'return', marshaler.lookup_type(return_type).mapping]]
113
+ response = SOAP::RPC::SOAPMethodResponse.new(qname, param_def)
114
+ response.retval = marshaler.ruby_to_soap(return_value)
115
+ else
116
+ response = SOAP::RPC::SOAPMethodResponse.new(qname, nil)
117
+ end
118
+ end
119
+ end
120
+ envelope = create_soap_envelope(response)
121
+
122
+ # FIXME: This is not thread-safe, but StringFactory_ in SOAP4R only
123
+ # reads target encoding from the XSD::Charset.encoding variable.
124
+ # This is required to ensure $KCODE strings are converted
125
+ # correctly to UTF-8 for any values of $KCODE.
126
+ previous_encoding = XSD::Charset.encoding
127
+ XSD::Charset.encoding = XSDEncoding
128
+ response_body = SOAP::Processor.marshal(envelope, :charset => AWSEncoding)
129
+ XSD::Charset.encoding = previous_encoding
130
+
131
+ Response.new(response_body, "text/xml; charset=#{AWSEncoding}", return_value)
132
+ end
133
+
134
+ def protocol_client(api, protocol_name, endpoint_uri, options={})
135
+ return nil unless protocol_name == :soap
136
+ ActionWebService::Client::Soap.new(api, endpoint_uri, options)
137
+ end
138
+
139
+ def register_api(api)
140
+ api.api_methods.each do |name, method|
141
+ method.expects.each{ |type| marshaler.register_type(type) } if method.expects
142
+ method.returns.each{ |type| marshaler.register_type(type) } if method.returns
143
+ end
144
+ end
145
+
146
+ private
147
+ def has_valid_soap_action?(request)
148
+ return nil unless request.method == :post
149
+ soap_action = request.env['HTTP_SOAPACTION']
150
+ return nil unless soap_action
151
+ soap_action = soap_action.dup
152
+ soap_action.gsub!(/^"/, '')
153
+ soap_action.gsub!(/"$/, '')
154
+ soap_action.strip!
155
+ return nil if soap_action.empty?
156
+ soap_action
157
+ end
158
+
159
+ def create_soap_envelope(body)
160
+ header = SOAP::SOAPHeader.new
161
+ body = SOAP::SOAPBody.new(body)
162
+ SOAP::SOAPEnvelope.new(header, body)
163
+ end
164
+
165
+ def parse_charset(content_type)
166
+ return AWSEncoding if content_type.nil?
167
+ if /^text\/xml(?:\s*;\s*charset=([^"]+|"[^"]+"))$/i =~ content_type
168
+ $1
169
+ else
170
+ AWSEncoding
171
+ end
172
+ end
173
+ end
174
+ end
175
+ end
176
+ end