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,38 @@
1
+ module ActionWebService # :nodoc:
2
+ class ActionWebServiceError < StandardError # :nodoc:
3
+ end
4
+
5
+ # An Action Web Service object implements a specified API.
6
+ #
7
+ # Used by controllers operating in _Delegated_ dispatching mode.
8
+ #
9
+ # ==== Example
10
+ #
11
+ # class PersonService < ActionWebService::Base
12
+ # web_service_api PersonAPI
13
+ #
14
+ # def find_person(criteria)
15
+ # Person.find(:all) [...]
16
+ # end
17
+ #
18
+ # def delete_person(id)
19
+ # Person.find_by_id(id).destroy
20
+ # end
21
+ # end
22
+ #
23
+ # class PersonAPI < ActionWebService::API::Base
24
+ # api_method :find_person, :expects => [SearchCriteria], :returns => [[Person]]
25
+ # api_method :delete_person, :expects => [:int]
26
+ # end
27
+ #
28
+ # class SearchCriteria < ActionWebService::Struct
29
+ # member :firstname, :string
30
+ # member :lastname, :string
31
+ # member :email, :string
32
+ # end
33
+ class Base
34
+ # Whether to report exceptions back to the caller in the protocol's exception
35
+ # format
36
+ class_inheritable_option :web_service_exception_reporting, true
37
+ end
38
+ end
@@ -0,0 +1,144 @@
1
+ require 'time'
2
+ require 'date'
3
+ require 'xmlrpc/datetime'
4
+
5
+ module ActionWebService # :nodoc:
6
+ module Casting # :nodoc:
7
+ class CastingError < ActionWebServiceError # :nodoc:
8
+ end
9
+
10
+ # Performs casting of arbitrary values into the correct types for the signature
11
+ class BaseCaster # :nodoc:
12
+ def initialize(api_method)
13
+ @api_method = api_method
14
+ end
15
+
16
+ # Coerces the parameters in +params+ (an Enumerable) into the types
17
+ # this method expects
18
+ def cast_expects(params)
19
+ self.class.cast_expects(@api_method, params)
20
+ end
21
+
22
+ # Coerces the given +return_value+ into the type returned by this
23
+ # method
24
+ def cast_returns(return_value)
25
+ self.class.cast_returns(@api_method, return_value)
26
+ end
27
+
28
+ class << self
29
+ include ActionWebService::SignatureTypes
30
+
31
+ def cast_expects(api_method, params) # :nodoc:
32
+ return [] if api_method.expects.nil?
33
+ api_method.expects.zip(params).map{ |type, param| cast(param, type) }
34
+ end
35
+
36
+ def cast_returns(api_method, return_value) # :nodoc:
37
+ return nil if api_method.returns.nil?
38
+ cast(return_value, api_method.returns[0])
39
+ end
40
+
41
+ def cast(value, signature_type) # :nodoc:
42
+ return value if signature_type.nil? # signature.length != params.length
43
+ return nil if value.nil?
44
+ # XMLRPC protocol doesn't support nil values. It uses false instead.
45
+ # It should never happen for SOAP.
46
+ if signature_type.structured? && value.equal?(false)
47
+ return nil
48
+ end
49
+ unless signature_type.array? || signature_type.structured?
50
+ return value if canonical_type(value.class) == signature_type.type
51
+ end
52
+ if signature_type.array?
53
+ unless value.respond_to?(:entries) && !value.is_a?(String)
54
+ raise CastingError, "Don't know how to cast #{value.class} into #{signature_type.type.inspect}"
55
+ end
56
+ value.entries.map do |entry|
57
+ cast(entry, signature_type.element_type)
58
+ end
59
+ elsif signature_type.structured?
60
+ cast_to_structured_type(value, signature_type)
61
+ elsif !signature_type.custom?
62
+ cast_base_type(value, signature_type)
63
+ end
64
+ end
65
+
66
+ def cast_base_type(value, signature_type) # :nodoc:
67
+ # This is a work-around for the fact that XML-RPC special-cases DateTime values into its own DateTime type
68
+ # in order to support iso8601 dates. This doesn't work too well for us, so we'll convert it into a Time,
69
+ # with the caveat that we won't be able to handle pre-1970 dates that are sent to us.
70
+ #
71
+ # See http://dev.rubyonrails.com/ticket/2516
72
+ value = value.to_time if value.is_a?(XMLRPC::DateTime)
73
+
74
+ case signature_type.type
75
+ when :int
76
+ Integer(value)
77
+ when :string
78
+ value.to_s
79
+ when :base64
80
+ if value.is_a?(ActionWebService::Base64)
81
+ value
82
+ else
83
+ ActionWebService::Base64.new(value.to_s)
84
+ end
85
+ when :bool
86
+ return false if value.nil?
87
+ return value if value == true || value == false
88
+ case value.to_s.downcase
89
+ when '1', 'true', 'y', 'yes'
90
+ true
91
+ when '0', 'false', 'n', 'no'
92
+ false
93
+ else
94
+ raise CastingError, "Don't know how to cast #{value.class} into Boolean"
95
+ end
96
+ when :float
97
+ Float(value)
98
+ when :decimal
99
+ BigDecimal(value.to_s)
100
+ when :time
101
+ value = "%s/%s/%s %s:%s:%s" % value.values_at(*%w[2 3 1 4 5 6]) if value.kind_of?(Hash)
102
+ if value.kind_of?(Time)
103
+ value
104
+ elsif value.kind_of?(DateTime)
105
+ value.to_time
106
+ else
107
+ Time.parse(value.to_s)
108
+ end
109
+ when :date
110
+ value = "%s/%s/%s" % value.values_at(*%w[2 3 1]) if value.kind_of?(Hash)
111
+ value.kind_of?(Date) ? value : Date.parse(value.to_s)
112
+ when :datetime
113
+ value = "%s/%s/%s %s:%s:%s" % value.values_at(*%w[2 3 1 4 5 6]) if value.kind_of?(Hash)
114
+ value.kind_of?(DateTime) ? value : DateTime.parse(value.to_s)
115
+ end
116
+ end
117
+
118
+ def cast_to_structured_type(value, signature_type) # :nodoc:
119
+ obj = nil
120
+ obj = value if canonical_type(value.class) == canonical_type(signature_type.type)
121
+ obj ||= signature_type.type_class.new
122
+ if value.respond_to?(:each_pair)
123
+ klass = signature_type.type_class
124
+ value.each_pair do |name, val|
125
+ type = klass.respond_to?(:member_type) ? klass.member_type(name) : nil
126
+ val = cast(val, type) if type
127
+ # See http://dev.rubyonrails.com/ticket/3567
128
+ val = val.to_time if val.is_a?(XMLRPC::DateTime)
129
+ obj.__send__("#{name}=", val) if obj.respond_to?(name)
130
+ end
131
+ elsif value.respond_to?(:attributes)
132
+ signature_type.each_member do |name, type|
133
+ val = value.__send__(name)
134
+ obj.__send__("#{name}=", cast(val, type)) if obj.respond_to?(name)
135
+ end
136
+ else
137
+ raise CastingError, "Don't know how to cast #{value.class} to #{signature_type.type_class}"
138
+ end
139
+ obj
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,3 @@
1
+ require 'action_web_service/client/base'
2
+ require 'action_web_service/client/soap_client'
3
+ require 'action_web_service/client/xmlrpc_client'
@@ -0,0 +1,28 @@
1
+ module ActionWebService # :nodoc:
2
+ module Client # :nodoc:
3
+ class ClientError < StandardError # :nodoc:
4
+ end
5
+
6
+ class Base # :nodoc:
7
+ def initialize(api, endpoint_uri)
8
+ @api = api
9
+ @endpoint_uri = endpoint_uri
10
+ end
11
+
12
+ def method_missing(name, *args) # :nodoc:
13
+ call_name = method_name(name)
14
+ return super(name, *args) if call_name.nil?
15
+ self.perform_invocation(call_name, args)
16
+ end
17
+
18
+ private
19
+ def method_name(name)
20
+ if @api.has_api_method?(name.to_sym)
21
+ name.to_s
22
+ elsif @api.has_public_api_method?(name.to_s)
23
+ @api.api_method_name(name.to_s).to_s
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,113 @@
1
+ require 'soap/rpc/driver'
2
+ require 'uri'
3
+
4
+ module ActionWebService # :nodoc:
5
+ module Client # :nodoc:
6
+
7
+ # Implements SOAP client support (using RPC encoding for the messages).
8
+ #
9
+ # ==== Example Usage
10
+ #
11
+ # class PersonAPI < ActionWebService::API::Base
12
+ # api_method :find_all, :returns => [[Person]]
13
+ # end
14
+ #
15
+ # soap_client = ActionWebService::Client::Soap.new(PersonAPI, "http://...")
16
+ # persons = soap_client.find_all
17
+ #
18
+ class Soap < Base
19
+ # provides access to the underlying soap driver
20
+ attr_reader :driver
21
+
22
+ # Creates a new web service client using the SOAP RPC protocol.
23
+ #
24
+ # +api+ must be an ActionWebService::API::Base derivative, and
25
+ # +endpoint_uri+ must point at the relevant URL to which protocol requests
26
+ # will be sent with HTTP POST.
27
+ #
28
+ # Valid options:
29
+ # [<tt>:namespace</tt>] If the remote server has used a custom namespace to
30
+ # declare its custom types, you can specify it here. This would
31
+ # be the namespace declared with a [WebService(Namespace = "http://namespace")] attribute
32
+ # in .NET, for example.
33
+ # [<tt>:driver_options</tt>] If you want to supply any custom SOAP RPC driver
34
+ # options, you can provide them as a Hash here
35
+ #
36
+ # The <tt>:driver_options</tt> option can be used to configure the backend SOAP
37
+ # RPC driver. An example of configuring the SOAP backend to do
38
+ # client-certificate authenticated SSL connections to the server:
39
+ #
40
+ # opts = {}
41
+ # opts['protocol.http.ssl_config.verify_mode'] = 'OpenSSL::SSL::VERIFY_PEER'
42
+ # opts['protocol.http.ssl_config.client_cert'] = client_cert_file_path
43
+ # opts['protocol.http.ssl_config.client_key'] = client_key_file_path
44
+ # opts['protocol.http.ssl_config.ca_file'] = ca_cert_file_path
45
+ # client = ActionWebService::Client::Soap.new(api, 'https://some/service', :driver_options => opts)
46
+ def initialize(api, endpoint_uri, options={})
47
+ super(api, endpoint_uri)
48
+ @namespace = options[:namespace] || 'urn:ActionWebService'
49
+ @driver_options = options[:driver_options] || {}
50
+ @protocol = ActionWebService::Protocol::Soap::SoapProtocol.new @namespace
51
+ @soap_action_base = options[:soap_action_base]
52
+ @soap_action_base ||= URI.parse(endpoint_uri).path
53
+ @driver = create_soap_rpc_driver(api, endpoint_uri)
54
+ @driver_options.each do |name, value|
55
+ @driver.options[name.to_s] = value
56
+ end
57
+ end
58
+
59
+ protected
60
+ def perform_invocation(method_name, args)
61
+ method = @api.api_methods[method_name.to_sym]
62
+ args = method.cast_expects(args.dup) rescue args
63
+ return_value = @driver.send(method_name, *args)
64
+ method.cast_returns(return_value.dup) rescue return_value
65
+ end
66
+
67
+ def soap_action(method_name)
68
+ "#{@soap_action_base}/#{method_name}"
69
+ end
70
+
71
+ private
72
+ def create_soap_rpc_driver(api, endpoint_uri)
73
+ @protocol.register_api(api)
74
+ driver = SoapDriver.new(endpoint_uri, nil)
75
+ driver.mapping_registry = @protocol.marshaler.registry
76
+ api.api_methods.each do |name, method|
77
+ qname = XSD::QName.new(@namespace, method.public_name)
78
+ action = soap_action(method.public_name)
79
+ expects = method.expects
80
+ returns = method.returns
81
+ param_def = []
82
+ if expects
83
+ expects.each do |type|
84
+ type_binding = @protocol.marshaler.lookup_type(type)
85
+ if SOAP::Version >= "1.5.5"
86
+ param_def << ['in', type.name.to_s, [type_binding.type.type_class.to_s]]
87
+ else
88
+ param_def << ['in', type.name, type_binding.mapping]
89
+ end
90
+ end
91
+ end
92
+ if returns
93
+ type_binding = @protocol.marshaler.lookup_type(returns[0])
94
+ if SOAP::Version >= "1.5.5"
95
+ param_def << ['retval', 'return', [type_binding.type.type_class.to_s]]
96
+ else
97
+ param_def << ['retval', 'return', type_binding.mapping]
98
+ end
99
+ end
100
+ driver.add_method(qname, action, method.name.to_s, param_def)
101
+ end
102
+ driver
103
+ end
104
+
105
+ class SoapDriver < SOAP::RPC::Driver # :nodoc:
106
+ def add_method(qname, soapaction, name, param_def)
107
+ @proxy.add_rpc_method(qname, soapaction, name, param_def)
108
+ add_rpc_method_interface(name, param_def)
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,58 @@
1
+ require 'uri'
2
+ require 'xmlrpc/client'
3
+
4
+ module ActionWebService # :nodoc:
5
+ module Client # :nodoc:
6
+
7
+ # Implements XML-RPC client support
8
+ #
9
+ # ==== Example Usage
10
+ #
11
+ # class BloggerAPI < ActionWebService::API::Base
12
+ # inflect_names false
13
+ # api_method :getRecentPosts, :returns => [[Blog::Post]]
14
+ # end
15
+ #
16
+ # blog = ActionWebService::Client::XmlRpc.new(BloggerAPI, "http://.../RPC", :handler_name => "blogger")
17
+ # posts = blog.getRecentPosts
18
+ class XmlRpc < Base
19
+
20
+ # Creates a new web service client using the XML-RPC protocol.
21
+ #
22
+ # +api+ must be an ActionWebService::API::Base derivative, and
23
+ # +endpoint_uri+ must point at the relevant URL to which protocol requests
24
+ # will be sent with HTTP POST.
25
+ #
26
+ # Valid options:
27
+ # [<tt>:handler_name</tt>] If the remote server defines its services inside special
28
+ # handler (the Blogger API uses a <tt>"blogger"</tt> handler name for example),
29
+ # provide it here, or your method calls will fail
30
+ def initialize(api, endpoint_uri, options={})
31
+ @api = api
32
+ @handler_name = options[:handler_name]
33
+ @protocol = ActionWebService::Protocol::XmlRpc::XmlRpcProtocol.new
34
+ @client = XMLRPC::Client.new2(endpoint_uri, options[:proxy], options[:timeout])
35
+ end
36
+
37
+ protected
38
+ def perform_invocation(method_name, args)
39
+ method = @api.api_methods[method_name.to_sym]
40
+ if method.expects && method.expects.length != args.length
41
+ raise(ArgumentError, "#{method.public_name}: wrong number of arguments (#{args.length} for #{method.expects.length})")
42
+ end
43
+ args = method.cast_expects(args.dup) rescue args
44
+ if method.expects
45
+ method.expects.each_with_index{ |type, i| args[i] = @protocol.value_to_xmlrpc_wire_format(args[i], type) }
46
+ end
47
+ ok, return_value = @client.call2(public_name(method_name), *args)
48
+ return (method.cast_returns(return_value.dup) rescue return_value) if ok
49
+ raise(ClientError, "#{return_value.faultCode}: #{return_value.faultString}")
50
+ end
51
+
52
+ def public_name(method_name)
53
+ public_name = @api.public_api_method_name(method_name)
54
+ @handler_name ? "#{@handler_name}.#{public_name}" : public_name
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,3 @@
1
+ require 'action_web_service/container/direct_container'
2
+ require 'action_web_service/container/delegated_container'
3
+ require 'action_web_service/container/action_controller_container'
@@ -0,0 +1,93 @@
1
+ module ActionWebService # :nodoc:
2
+ module Container # :nodoc:
3
+ module ActionController # :nodoc:
4
+ def self.included(base) # :nodoc:
5
+ class << base
6
+ include ClassMethods
7
+ alias_method_chain :inherited, :api
8
+ alias_method_chain :web_service_api, :require
9
+ end
10
+ end
11
+
12
+ module ClassMethods
13
+ # Creates a client for accessing remote web services, using the
14
+ # given +protocol+ to communicate with the +endpoint_uri+.
15
+ #
16
+ # ==== Example
17
+ #
18
+ # class MyController < ActionController::Base
19
+ # web_client_api :blogger, :xmlrpc, "http://blogger.com/myblog/api/RPC2", :handler_name => 'blogger'
20
+ # end
21
+ #
22
+ # In this example, a protected method named <tt>blogger</tt> will
23
+ # now exist on the controller, and calling it will return the
24
+ # XML-RPC client object for working with that remote service.
25
+ #
26
+ # +options+ is the set of protocol client specific options (see
27
+ # a protocol client class for details).
28
+ #
29
+ # If your API definition does not exist on the load path with the
30
+ # correct rules for it to be found using +name+, you can pass in
31
+ # the API definition class via +options+, using a key of <tt>:api</tt>
32
+ def web_client_api(name, protocol, endpoint_uri, options={})
33
+ unless method_defined?(name)
34
+ api_klass = options.delete(:api) || require_web_service_api(name)
35
+ class_eval do
36
+ define_method(name) do
37
+ create_web_service_client(api_klass, protocol, endpoint_uri, options)
38
+ end
39
+ protected name
40
+ end
41
+ end
42
+ end
43
+
44
+ def web_service_api_with_require(definition=nil) # :nodoc:
45
+ return web_service_api_without_require if definition.nil?
46
+ case definition
47
+ when String, Symbol
48
+ klass = require_web_service_api(definition)
49
+ else
50
+ klass = definition
51
+ end
52
+ web_service_api_without_require(klass)
53
+ end
54
+
55
+ def require_web_service_api(name) # :nodoc:
56
+ case name
57
+ when String, Symbol
58
+ file_name = name.to_s.underscore + "_api"
59
+ class_name = file_name.camelize
60
+ class_names = [class_name, class_name.sub(/Api$/, 'API')]
61
+ begin
62
+ require_dependency(file_name)
63
+ rescue LoadError => load_error
64
+ requiree = / -- (.*?)(\.rb)?$/.match(load_error).to_a[1]
65
+ msg = requiree == file_name ? "Missing API definition file in apis/#{file_name}.rb" : "Can't load file: #{requiree}"
66
+ raise LoadError.new(msg).copy_blame!(load_error)
67
+ end
68
+ klass = nil
69
+ class_names.each do |name|
70
+ klass = name.constantize rescue nil
71
+ break unless klass.nil?
72
+ end
73
+ unless klass
74
+ raise(NameError, "neither #{class_names[0]} or #{class_names[1]} found")
75
+ end
76
+ klass
77
+ else
78
+ raise(ArgumentError, "expected String or Symbol argument")
79
+ end
80
+ end
81
+
82
+ private
83
+ def inherited_with_api(child)
84
+ inherited_without_api(child)
85
+ begin child.web_service_api(child.controller_path)
86
+ rescue MissingSourceFile => e
87
+ raise unless e.is_missing?("apis/#{child.controller_path}_api")
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
93
+ end