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,16 @@
1
+ #
2
+ # example controller implementing both blogger and metaWeblog APIs
3
+ # in a way that should be compatible with clients supporting both/either.
4
+ #
5
+ # test by pointing your client at http://URL/xmlrpc/api
6
+ #
7
+
8
+ require 'meta_weblog_service'
9
+ require 'blogger_service'
10
+
11
+ class XmlrpcController < ApplicationController
12
+ web_service_dispatching_mode :layered
13
+
14
+ web_service :metaWeblog, MetaWeblogService.new
15
+ web_service :blogger, BloggerService.new
16
+ end
@@ -0,0 +1,28 @@
1
+ Description:
2
+ The web service generator creates the controller and API definition for
3
+ a web service.
4
+
5
+ The generator takes a web service name and a list of API methods as arguments.
6
+ The web service name may be given in CamelCase or under_score and should
7
+ contain no extra suffixes. To create a web service within a
8
+ module, specify the web service name as 'module/webservice'.
9
+
10
+ The generator creates a controller class in app/controllers, an API definition
11
+ in app/apis, and a functional test suite in test/functional.
12
+
13
+ Example:
14
+ ./script/generate web_service User add edit list remove
15
+
16
+ User web service.
17
+ Controller: app/controllers/user_controller.rb
18
+ API: app/apis/user_api.rb
19
+ Test: test/functional/user_api_test.rb
20
+
21
+ Modules Example:
22
+ ./script/generate web_service 'api/registration' register renew
23
+
24
+ Registration web service.
25
+ Controller: app/controllers/api/registration_controller.rb
26
+ API: app/apis/api/registration_api.rb
27
+ Test: test/functional/api/registration_api_test.rb
28
+
@@ -0,0 +1,5 @@
1
+ class <%= class_name %>Api < ActionWebService::API::Base
2
+ <% for method_name in args -%>
3
+ api_method :<%= method_name %>
4
+ <% end -%>
5
+ end
@@ -0,0 +1,8 @@
1
+ class <%= class_name %>Controller < ApplicationController
2
+ wsdl_service_name '<%= class_name %>'
3
+ <% for method_name in args -%>
4
+
5
+ def <%= method_name %>
6
+ end
7
+ <% end -%>
8
+ end
@@ -0,0 +1,19 @@
1
+ require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper'
2
+ require '<%= file_path %>_controller'
3
+
4
+ class <%= class_name %>Controller; def rescue_action(e) raise e end; end
5
+
6
+ class <%= class_name %>ControllerApiTest < Test::Unit::TestCase
7
+ def setup
8
+ @controller = <%= class_name %>Controller.new
9
+ @request = ActionController::TestRequest.new
10
+ @response = ActionController::TestResponse.new
11
+ end
12
+ <% for method_name in args -%>
13
+
14
+ def test_<%= method_name %>
15
+ result = invoke :<%= method_name %>
16
+ assert_equal nil, result
17
+ end
18
+ <% end -%>
19
+ end
@@ -0,0 +1,29 @@
1
+ class WebServiceGenerator < Rails::Generator::NamedBase
2
+ def manifest
3
+ record do |m|
4
+ # Check for class naming collisions.
5
+ m.class_collisions class_path, "#{class_name}Api", "#{class_name}Controller", "#{class_name}ApiTest"
6
+
7
+ # API and test directories.
8
+ m.directory File.join('app/services', class_path)
9
+ m.directory File.join('app/controllers', class_path)
10
+ m.directory File.join('test/functional', class_path)
11
+
12
+ # API definition, controller, and functional test.
13
+ m.template 'api_definition.rb',
14
+ File.join('app/services',
15
+ class_path,
16
+ "#{file_name}_api.rb")
17
+
18
+ m.template 'controller.rb',
19
+ File.join('app/controllers',
20
+ class_path,
21
+ "#{file_name}_controller.rb")
22
+
23
+ m.template 'functional_test.rb',
24
+ File.join('test/functional',
25
+ class_path,
26
+ "#{file_name}_api_test.rb")
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,66 @@
1
+ #--
2
+ # Copyright (C) 2005 Leon Breedt
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ #++
23
+
24
+ begin
25
+ require 'active_support'
26
+ require 'action_controller'
27
+ require 'active_record'
28
+ rescue LoadError
29
+ require 'rubygems'
30
+ gem 'activesupport', '>= 2.1.0'
31
+ gem 'actionpack', '>= 2.1.0'
32
+ gem 'activerecord', '>= 2.1.0'
33
+ end
34
+
35
+ $:.unshift(File.dirname(__FILE__) + "/action_web_service/vendor/")
36
+
37
+ require 'action_web_service/support/class_inheritable_options'
38
+ require 'action_web_service/support/signature_types'
39
+ require 'action_web_service/base'
40
+ require 'action_web_service/client'
41
+ require 'action_web_service/invocation'
42
+ require 'action_web_service/api'
43
+ require 'action_web_service/casting'
44
+ require 'action_web_service/struct'
45
+ require 'action_web_service/container'
46
+ require 'action_web_service/protocol'
47
+ require 'action_web_service/dispatcher'
48
+ require 'action_web_service/scaffolding'
49
+
50
+ ActionWebService::Base.class_eval do
51
+ include ActionWebService::Container::Direct
52
+ include ActionWebService::Invocation
53
+ end
54
+
55
+ ActionController::Base.class_eval do
56
+ include ActionWebService::Protocol::Discovery
57
+ include ActionWebService::Protocol::Soap
58
+ include ActionWebService::Protocol::XmlRpc
59
+ include ActionWebService::Container::Direct
60
+ include ActionWebService::Container::Delegated
61
+ include ActionWebService::Container::ActionController
62
+ include ActionWebService::Invocation
63
+ include ActionWebService::Dispatcher
64
+ include ActionWebService::Dispatcher::ActionController
65
+ include ActionWebService::Scaffolding
66
+ end
@@ -0,0 +1,297 @@
1
+ module ActionWebService # :nodoc:
2
+ module API # :nodoc:
3
+ # A web service API class specifies the methods that will be available for
4
+ # invocation for an API. It also contains metadata such as the method type
5
+ # signature hints.
6
+ #
7
+ # It is not intended to be instantiated.
8
+ #
9
+ # It is attached to web service implementation classes like
10
+ # ActionWebService::Base and ActionController::Base derivatives by using
11
+ # <tt>container.web_service_api</tt>, where <tt>container</tt> is an
12
+ # ActionController::Base or a ActionWebService::Base.
13
+ #
14
+ # See ActionWebService::Container::Direct::ClassMethods for an example
15
+ # of use.
16
+ class Base
17
+ # Whether to transform the public API method names into camel-cased names
18
+ class_inheritable_option :inflect_names, true
19
+
20
+ # By default only HTTP POST requests are processed
21
+ class_inheritable_option :allowed_http_methods, [ :post ]
22
+
23
+ # Whether to allow ActiveRecord::Base models in <tt>:expects</tt>.
24
+ # The default is +false+; you should be aware of the security implications
25
+ # of allowing this, and ensure that you don't allow remote callers to
26
+ # easily overwrite data they should not have access to.
27
+ class_inheritable_option :allow_active_record_expects, false
28
+
29
+ # If present, the name of a method to call when the remote caller
30
+ # tried to call a nonexistent method. Semantically equivalent to
31
+ # +method_missing+.
32
+ class_inheritable_option :default_api_method
33
+
34
+ # Disallow instantiation
35
+ private_class_method :new, :allocate
36
+
37
+ class << self
38
+ include ActionWebService::SignatureTypes
39
+
40
+ # API methods have a +name+, which must be the Ruby method name to use when
41
+ # performing the invocation on the web service object.
42
+ #
43
+ # The signatures for the method input parameters and return value can
44
+ # by specified in +options+.
45
+ #
46
+ # A signature is an array of one or more parameter specifiers.
47
+ # A parameter specifier can be one of the following:
48
+ #
49
+ # * A symbol or string representing one of the Action Web Service base types.
50
+ # See ActionWebService::SignatureTypes for a canonical list of the base types.
51
+ # * The Class object of the parameter type
52
+ # * A single-element Array containing one of the two preceding items. This
53
+ # will cause Action Web Service to treat the parameter at that position
54
+ # as an array containing only values of the given type.
55
+ # * A Hash containing as key the name of the parameter, and as value
56
+ # one of the three preceding items
57
+ #
58
+ # If no method input parameter or method return value signatures are given,
59
+ # the method is assumed to take no parameters and/or return no values of
60
+ # interest, and any values that are received by the server will be
61
+ # discarded and ignored.
62
+ #
63
+ # Valid options:
64
+ # [<tt>:expects</tt>] Signature for the method input parameters
65
+ # [<tt>:returns</tt>] Signature for the method return value
66
+ # [<tt>:expects_and_returns</tt>] Signature for both input parameters and return value
67
+ def api_method(name, options={})
68
+ unless options.is_a?(Hash)
69
+ raise(ActionWebServiceError, "Expected a Hash for options")
70
+ end
71
+ validate_options([:expects, :returns, :expects_and_returns], options.keys)
72
+ if options[:expects_and_returns]
73
+ expects = options[:expects_and_returns]
74
+ returns = options[:expects_and_returns]
75
+ else
76
+ expects = options[:expects]
77
+ returns = options[:returns]
78
+ end
79
+ expects = canonical_signature(expects)
80
+ returns = canonical_signature(returns)
81
+ if expects
82
+ expects.each do |type|
83
+ type = type.element_type if type.is_a?(ArrayType)
84
+ if type.type_class.ancestors.include?(ActiveRecord::Base) && !allow_active_record_expects
85
+ raise(ActionWebServiceError, "ActiveRecord model classes not allowed in :expects")
86
+ end
87
+ end
88
+ end
89
+ name = name.to_sym
90
+ public_name = public_api_method_name(name)
91
+ method = Method.new(name, public_name, expects, returns)
92
+ write_inheritable_hash("api_methods", name => method)
93
+ write_inheritable_hash("api_public_method_names", public_name => name)
94
+ end
95
+
96
+ # Whether the given method name is a service method on this API
97
+ #
98
+ # class ProjectsApi < ActionWebService::API::Base
99
+ # api_method :getCount, :returns => [:int]
100
+ # end
101
+ #
102
+ # ProjectsApi.has_api_method?('GetCount') #=> false
103
+ # ProjectsApi.has_api_method?(:getCount) #=> true
104
+ def has_api_method?(name)
105
+ api_methods.has_key?(name)
106
+ end
107
+
108
+ # Whether the given public method name has a corresponding service method
109
+ # on this API
110
+ #
111
+ # class ProjectsApi < ActionWebService::API::Base
112
+ # api_method :getCount, :returns => [:int]
113
+ # end
114
+ #
115
+ # ProjectsApi.has_api_method?(:getCount) #=> false
116
+ # ProjectsApi.has_api_method?('GetCount') #=> true
117
+ def has_public_api_method?(public_name)
118
+ api_public_method_names.has_key?(public_name)
119
+ end
120
+
121
+ # The corresponding public method name for the given service method name
122
+ #
123
+ # ProjectsApi.public_api_method_name('GetCount') #=> "GetCount"
124
+ # ProjectsApi.public_api_method_name(:getCount) #=> "GetCount"
125
+ def public_api_method_name(name)
126
+ if inflect_names
127
+ name.to_s.camelize
128
+ else
129
+ name.to_s
130
+ end
131
+ end
132
+
133
+ # The corresponding service method name for the given public method name
134
+ #
135
+ # class ProjectsApi < ActionWebService::API::Base
136
+ # api_method :getCount, :returns => [:int]
137
+ # end
138
+ #
139
+ # ProjectsApi.api_method_name('GetCount') #=> :getCount
140
+ def api_method_name(public_name)
141
+ api_public_method_names[public_name]
142
+ end
143
+
144
+ # A Hash containing all service methods on this API, and their
145
+ # associated metadata.
146
+ #
147
+ # class ProjectsApi < ActionWebService::API::Base
148
+ # api_method :getCount, :returns => [:int]
149
+ # api_method :getCompletedCount, :returns => [:int]
150
+ # end
151
+ #
152
+ # ProjectsApi.api_methods #=>
153
+ # {:getCount=>#<ActionWebService::API::Method:0x24379d8 ...>,
154
+ # :getCompletedCount=>#<ActionWebService::API::Method:0x2437794 ...>}
155
+ # ProjectsApi.api_methods[:getCount].public_name #=> "GetCount"
156
+ def api_methods
157
+ read_inheritable_attribute("api_methods") || {}
158
+ end
159
+
160
+ # The Method instance for the given public API method name, if any
161
+ #
162
+ # class ProjectsApi < ActionWebService::API::Base
163
+ # api_method :getCount, :returns => [:int]
164
+ # api_method :getCompletedCount, :returns => [:int]
165
+ # end
166
+ #
167
+ # ProjectsApi.public_api_method_instance('GetCount') #=> <#<ActionWebService::API::Method:0x24379d8 ...>
168
+ # ProjectsApi.public_api_method_instance(:getCount) #=> nil
169
+ def public_api_method_instance(public_method_name)
170
+ api_method_instance(api_method_name(public_method_name))
171
+ end
172
+
173
+ # The Method instance for the given API method name, if any
174
+ #
175
+ # class ProjectsApi < ActionWebService::API::Base
176
+ # api_method :getCount, :returns => [:int]
177
+ # api_method :getCompletedCount, :returns => [:int]
178
+ # end
179
+ #
180
+ # ProjectsApi.api_method_instance(:getCount) #=> <ActionWebService::API::Method:0x24379d8 ...>
181
+ # ProjectsApi.api_method_instance('GetCount') #=> <ActionWebService::API::Method:0x24379d8 ...>
182
+ def api_method_instance(method_name)
183
+ api_methods[method_name]
184
+ end
185
+
186
+ # The Method instance for the default API method, if any
187
+ def default_api_method_instance
188
+ return nil unless name = default_api_method
189
+ instance = read_inheritable_attribute("default_api_method_instance")
190
+ if instance && instance.name == name
191
+ return instance
192
+ end
193
+ instance = Method.new(name, public_api_method_name(name), nil, nil)
194
+ write_inheritable_attribute("default_api_method_instance", instance)
195
+ instance
196
+ end
197
+
198
+ private
199
+ def api_public_method_names
200
+ read_inheritable_attribute("api_public_method_names") || {}
201
+ end
202
+
203
+ def validate_options(valid_option_keys, supplied_option_keys)
204
+ unknown_option_keys = supplied_option_keys - valid_option_keys
205
+ unless unknown_option_keys.empty?
206
+ raise(ActionWebServiceError, "Unknown options: #{unknown_option_keys}")
207
+ end
208
+ end
209
+ end
210
+ end
211
+
212
+ # Represents an API method and its associated metadata, and provides functionality
213
+ # to assist in commonly performed API method tasks.
214
+ class Method
215
+ attr :name
216
+ attr :public_name
217
+ attr :expects
218
+ attr :returns
219
+
220
+ def initialize(name, public_name, expects, returns)
221
+ @name = name
222
+ @public_name = public_name
223
+ @expects = expects
224
+ @returns = returns
225
+ @caster = ActionWebService::Casting::BaseCaster.new(self)
226
+ end
227
+
228
+ # The list of parameter names for this method
229
+ def param_names
230
+ return [] unless @expects
231
+ @expects.map{ |type| type.name }
232
+ end
233
+
234
+ # Casts a set of Ruby values into the expected Ruby values
235
+ def cast_expects(params)
236
+ @caster.cast_expects(params)
237
+ end
238
+
239
+ # Cast a Ruby return value into the expected Ruby value
240
+ def cast_returns(return_value)
241
+ @caster.cast_returns(return_value)
242
+ end
243
+
244
+ # Returns the index of the first expected parameter
245
+ # with the given name
246
+ def expects_index_of(param_name)
247
+ return -1 if @expects.nil?
248
+ (0..(@expects.length-1)).each do |i|
249
+ return i if @expects[i].name.to_s == param_name.to_s
250
+ end
251
+ -1
252
+ end
253
+
254
+ # Returns a hash keyed by parameter name for the given
255
+ # parameter list
256
+ def expects_to_hash(params)
257
+ return {} if @expects.nil?
258
+ h = {}
259
+ @expects.zip(params){ |type, param| h[type.name] = param }
260
+ h
261
+ end
262
+
263
+ # Backwards compatibility with previous API
264
+ def [](sig_type)
265
+ case sig_type
266
+ when :expects
267
+ @expects.map{|x| compat_signature_entry(x)}
268
+ when :returns
269
+ @returns.map{|x| compat_signature_entry(x)}
270
+ end
271
+ end
272
+
273
+ # String representation of this method
274
+ def to_s
275
+ fqn = ""
276
+ fqn << (@returns ? (@returns[0].human_name(false) + " ") : "void ")
277
+ fqn << "#{@public_name}("
278
+ fqn << @expects.map{ |p| p.human_name }.join(", ") if @expects
279
+ fqn << ")"
280
+ fqn
281
+ end
282
+
283
+ private
284
+ def compat_signature_entry(entry)
285
+ if entry.array?
286
+ [compat_signature_entry(entry.element_type)]
287
+ else
288
+ if entry.spec.is_a?(Hash)
289
+ {entry.spec.keys.first => entry.type_class}
290
+ else
291
+ entry.type_class
292
+ end
293
+ end
294
+ end
295
+ end
296
+ end
297
+ end