clivecrous-ramaze 0.3.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (548) hide show
  1. data/README.markdown +444 -0
  2. data/Rakefile +197 -0
  3. data/bin/ramaze +60 -0
  4. data/doc/AUTHORS +30 -0
  5. data/doc/CHANGELOG +5757 -0
  6. data/doc/COPYING +56 -0
  7. data/doc/FAQ +92 -0
  8. data/doc/GPL +339 -0
  9. data/doc/INSTALL +34 -0
  10. data/doc/LEGAL +26 -0
  11. data/doc/ProjectInfo +53 -0
  12. data/doc/TODO +29 -0
  13. data/doc/meta/announcement.txt +126 -0
  14. data/doc/meta/configuration.txt +162 -0
  15. data/doc/meta/internals.txt +278 -0
  16. data/doc/meta/users.kml +64 -0
  17. data/doc/migrate/1110_to_1111.txt +131 -0
  18. data/doc/readme_chunks/appendix.txt +10 -0
  19. data/doc/readme_chunks/examples.txt +38 -0
  20. data/doc/readme_chunks/features.txt +148 -0
  21. data/doc/readme_chunks/getting_help.txt +5 -0
  22. data/doc/readme_chunks/getting_started.txt +18 -0
  23. data/doc/readme_chunks/installing.txt +55 -0
  24. data/doc/readme_chunks/introduction.txt +18 -0
  25. data/doc/readme_chunks/principles.txt +56 -0
  26. data/doc/readme_chunks/thanks.txt +59 -0
  27. data/doc/tutorial/todolist.html +816 -0
  28. data/doc/tutorial/todolist.mkd +736 -0
  29. data/examples/auth/auth.rb +54 -0
  30. data/examples/auth/template/layout.haml +20 -0
  31. data/examples/auth/template/login.haml +16 -0
  32. data/examples/blog/README +3 -0
  33. data/examples/blog/controller/main.rb +29 -0
  34. data/examples/blog/model/entry.rb +30 -0
  35. data/examples/blog/public/styles/blog.css +132 -0
  36. data/examples/blog/spec/blog.rb +87 -0
  37. data/examples/blog/start.rb +7 -0
  38. data/examples/blog/view/edit.xhtml +17 -0
  39. data/examples/blog/view/index.xhtml +17 -0
  40. data/examples/blog/view/layout.xhtml +11 -0
  41. data/examples/blog/view/new.xhtml +16 -0
  42. data/examples/caching.rb +31 -0
  43. data/examples/chat/model/history.rb +36 -0
  44. data/examples/chat/model/message.rb +7 -0
  45. data/examples/chat/public/js/jquery.js +3436 -0
  46. data/examples/chat/start.rb +40 -0
  47. data/examples/chat/view/chat.xhtml +29 -0
  48. data/examples/chat/view/index.xhtml +6 -0
  49. data/examples/chat/view/layout.xhtml +12 -0
  50. data/examples/css.rb +37 -0
  51. data/examples/element.rb +45 -0
  52. data/examples/facebook.rb +159 -0
  53. data/examples/hello.rb +15 -0
  54. data/examples/httpdigest.rb +50 -0
  55. data/examples/identity.rb +18 -0
  56. data/examples/layout.rb +28 -0
  57. data/examples/linking.rb +29 -0
  58. data/examples/localization/start.rb +35 -0
  59. data/examples/memleak_detector.rb +32 -0
  60. data/examples/nitro_form.rb +23 -0
  61. data/examples/provide.rb +23 -0
  62. data/examples/ramaise.rb +132 -0
  63. data/examples/rammit/spec/rammit.rb +31 -0
  64. data/examples/rammit/src/controller/main.rb +3 -0
  65. data/examples/rammit/src/controller/page.rb +16 -0
  66. data/examples/rammit/src/model.rb +33 -0
  67. data/examples/rammit/start.rb +8 -0
  68. data/examples/rammit/template/index.xhtml +14 -0
  69. data/examples/rammit/template/page/view.xhtml +4 -0
  70. data/examples/rapaste/Rakefile +35 -0
  71. data/examples/rapaste/controller/paste.rb +94 -0
  72. data/examples/rapaste/model/paste.rb +55 -0
  73. data/examples/rapaste/public/css/active4d.css +114 -0
  74. data/examples/rapaste/public/css/all_hallows_eve.css +72 -0
  75. data/examples/rapaste/public/css/amy.css +147 -0
  76. data/examples/rapaste/public/css/blackboard.css +88 -0
  77. data/examples/rapaste/public/css/brilliance_black.css +605 -0
  78. data/examples/rapaste/public/css/brilliance_dull.css +599 -0
  79. data/examples/rapaste/public/css/cobalt.css +149 -0
  80. data/examples/rapaste/public/css/dawn.css +121 -0
  81. data/examples/rapaste/public/css/display.css +197 -0
  82. data/examples/rapaste/public/css/eiffel.css +121 -0
  83. data/examples/rapaste/public/css/espresso_libre.css +109 -0
  84. data/examples/rapaste/public/css/idle.css +62 -0
  85. data/examples/rapaste/public/css/iplastic.css +80 -0
  86. data/examples/rapaste/public/css/lazy.css +73 -0
  87. data/examples/rapaste/public/css/mac_classic.css +123 -0
  88. data/examples/rapaste/public/css/magicwb_amiga.css +104 -0
  89. data/examples/rapaste/public/css/pastels_on_dark.css +188 -0
  90. data/examples/rapaste/public/css/slush_poppies.css +85 -0
  91. data/examples/rapaste/public/css/spacecadet.css +51 -0
  92. data/examples/rapaste/public/css/sunburst.css +180 -0
  93. data/examples/rapaste/public/css/twilight.css +137 -0
  94. data/examples/rapaste/public/css/zenburnesque.css +91 -0
  95. data/examples/rapaste/public/js/jquery.js +11 -0
  96. data/examples/rapaste/spec/rapaste.rb +49 -0
  97. data/examples/rapaste/start.rb +24 -0
  98. data/examples/rapaste/view/copy.xhtml +10 -0
  99. data/examples/rapaste/view/index.xhtml +9 -0
  100. data/examples/rapaste/view/layout.xhtml +25 -0
  101. data/examples/rapaste/view/list.xhtml +29 -0
  102. data/examples/rapaste/view/search.xhtml +41 -0
  103. data/examples/rapaste/view/view.xhtml +37 -0
  104. data/examples/rapp.rb +45 -0
  105. data/examples/rest.rb +28 -0
  106. data/examples/sequel_form.rb +24 -0
  107. data/examples/sequel_scaffolding.rb +24 -0
  108. data/examples/simple.rb +56 -0
  109. data/examples/simple_auth.rb +23 -0
  110. data/examples/sourceview/public/coderay.css +104 -0
  111. data/examples/sourceview/public/images/file.gif +0 -0
  112. data/examples/sourceview/public/images/folder.gif +0 -0
  113. data/examples/sourceview/public/images/tv-collapsable-last.gif +0 -0
  114. data/examples/sourceview/public/images/tv-collapsable.gif +0 -0
  115. data/examples/sourceview/public/images/tv-expandable-last.gif +0 -0
  116. data/examples/sourceview/public/images/tv-expandable.gif +0 -0
  117. data/examples/sourceview/public/images/tv-item-last.gif +0 -0
  118. data/examples/sourceview/public/images/tv-item.gif +0 -0
  119. data/examples/sourceview/public/jquery.js +11 -0
  120. data/examples/sourceview/public/jquery.treeview.css +48 -0
  121. data/examples/sourceview/public/jquery.treeview.js +223 -0
  122. data/examples/sourceview/public/sourceview.js +52 -0
  123. data/examples/sourceview/sourceview.rb +77 -0
  124. data/examples/sourceview/template/index.haml +59 -0
  125. data/examples/templates/template/external.amrita +19 -0
  126. data/examples/templates/template/external.haml +22 -0
  127. data/examples/templates/template/external.liquid +28 -0
  128. data/examples/templates/template/external.mab +30 -0
  129. data/examples/templates/template/external.nag +28 -0
  130. data/examples/templates/template/external.redcloth +19 -0
  131. data/examples/templates/template/external.rem +30 -0
  132. data/examples/templates/template/external.rhtml +28 -0
  133. data/examples/templates/template/external.tenjin +28 -0
  134. data/examples/templates/template/external.xsl +57 -0
  135. data/examples/templates/template/external.zmr +28 -0
  136. data/examples/templates/template_amrita2.rb +74 -0
  137. data/examples/templates/template_erubis.rb +53 -0
  138. data/examples/templates/template_ezamar.rb +50 -0
  139. data/examples/templates/template_haml.rb +50 -0
  140. data/examples/templates/template_liquid.rb +65 -0
  141. data/examples/templates/template_markaby.rb +58 -0
  142. data/examples/templates/template_nagoro.rb +51 -0
  143. data/examples/templates/template_redcloth.rb +59 -0
  144. data/examples/templates/template_remarkably.rb +55 -0
  145. data/examples/templates/template_tenjin.rb +53 -0
  146. data/examples/templates/template_xslt.rb +49 -0
  147. data/examples/todolist/README +1 -0
  148. data/examples/todolist/public/favicon.ico +0 -0
  149. data/examples/todolist/public/js/jquery.js +1923 -0
  150. data/examples/todolist/public/ramaze.png +0 -0
  151. data/examples/todolist/spec/todolist.rb +132 -0
  152. data/examples/todolist/src/controller/main.rb +70 -0
  153. data/examples/todolist/src/element/page.rb +31 -0
  154. data/examples/todolist/src/model.rb +14 -0
  155. data/examples/todolist/start.rb +11 -0
  156. data/examples/todolist/template/index.xhtml +17 -0
  157. data/examples/todolist/template/new.xhtml +7 -0
  158. data/examples/upload/start.rb +19 -0
  159. data/examples/upload/view/index.xhtml +25 -0
  160. data/examples/whywiki/spec/whywiki.rb +58 -0
  161. data/examples/whywiki/start.rb +46 -0
  162. data/examples/whywiki/template/edit.xhtml +14 -0
  163. data/examples/whywiki/template/show.xhtml +18 -0
  164. data/examples/wikore/spec/wikore.rb +111 -0
  165. data/examples/wikore/src/controller.rb +80 -0
  166. data/examples/wikore/src/model.rb +52 -0
  167. data/examples/wikore/start.rb +9 -0
  168. data/examples/wikore/template/index.xhtml +8 -0
  169. data/examples/wiktacular/README +2 -0
  170. data/examples/wiktacular/mkd/link/2007-07-20_19-45-51.mkd +1 -0
  171. data/examples/wiktacular/mkd/link/current.mkd +1 -0
  172. data/examples/wiktacular/mkd/main/2007-07-20_16-31-33.mkd +1 -0
  173. data/examples/wiktacular/mkd/main/2007-07-20_19-21-12.mkd +1 -0
  174. data/examples/wiktacular/mkd/main/2007-07-20_19-23-10.mkd +2 -0
  175. data/examples/wiktacular/mkd/main/2007-07-20_19-45-07.mkd +2 -0
  176. data/examples/wiktacular/mkd/main/current.mkd +2 -0
  177. data/examples/wiktacular/mkd/markdown/current.mkd +3 -0
  178. data/examples/wiktacular/mkd/testing/2007-07-20_16-43-46.mkd +2 -0
  179. data/examples/wiktacular/mkd/testing/2007-07-20_19-43-50.mkd +3 -0
  180. data/examples/wiktacular/mkd/testing/2007-07-21_18-46-01.mkd +11 -0
  181. data/examples/wiktacular/mkd/testing/2007-07-21_18-46-32.mkd +13 -0
  182. data/examples/wiktacular/mkd/testing/2007-07-21_18-47-08.mkd +17 -0
  183. data/examples/wiktacular/mkd/testing/2007-07-21_18-47-54.mkd +17 -0
  184. data/examples/wiktacular/mkd/testing/current.mkd +17 -0
  185. data/examples/wiktacular/public/favicon.ico +0 -0
  186. data/examples/wiktacular/public/screen.css +72 -0
  187. data/examples/wiktacular/spec/wiktacular.rb +158 -0
  188. data/examples/wiktacular/src/controller.rb +55 -0
  189. data/examples/wiktacular/src/model.rb +102 -0
  190. data/examples/wiktacular/start.rb +8 -0
  191. data/examples/wiktacular/template/edit.xhtml +6 -0
  192. data/examples/wiktacular/template/html_layout.xhtml +27 -0
  193. data/examples/wiktacular/template/index.xhtml +9 -0
  194. data/examples/wiktacular/template/new.xhtml +6 -0
  195. data/lib/proto/controller/main.rb +22 -0
  196. data/lib/proto/public/css/ramaze_error.css +90 -0
  197. data/lib/proto/public/dispatch.fcgi +11 -0
  198. data/lib/proto/public/favicon.ico +0 -0
  199. data/lib/proto/public/js/jquery.js +3436 -0
  200. data/lib/proto/public/ramaze.png +0 -0
  201. data/lib/proto/spec/main.rb +24 -0
  202. data/lib/proto/start.rb +8 -0
  203. data/lib/proto/start.ru +16 -0
  204. data/lib/proto/view/error.xhtml +64 -0
  205. data/lib/proto/view/index.xhtml +34 -0
  206. data/lib/proto/view/page.xhtml +27 -0
  207. data/lib/ramaze.rb +108 -0
  208. data/lib/ramaze/action.rb +153 -0
  209. data/lib/ramaze/action/render.rb +191 -0
  210. data/lib/ramaze/adapter.rb +101 -0
  211. data/lib/ramaze/adapter/base.rb +103 -0
  212. data/lib/ramaze/adapter/cgi.rb +24 -0
  213. data/lib/ramaze/adapter/ebb.rb +22 -0
  214. data/lib/ramaze/adapter/evented_mongrel.rb +7 -0
  215. data/lib/ramaze/adapter/fcgi.rb +24 -0
  216. data/lib/ramaze/adapter/lsws.rb +23 -0
  217. data/lib/ramaze/adapter/mongrel.rb +25 -0
  218. data/lib/ramaze/adapter/scgi.rb +22 -0
  219. data/lib/ramaze/adapter/swiftiplied_mongrel.rb +7 -0
  220. data/lib/ramaze/adapter/thin.rb +22 -0
  221. data/lib/ramaze/adapter/webrick.rb +52 -0
  222. data/lib/ramaze/cache.rb +115 -0
  223. data/lib/ramaze/cache/memcached.rb +71 -0
  224. data/lib/ramaze/cache/memory.rb +6 -0
  225. data/lib/ramaze/cache/yaml_store.rb +68 -0
  226. data/lib/ramaze/contrib.rb +82 -0
  227. data/lib/ramaze/contrib/auto_params.rb +135 -0
  228. data/lib/ramaze/contrib/auto_params/get_args.rb +57 -0
  229. data/lib/ramaze/contrib/email.rb +84 -0
  230. data/lib/ramaze/contrib/facebook.rb +23 -0
  231. data/lib/ramaze/contrib/facebook/facebook.rb +171 -0
  232. data/lib/ramaze/contrib/file_cache.rb +65 -0
  233. data/lib/ramaze/contrib/gems.rb +65 -0
  234. data/lib/ramaze/contrib/gettext.rb +113 -0
  235. data/lib/ramaze/contrib/gettext/mo.rb +155 -0
  236. data/lib/ramaze/contrib/gettext/parser.rb +46 -0
  237. data/lib/ramaze/contrib/gettext/po.rb +109 -0
  238. data/lib/ramaze/contrib/gzip_filter.rb +56 -0
  239. data/lib/ramaze/contrib/profiling.rb +36 -0
  240. data/lib/ramaze/contrib/rest.rb +14 -0
  241. data/lib/ramaze/contrib/sequel/fill.rb +12 -0
  242. data/lib/ramaze/contrib/sequel_cache.rb +92 -0
  243. data/lib/ramaze/controller.rb +281 -0
  244. data/lib/ramaze/controller/error.rb +46 -0
  245. data/lib/ramaze/controller/main.rb +2 -0
  246. data/lib/ramaze/controller/resolve.rb +252 -0
  247. data/lib/ramaze/current.rb +70 -0
  248. data/lib/ramaze/current/request.rb +204 -0
  249. data/lib/ramaze/current/response.rb +27 -0
  250. data/lib/ramaze/current/session.rb +181 -0
  251. data/lib/ramaze/current/session/flash.rb +79 -0
  252. data/lib/ramaze/current/session/hash.rb +66 -0
  253. data/lib/ramaze/dispatcher.rb +137 -0
  254. data/lib/ramaze/dispatcher/action.rb +41 -0
  255. data/lib/ramaze/dispatcher/directory.rb +119 -0
  256. data/lib/ramaze/dispatcher/error.rb +108 -0
  257. data/lib/ramaze/dispatcher/file.rb +95 -0
  258. data/lib/ramaze/error.rb +24 -0
  259. data/lib/ramaze/gestalt.rb +129 -0
  260. data/lib/ramaze/helper.rb +78 -0
  261. data/lib/ramaze/helper/aspect.rb +110 -0
  262. data/lib/ramaze/helper/auth.rb +125 -0
  263. data/lib/ramaze/helper/cache.rb +140 -0
  264. data/lib/ramaze/helper/cgi.rb +47 -0
  265. data/lib/ramaze/helper/flash.rb +59 -0
  266. data/lib/ramaze/helper/form.rb +281 -0
  267. data/lib/ramaze/helper/formatting.rb +118 -0
  268. data/lib/ramaze/helper/httpdigest.rb +49 -0
  269. data/lib/ramaze/helper/identity.rb +105 -0
  270. data/lib/ramaze/helper/link.rb +124 -0
  271. data/lib/ramaze/helper/markaby.rb +31 -0
  272. data/lib/ramaze/helper/maruku.rb +7 -0
  273. data/lib/ramaze/helper/nitroform.rb +14 -0
  274. data/lib/ramaze/helper/pager.rb +366 -0
  275. data/lib/ramaze/helper/partial.rb +96 -0
  276. data/lib/ramaze/helper/redirect.rb +82 -0
  277. data/lib/ramaze/helper/rest.rb +43 -0
  278. data/lib/ramaze/helper/sendfile.rb +16 -0
  279. data/lib/ramaze/helper/sequel.rb +55 -0
  280. data/lib/ramaze/helper/stack.rb +72 -0
  281. data/lib/ramaze/helper/tagz.rb +19 -0
  282. data/lib/ramaze/helper/user.rb +78 -0
  283. data/lib/ramaze/log.rb +27 -0
  284. data/lib/ramaze/log/analogger.rb +37 -0
  285. data/lib/ramaze/log/growl.rb +35 -0
  286. data/lib/ramaze/log/hub.rb +38 -0
  287. data/lib/ramaze/log/informer.rb +125 -0
  288. data/lib/ramaze/log/knotify.rb +25 -0
  289. data/lib/ramaze/log/logger.rb +23 -0
  290. data/lib/ramaze/log/logging.rb +88 -0
  291. data/lib/ramaze/log/syslog.rb +36 -0
  292. data/lib/ramaze/log/xosd.rb +88 -0
  293. data/lib/ramaze/option.rb +153 -0
  294. data/lib/ramaze/option/dsl.rb +45 -0
  295. data/lib/ramaze/option/holder.rb +143 -0
  296. data/lib/ramaze/option/merger.rb +106 -0
  297. data/lib/ramaze/route.rb +97 -0
  298. data/lib/ramaze/setup.rb +50 -0
  299. data/lib/ramaze/snippets.rb +9 -0
  300. data/lib/ramaze/snippets/array/put_within.rb +37 -0
  301. data/lib/ramaze/snippets/binding/locals.rb +13 -0
  302. data/lib/ramaze/snippets/blankslate.rb +7 -0
  303. data/lib/ramaze/snippets/dictionary.rb +504 -0
  304. data/lib/ramaze/snippets/divide.rb +20 -0
  305. data/lib/ramaze/snippets/kernel/__dir__.rb +23 -0
  306. data/lib/ramaze/snippets/kernel/acquire.rb +34 -0
  307. data/lib/ramaze/snippets/kernel/constant.rb +26 -0
  308. data/lib/ramaze/snippets/kernel/pretty_inspect.rb +15 -0
  309. data/lib/ramaze/snippets/metaid.rb +17 -0
  310. data/lib/ramaze/snippets/numeric/filesize_format.rb +25 -0
  311. data/lib/ramaze/snippets/object/instance_variable_defined.rb +8 -0
  312. data/lib/ramaze/snippets/object/pretty.rb +6 -0
  313. data/lib/ramaze/snippets/object/scope.rb +11 -0
  314. data/lib/ramaze/snippets/object/thread_accessor.rb +5 -0
  315. data/lib/ramaze/snippets/object/traits.rb +76 -0
  316. data/lib/ramaze/snippets/ordered_set.rb +40 -0
  317. data/lib/ramaze/snippets/proc/locals.rb +11 -0
  318. data/lib/ramaze/snippets/ramaze/caller_info.rb +30 -0
  319. data/lib/ramaze/snippets/ramaze/caller_lines.rb +51 -0
  320. data/lib/ramaze/snippets/ramaze/deprecated.rb +7 -0
  321. data/lib/ramaze/snippets/ramaze/thread_accessor.rb +58 -0
  322. data/lib/ramaze/snippets/string/camel_case.rb +16 -0
  323. data/lib/ramaze/snippets/string/color.rb +27 -0
  324. data/lib/ramaze/snippets/string/each.rb +8 -0
  325. data/lib/ramaze/snippets/string/esc.rb +29 -0
  326. data/lib/ramaze/snippets/string/ord.rb +15 -0
  327. data/lib/ramaze/snippets/string/snake_case.rb +15 -0
  328. data/lib/ramaze/snippets/string/start_with.rb +8 -0
  329. data/lib/ramaze/snippets/string/unindent.rb +20 -0
  330. data/lib/ramaze/snippets/struct/fill.rb +23 -0
  331. data/lib/ramaze/snippets/struct/values_at.rb +24 -0
  332. data/lib/ramaze/snippets/symbol/to_proc.rb +24 -0
  333. data/lib/ramaze/snippets/thread/into.rb +18 -0
  334. data/lib/ramaze/sourcereload.rb +169 -0
  335. data/lib/ramaze/spec.rb +1 -0
  336. data/lib/ramaze/spec/helper.rb +131 -0
  337. data/lib/ramaze/spec/helper/bacon.rb +7 -0
  338. data/lib/ramaze/spec/helper/browser.rb +88 -0
  339. data/lib/ramaze/spec/helper/mock_http.rb +69 -0
  340. data/lib/ramaze/spec/helper/pretty_output.rb +82 -0
  341. data/lib/ramaze/spec/helper/requester.rb +63 -0
  342. data/lib/ramaze/spec/helper/simple_http.rb +434 -0
  343. data/lib/ramaze/spec/helper/snippets.rb +6 -0
  344. data/lib/ramaze/store/default.rb +109 -0
  345. data/lib/ramaze/template.rb +84 -0
  346. data/lib/ramaze/template/amrita2.rb +45 -0
  347. data/lib/ramaze/template/builder.rb +28 -0
  348. data/lib/ramaze/template/erubis.rb +41 -0
  349. data/lib/ramaze/template/ezamar.rb +42 -0
  350. data/lib/ramaze/template/ezamar/element.rb +169 -0
  351. data/lib/ramaze/template/ezamar/engine.rb +76 -0
  352. data/lib/ramaze/template/ezamar/morpher.rb +135 -0
  353. data/lib/ramaze/template/ezamar/render_partial.rb +31 -0
  354. data/lib/ramaze/template/haml.rb +37 -0
  355. data/lib/ramaze/template/liquid.rb +36 -0
  356. data/lib/ramaze/template/markaby.rb +52 -0
  357. data/lib/ramaze/template/nagoro.rb +52 -0
  358. data/lib/ramaze/template/none.rb +14 -0
  359. data/lib/ramaze/template/redcloth.rb +25 -0
  360. data/lib/ramaze/template/remarkably.rb +38 -0
  361. data/lib/ramaze/template/sass.rb +37 -0
  362. data/lib/ramaze/template/tagz.rb +79 -0
  363. data/lib/ramaze/template/tenjin.rb +74 -0
  364. data/lib/ramaze/template/xslt.rb +100 -0
  365. data/lib/ramaze/tool.rb +9 -0
  366. data/lib/ramaze/tool/create.rb +74 -0
  367. data/lib/ramaze/tool/localize.rb +198 -0
  368. data/lib/ramaze/tool/mime.rb +25 -0
  369. data/lib/ramaze/tool/mime_types.yaml +615 -0
  370. data/lib/ramaze/tool/record.rb +6 -0
  371. data/lib/ramaze/trinity.rb +13 -0
  372. data/lib/ramaze/version.rb +14 -0
  373. data/lib/vendor/bacon.rb +323 -0
  374. data/rake_tasks/conf.rake +83 -0
  375. data/rake_tasks/coverage.rake +46 -0
  376. data/rake_tasks/darcs.rake +14 -0
  377. data/rake_tasks/gem.rake +85 -0
  378. data/rake_tasks/git.rake +4 -0
  379. data/rake_tasks/maintenance.rake +436 -0
  380. data/rake_tasks/spec.rake +62 -0
  381. data/spec/contrib/auto_params.rb +121 -0
  382. data/spec/contrib/profiling.rb +29 -0
  383. data/spec/contrib/sequel/fill.rb +47 -0
  384. data/spec/examples/caching.rb +19 -0
  385. data/spec/examples/css.rb +15 -0
  386. data/spec/examples/element.rb +15 -0
  387. data/spec/examples/hello.rb +11 -0
  388. data/spec/examples/linking.rb +18 -0
  389. data/spec/examples/simple.rb +45 -0
  390. data/spec/examples/simple_auth.rb +32 -0
  391. data/spec/examples/templates/template_amrita2.rb +16 -0
  392. data/spec/examples/templates/template_erubis.rb +23 -0
  393. data/spec/examples/templates/template_ezamar.rb +23 -0
  394. data/spec/examples/templates/template_haml.rb +25 -0
  395. data/spec/examples/templates/template_liquid.rb +29 -0
  396. data/spec/examples/templates/template_markaby.rb +23 -0
  397. data/spec/examples/templates/template_redcloth.rb +28 -0
  398. data/spec/examples/templates/template_remarkably.rb +23 -0
  399. data/spec/examples/templates/template_tenjin.rb +28 -0
  400. data/spec/helper.rb +3 -0
  401. data/spec/ramaze/action/basics.rb +36 -0
  402. data/spec/ramaze/action/cache.rb +87 -0
  403. data/spec/ramaze/action/file_cache.rb +48 -0
  404. data/spec/ramaze/action/layout.rb +190 -0
  405. data/spec/ramaze/action/render.rb +32 -0
  406. data/spec/ramaze/action/view/bar.xhtml +1 -0
  407. data/spec/ramaze/action/view/instancevars/layout.xhtml +1 -0
  408. data/spec/ramaze/action/view/other_wrapper.xhtml +1 -0
  409. data/spec/ramaze/action/view/single_wrapper.xhtml +1 -0
  410. data/spec/ramaze/action/view/sub/sub_wrapper.xhtml +1 -0
  411. data/spec/ramaze/adapter.rb +39 -0
  412. data/spec/ramaze/adapter/ebb.rb +12 -0
  413. data/spec/ramaze/adapter/mongrel.rb +12 -0
  414. data/spec/ramaze/adapter/record.rb +31 -0
  415. data/spec/ramaze/adapter/webrick.rb +12 -0
  416. data/spec/ramaze/cache.rb +140 -0
  417. data/spec/ramaze/controller.rb +177 -0
  418. data/spec/ramaze/controller/actionless_templates.rb +32 -0
  419. data/spec/ramaze/controller/resolve.rb +32 -0
  420. data/spec/ramaze/controller/subclass.rb +21 -0
  421. data/spec/ramaze/controller/template_resolving.rb +113 -0
  422. data/spec/ramaze/controller/view/greet.xhtml +1 -0
  423. data/spec/ramaze/controller/view/list.xhtml +1 -0
  424. data/spec/ramaze/controller/view/other/greet/other.xhtml +1 -0
  425. data/spec/ramaze/controller/view/other_wrapper.xhtml +1 -0
  426. data/spec/ramaze/current/request.rb +30 -0
  427. data/spec/ramaze/current/session.rb +97 -0
  428. data/spec/ramaze/dispatcher.rb +31 -0
  429. data/spec/ramaze/dispatcher/directory.rb +55 -0
  430. data/spec/ramaze/dispatcher/file.rb +60 -0
  431. data/spec/ramaze/dispatcher/public/favicon.ico +0 -0
  432. data/spec/ramaze/dispatcher/public/file name.txt +1 -0
  433. data/spec/ramaze/dispatcher/public/test_download.css +141 -0
  434. data/spec/ramaze/element.rb +107 -0
  435. data/spec/ramaze/error.rb +94 -0
  436. data/spec/ramaze/gestalt.rb +131 -0
  437. data/spec/ramaze/helper/aspect.rb +92 -0
  438. data/spec/ramaze/helper/auth.rb +66 -0
  439. data/spec/ramaze/helper/cache.rb +160 -0
  440. data/spec/ramaze/helper/cgi.rb +43 -0
  441. data/spec/ramaze/helper/file.rb +18 -0
  442. data/spec/ramaze/helper/flash.rb +133 -0
  443. data/spec/ramaze/helper/form.rb +118 -0
  444. data/spec/ramaze/helper/formatting.rb +41 -0
  445. data/spec/ramaze/helper/link.rb +124 -0
  446. data/spec/ramaze/helper/pager.rb +99 -0
  447. data/spec/ramaze/helper/partial.rb +76 -0
  448. data/spec/ramaze/helper/redirect.rb +112 -0
  449. data/spec/ramaze/helper/stack.rb +73 -0
  450. data/spec/ramaze/helper/user.rb +43 -0
  451. data/spec/ramaze/helper/view/locals.xhtml +1 -0
  452. data/spec/ramaze/helper/view/loop.xhtml +4 -0
  453. data/spec/ramaze/helper/view/num.xhtml +1 -0
  454. data/spec/ramaze/helper/view/partial.xhtml +1 -0
  455. data/spec/ramaze/helper/view/recursive.xhtml +8 -0
  456. data/spec/ramaze/helper/view/recursive_local_ivars.xhtml +7 -0
  457. data/spec/ramaze/helper/view/recursive_locals.xhtml +7 -0
  458. data/spec/ramaze/helper/view/test_template.xhtml +1 -0
  459. data/spec/ramaze/localize.rb +89 -0
  460. data/spec/ramaze/log/informer.rb +72 -0
  461. data/spec/ramaze/log/syslog.rb +10 -0
  462. data/spec/ramaze/morpher.rb +111 -0
  463. data/spec/ramaze/params.rb +157 -0
  464. data/spec/ramaze/public/error404.xhtml +1 -0
  465. data/spec/ramaze/public/favicon.ico +0 -0
  466. data/spec/ramaze/public/ramaze.png +0 -0
  467. data/spec/ramaze/public/test_download.css +141 -0
  468. data/spec/ramaze/request.rb +185 -0
  469. data/spec/ramaze/request/ebb.rb +9 -0
  470. data/spec/ramaze/request/mongrel.rb +9 -0
  471. data/spec/ramaze/request/thin.rb +9 -0
  472. data/spec/ramaze/request/webrick.rb +5 -0
  473. data/spec/ramaze/rewrite.rb +36 -0
  474. data/spec/ramaze/rewrite/file.css +1 -0
  475. data/spec/ramaze/route.rb +131 -0
  476. data/spec/ramaze/session.rb +94 -0
  477. data/spec/ramaze/store/default.rb +71 -0
  478. data/spec/ramaze/template.rb +128 -0
  479. data/spec/ramaze/template/amrita2.rb +50 -0
  480. data/spec/ramaze/template/amrita2/external.amrita +6 -0
  481. data/spec/ramaze/template/amrita2/sum.amrita +1 -0
  482. data/spec/ramaze/template/builder.rb +55 -0
  483. data/spec/ramaze/template/builder/external.rxml +3 -0
  484. data/spec/ramaze/template/erubis.rb +41 -0
  485. data/spec/ramaze/template/erubis/sum.rhtml +1 -0
  486. data/spec/ramaze/template/ezamar.rb +63 -0
  487. data/spec/ramaze/template/ezamar/another/long/action.zmr +1 -0
  488. data/spec/ramaze/template/ezamar/combined.zmr +1 -0
  489. data/spec/ramaze/template/ezamar/file_only.zmr +1 -0
  490. data/spec/ramaze/template/ezamar/index.zmr +1 -0
  491. data/spec/ramaze/template/ezamar/nested.zmr +1 -0
  492. data/spec/ramaze/template/ezamar/other__index.xhtml +1 -0
  493. data/spec/ramaze/template/ezamar/some__long__action.zmr +1 -0
  494. data/spec/ramaze/template/ezamar/sum.zmr +1 -0
  495. data/spec/ramaze/template/haml.rb +66 -0
  496. data/spec/ramaze/template/haml/index.haml +5 -0
  497. data/spec/ramaze/template/haml/locals.haml +2 -0
  498. data/spec/ramaze/template/haml/with_vars.haml +4 -0
  499. data/spec/ramaze/template/liquid.rb +99 -0
  500. data/spec/ramaze/template/liquid/index.liquid +1 -0
  501. data/spec/ramaze/template/liquid/products.liquid +45 -0
  502. data/spec/ramaze/template/markaby.rb +61 -0
  503. data/spec/ramaze/template/markaby/external.mab +8 -0
  504. data/spec/ramaze/template/markaby/sum.mab +1 -0
  505. data/spec/ramaze/template/nagoro.rb +64 -0
  506. data/spec/ramaze/template/nagoro/another/long/action.nag +1 -0
  507. data/spec/ramaze/template/nagoro/combined.nag +1 -0
  508. data/spec/ramaze/template/nagoro/file_only.nag +1 -0
  509. data/spec/ramaze/template/nagoro/index.nag +1 -0
  510. data/spec/ramaze/template/nagoro/nested.nag +1 -0
  511. data/spec/ramaze/template/nagoro/some__long__action.nag +1 -0
  512. data/spec/ramaze/template/nagoro/sum.nag +1 -0
  513. data/spec/ramaze/template/ramaze/external.test +1 -0
  514. data/spec/ramaze/template/redcloth.rb +38 -0
  515. data/spec/ramaze/template/redcloth/external.redcloth +1 -0
  516. data/spec/ramaze/template/remarkably.rb +58 -0
  517. data/spec/ramaze/template/remarkably/external.rem +8 -0
  518. data/spec/ramaze/template/remarkably/sum.rem +1 -0
  519. data/spec/ramaze/template/sass.rb +69 -0
  520. data/spec/ramaze/template/sass/file.css.sass +5 -0
  521. data/spec/ramaze/template/tagz.rb +62 -0
  522. data/spec/ramaze/template/tagz/external.tagz +8 -0
  523. data/spec/ramaze/template/tagz/sum.tagz +1 -0
  524. data/spec/ramaze/template/tenjin.rb +47 -0
  525. data/spec/ramaze/template/tenjin/external.tenjin +1 -0
  526. data/spec/ramaze/template/xslt.rb +90 -0
  527. data/spec/ramaze/template/xslt/concat_words.xsl +16 -0
  528. data/spec/ramaze/template/xslt/index.xsl +14 -0
  529. data/spec/ramaze/template/xslt/products.xsl +32 -0
  530. data/spec/ramaze/template/xslt/ruby_version.xsl +14 -0
  531. data/spec/snippets/array/put_within.rb +33 -0
  532. data/spec/snippets/divide.rb +19 -0
  533. data/spec/snippets/kernel/__dir__.rb +8 -0
  534. data/spec/snippets/kernel/acquire.rb +71 -0
  535. data/spec/snippets/kernel/constant.rb +23 -0
  536. data/spec/snippets/numeric/filesize_format.rb +12 -0
  537. data/spec/snippets/ordered_set.rb +63 -0
  538. data/spec/snippets/ramaze/caller_info.rb +39 -0
  539. data/spec/snippets/ramaze/caller_lines.rb +30 -0
  540. data/spec/snippets/string/camel_case.rb +25 -0
  541. data/spec/snippets/string/color.rb +11 -0
  542. data/spec/snippets/string/snake_case.rb +24 -0
  543. data/spec/snippets/string/unindent.rb +43 -0
  544. data/spec/snippets/struct/fill.rb +26 -0
  545. data/spec/snippets/struct/values_at.rb +44 -0
  546. data/spec/snippets/symbol/to_proc.rb +13 -0
  547. data/spec/snippets/thread/into.rb +20 -0
  548. metadata +789 -0
data/README.markdown ADDED
@@ -0,0 +1,444 @@
1
+ Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
2
+ All files in this distribution are subject to the terms of the Ruby license.
3
+
4
+ # About Ramaze
5
+
6
+ Ramaze is a very simple and straight-forward web-framework.
7
+ The philosophy of it could be expressed in a mix of KISS and POLS, trying to
8
+ make simple things simple and complex things possible.
9
+
10
+ This of course is nothing new to anyone who knows some ruby, but is often
11
+ forgotten in a chase for new functionality and features. Ramaze only tries to
12
+ give you the ultimate tools, but you have to use them yourself to achieve
13
+ perfect custom-tailored results.
14
+
15
+ Another one of the goals during development of Ramaze was to make every part as
16
+ modular and therefor reuasable as possible, not only to provide a basic
17
+ understanding after the first glance, but also to make it as simple as possible
18
+ to reuse parts of the code.
19
+
20
+ The original purpose of Ramaze was to act as a kind of framework to build
21
+ web-frameworks, this was made obsolete by the introduction of rack, which
22
+ provides this feature at a better level without trying to enforce any structural
23
+ layout of the resulting framework.
24
+
25
+
26
+ # Features Overview
27
+
28
+ Ramaze offers following features at the moment:
29
+
30
+ * Adapters
31
+
32
+ Ramaze takes advantage of the rack library to provide a common way of
33
+ handling different ways to serve its content.
34
+
35
+ Rack supports at the moment:
36
+
37
+ * [Mongrel](http://mongrel.rubyforge.org/)
38
+
39
+ Mongrel is a fast HTTP library and server for Ruby that is intended for
40
+ hosting Ruby web applications of any kind using plain HTTP rather than
41
+ FastCGI or SCGI.
42
+
43
+ * [WEBrick](http://www.webrick.org/)
44
+
45
+ WEBrick is a Ruby library program to build HTTP servers.
46
+
47
+ * CGI
48
+
49
+ CGI is the Common Gateway Interface and is one of the most basic ways
50
+ to integrate into Webservers like Apache or Lighttpd.
51
+
52
+ * FCGI
53
+
54
+ Improvment of CGI as it doesn't start up a new connection to Ramaze on
55
+ every request.
56
+
57
+
58
+ * Templates
59
+ * [Amrita2](http://amrita2.rubyforge.org/)
60
+
61
+ Amrita2 is a xml/xhtml template library for Ruby. It makes html documents
62
+ from a template and a model data.
63
+
64
+ * [Erubis](http://rubyforge.org/projects/erubis)
65
+
66
+ Erubis is a fast, secure, and very extensible implementation of eRuby.
67
+
68
+ * [Haml](http://haml.hamptoncatlin.com/)
69
+
70
+ Haml takes your gross, ugly templates and replaces them with veritable Haiku.
71
+
72
+ * [Liquid](http://home.leetsoft.com/liquid)
73
+
74
+ Liquid's syntax and parse model are inspired by Django templates, as well
75
+ as PHP's smarty.
76
+
77
+ * [Remarkably](http://rubyforge.org/projects/remarkably)
78
+
79
+ Remarkably is a very tiny Markaby-like XML builder
80
+
81
+ * [Markaby](http://code.whytheluckystiff.net/markaby/)
82
+
83
+ Markaby means Markup as Ruby.
84
+
85
+ * [Sass](http://haml.hamptoncatlin.com/docs/sass)
86
+
87
+ Sass is a meta-language on top of CSS that‘s used to describe the style of
88
+ a document cleanly and structurally, with more power than flat CSS allows.
89
+
90
+ * Ezamar
91
+
92
+ A simple homage to [Nitro](http://nitroproject.org)s templating, is shipped
93
+ together with Ramaze.
94
+
95
+ * Cache
96
+ * Hash
97
+ * YAML::Store
98
+ * MemCache
99
+
100
+ * Helper
101
+ * Active by default
102
+ * CGI
103
+
104
+ Shortcuts for escape/unescape of the CGI module.
105
+
106
+ * File
107
+
108
+ Helps you serving files from your Controller.
109
+
110
+ * Flash
111
+
112
+ Store a couple of values for one request associated with a session.
113
+
114
+ * Link
115
+
116
+ Easier linking to the various parts of your applications Controllers and
117
+ Actions.
118
+
119
+ * Redirect
120
+
121
+ Easy redirection.
122
+
123
+ * Optional
124
+ * Aspect
125
+
126
+ Allows you to wrap different Actions on your Controller with code.
127
+
128
+ * Auth
129
+
130
+ Simple way to add basic authentication.
131
+
132
+ * Cache
133
+
134
+ Easy caching Actions and values.
135
+
136
+ * Identity
137
+
138
+ For ease of use of the OpenID authentication mechanism.
139
+
140
+ * Inform
141
+
142
+ Wrapping the functionality of Ramazes logging facilities.
143
+
144
+ * Markaby
145
+
146
+ Allows you to use Markaby in your Controller without having it as the
147
+ default templating engine.
148
+
149
+ * Nitroform
150
+
151
+ Hooks up on nitros form builder to help you creating forms from Og
152
+ objects.
153
+
154
+ * OpenID
155
+
156
+ Authentication via OpenID made easy.
157
+
158
+ * Pager
159
+
160
+ Displays a collection of entitities in multiple pages.
161
+
162
+ * Partial
163
+
164
+ Renders so-called partials.
165
+
166
+ * Stack
167
+
168
+ Allows you to use a call/answer mechanism for things like redirection to the
169
+ site a user entered login-forms from.
170
+
171
+ * Various
172
+ * Sessions
173
+ * Global configuration system
174
+ * Simple request/response handling
175
+ * Custom sophisticated Error-handling
176
+
177
+
178
+ # Basic Principles
179
+
180
+ There are some basic principles that Ramaze tries to follow:
181
+
182
+ * KISS (Keep It Super Simple)
183
+
184
+ Ramaze doesn't introduce any major change of paradigm for everyone familiar
185
+ with Ruby and the basics of Web-development.
186
+
187
+ * POLS (Principle Of Least Surprise)
188
+
189
+ Ramaze tries to be intuitive and easy to learn. Most functionality is built in
190
+ a way to help, not to obfuscate or confuse.
191
+
192
+ * Modular design
193
+
194
+ Use what you want and how you want it.
195
+
196
+ Through Ruby Ramaze provides one of the most powerful programming-languages
197
+ available, giving you full control over your system.
198
+
199
+ Even the most essential parts of Ramaze can easily be replaced and/or modified
200
+ without losing the advantage of the whole framework.
201
+
202
+ * Minimal dependencies
203
+
204
+ Nothing besides Ruby is required for the basic features.
205
+
206
+ Of course you can take advantage of several wonderful libraries, but Ramaze is
207
+ built in a way to be run on any basic setup.
208
+
209
+ * Documentation
210
+
211
+ Document everything, classes, modules, methods, configuration...
212
+
213
+ Through 100% documentation Ramaze gives the developer easy and solid
214
+ understanding of the underlying concepts and functionality.
215
+
216
+ * Open development
217
+
218
+ Everyone is welcome to contribute to Ramaze in the easiest way possible. The
219
+ repository is open for patches passing the Test-suite.
220
+
221
+ * Examples
222
+
223
+ Everyone learns different, some only read the source, others browse
224
+ documentation, but everyone loves examples for a quick and painless start.
225
+
226
+ Ramaze addresses this need and offers a wide variety of examples of usage,
227
+ basic functionality, project-layout and more advanced applications.
228
+
229
+ * Fully BDD (Behaviour Driven Design)
230
+
231
+ Ramaze has a very complete set of so-called specifications built by RSpec.
232
+ These specs define the way Ramaze has to behave.
233
+
234
+ The specs are checked every time a new patch is pushed into the repository,
235
+ deciding whether the changes the patch applies are valid and don't break the framework.
236
+
237
+
238
+ # Installation
239
+
240
+ * via RubyGems
241
+
242
+ The simplest way of installing Ramaze is via
243
+
244
+ $ gem install ramaze
245
+
246
+ in case you have RubyGems installed.
247
+
248
+
249
+ * via git
250
+
251
+ To get the latest and sweetest, you can just pull from the repository and run
252
+ Ramaze that way.
253
+
254
+ $ git clone git://gitweb.com/manveru/ramaze
255
+
256
+ Please read the man page or `git help` for more information about updating
257
+ and creating your own patches.
258
+ This is at the moment the premier way to use Ramaze, since it is the way I use
259
+ it.
260
+
261
+ Some hints for the usage of Git.
262
+
263
+ * use require 'ramaze' from everywhere
264
+
265
+ add a file to your site\_ruby named 'ramaze.rb'
266
+ the content should be: "require '/path/to/git/repo/ramaze/lib/ramaze'"
267
+
268
+ * get the latest version (from inside the ramaze directory)
269
+
270
+ $ git pull
271
+
272
+ * Reset the repo to original state (if you screw up something)
273
+
274
+ $ git reset --hard # resets the whole repo
275
+ $ git checkout master lib/ramaze.rb # revert changes to lib/ramaze.rb only
276
+
277
+ * record a patch for all your changes
278
+
279
+ $ git commit -a # commit all changes
280
+
281
+ * record a patch for specific changes
282
+
283
+ $ git add -p # pick the hunks you want to commit
284
+ $ git commit
285
+
286
+ * output your patches into a bundle ready to be mailed (compress it before
287
+ sending to make sure it arrives in the way you sent it)
288
+
289
+ $ git pull # make sure you are on latest revision to avoid conflicts
290
+ $ git format-patch origin/HEAD # spit out 00xx-blah.patch files
291
+
292
+ # From here on you can use either git-send-email or go the manual route
293
+ $ tar -cjf ramaze_bundle.tar.bz2 *.patch
294
+ # add this bz2 as attachment and send to ramaze@googlegroups.com
295
+
296
+
297
+ # Getting Started
298
+
299
+ Now that you have a vague idea of what you're about to get into you might just
300
+ want to get a way to get up and running ASAP.
301
+ Please read below for more information about installation.
302
+
303
+ Depending on what you are planning to do you can either just go and start
304
+ reading the source or directly get some hands-on experience by trying some of
305
+ the examples.
306
+ Most things will require dependencies though. The basic functionality is
307
+ provided by the WEBrick adapter and the Template::Ramaze, which just run out
308
+ of the box. For more features you will have to install some templating-engines
309
+ and mongrel (_very_ recommended). Ramaze will inform you when it needs further
310
+ dependencies, so just go and try some things.
311
+
312
+ Some places to get started are:
313
+ - Read the documentation.
314
+ - Run and read the test cases.
315
+ - Look at the examples and run/modify them.
316
+
317
+
318
+
319
+ # A couple of Examples
320
+
321
+ There are some examples for your instant pleasure inside the examples-directory
322
+ in the Ramaze-distribution.
323
+ To start up an example, you can use the Ramaze binary located in bin/ramaze
324
+ for example:
325
+
326
+ $ ramaze examples/hello.rb
327
+
328
+ Or:
329
+
330
+ $ cd examples/blog
331
+ $ ramaze
332
+
333
+ Since ramaze uses the start.rb by default if you don't pass anything else.
334
+
335
+ For more information about the usage of ramaze try:
336
+
337
+ $ ramaze --help
338
+
339
+
340
+ Examples include:
341
+
342
+ * examples/hello.rb
343
+ Hello, World!
344
+
345
+ * examples/simple.rb
346
+ A bit more advanced than the hello-example, but still very basic.
347
+
348
+ * examples/blog
349
+ Not yet fully functional, but coming along.
350
+
351
+ * examples/whywiki
352
+ A basic examples of a minimalistic application, based on the Wiki of \_why in
353
+ his camping-framework.
354
+
355
+ * examples/templates
356
+ examples of real usage of the templating-engines. Tries to implement the same
357
+ functionality in each `template_*.rb` file using a different engine.
358
+
359
+
360
+
361
+ # How to find Help
362
+
363
+ For help you can:
364
+
365
+ - Visit us in the channel #ramaze on irc.freenode.net
366
+
367
+ - Join the Mailinglist at http://ramaze.rubyforge.org
368
+
369
+
370
+ # Appendix
371
+
372
+ * Performance
373
+ * Serving
374
+
375
+ For best performance you should consider using Mongrel to host your
376
+ application.
377
+
378
+ * Caching
379
+
380
+ You can easily cache your pages using the CacheHelper.
381
+ Also, using MemCache gives you high-end performance and security.
382
+
383
+
384
+ # And thanks to...
385
+
386
+ There is a large number of people who made Ramaze possibe by their ongoing
387
+ efforts in the world of open source and by encouraging and helping me.
388
+
389
+ This list is by no means a full listing of all these people, but I try to
390
+ get a good coverage despite that.
391
+
392
+ I would like to thank:
393
+
394
+ * Yukihiro Matsumoto a.k.a matz
395
+
396
+ For giving the world Ruby and bringing fun back into programming.
397
+
398
+ * Zed Shawn a.k.a. zedas
399
+
400
+ For developing Mongrel, Ramaze started out as a simple Hello World based
401
+ on that awesome server.
402
+
403
+ * Christian Neukirchen a.k.a chris2
404
+
405
+ For building rack, which is just what the numerous web-developers had
406
+ anticipated and which will, with no doubt, change the world.
407
+
408
+ * Pistos
409
+
410
+ For continious encouragment and building the first real webpage on Ramaze.
411
+ His bugreports were invaluable.
412
+
413
+ * Jim Weirich
414
+
415
+ For Rake, which lifts off a lot of tasks from the shoulders of every
416
+ developer who uses it.
417
+
418
+ * Thomas Sawyer a.k.a Trans
419
+
420
+ Dragging me deep into the rabbit-hole and showing me how awesome Ruby
421
+ truely is through his work on facets, ratchets and tons of other projects.
422
+
423
+ * George Moschovitis a.k.a gmosx
424
+
425
+ For his tremendous efforts in the Nitro/Og framework, which is a source of
426
+ steady inspiration for Ramaze and brought me to Ruby in the first place.
427
+
428
+ * Rob Levin a.k.a. lilo
429
+
430
+ He founded the most excellent Freenode IRC-network, where the most important
431
+ channels for rubyists are located (as is #ramaze).
432
+ May he rest in peace.
433
+
434
+ * The guys (and gals) in the various channels on Freenode
435
+
436
+ As the people are way too many to be listed, here the channels that i call
437
+ my online home.
438
+ All the people in there deserve special thanks for getting me hooked to Ruby
439
+ and providing their help in a friendly and patient manner.
440
+
441
+ * #nitro
442
+ * #ruby-de
443
+ * #ruby-lang
444
+ * #rubyforce
data/Rakefile ADDED
@@ -0,0 +1,197 @@
1
+ begin
2
+ require 'rubygems'
3
+ rescue LoadError
4
+ end
5
+
6
+ require 'rake'
7
+ require 'rake/clean'
8
+ require 'rake/packagetask'
9
+ require 'rake/gempackagetask'
10
+ require 'rake/rdoctask'
11
+ require 'fileutils'
12
+ require 'time'
13
+ require 'pp'
14
+ include FileUtils
15
+
16
+ $:.unshift File.join(File.dirname(__FILE__), "lib")
17
+
18
+ require 'ramaze/version'
19
+ load 'rake_tasks/conf.rake'
20
+ load 'rake_tasks/gem.rake'
21
+ load 'rake_tasks/maintenance.rake'
22
+ load 'rake_tasks/spec.rake'
23
+ load 'rake_tasks/darcs.rake'
24
+ load 'rake_tasks/coverage.rake'
25
+ load 'rake_tasks/git.rake'
26
+
27
+ task :default => ['spec']
28
+ task :test => ['spec']
29
+ task :package => ['jquery']
30
+
31
+ desc 'download latest jquery and put in /lib/proto/public/js/jquery.js'
32
+ task :jquery do
33
+ require 'open-uri'
34
+ $stdout.sync = true
35
+
36
+ File.open('lib/proto/public/js/jquery.js', 'w+') do |jquery|
37
+ remote = open('http://code.jquery.com/jquery-latest.js')
38
+ print "openend remote side, copying..."
39
+ while chunk = remote.read(4096)
40
+ print '.'
41
+ jquery.write(chunk)
42
+ end
43
+ puts " done."
44
+ end
45
+ end
46
+
47
+ desc "sanitize the code and darcs record"
48
+ task :record => ['fix-end-spaces', 'add-copyright'] do
49
+ sh "darcs record"
50
+ end
51
+
52
+ desc "create the doc/changes.xml"
53
+ task 'changes-xml' do
54
+ File.open('doc/changes.xml', 'w+') do |f|
55
+ f.print(`darcs changes --xml`)
56
+ end
57
+ end
58
+
59
+ desc "create the doc/changes.txt"
60
+ task 'changes-text' do
61
+ File.open('doc/changes.txt', 'w+') do |f|
62
+ f.print(`darcs changes --human-readable`)
63
+ end
64
+ end
65
+
66
+ desc "create both doc/changes.txt and doc/changes.xml"
67
+ task :changes => ['changes-xml', 'changes-text'] do
68
+ puts(`darcs changes`.split("\n").first(25))
69
+ end
70
+
71
+ desc "copy the doc/changes.txt to doc/CHANGELOG"
72
+ task :changelog => :changes do
73
+ cp 'doc/changes.txt', 'doc/CHANGELOG'
74
+ end
75
+
76
+ task :rcov_dir do
77
+ mkdir_p 'doc/output/tools/rcov/'
78
+ end
79
+
80
+ desc "Generate HTML coverage report"
81
+ task :rcov_summary => :rcov_dir do
82
+ `rcov --version`
83
+ raise LoadError, "Please `gem install rcov` first" if $?.exitstatus == 127
84
+ raise "Run `rake coverage` to generate coverage data first" unless File.exists? 'coverage.data'
85
+ sh "rcov --aggregate coverage.data -o doc/output/tools/rcov/"
86
+ end
87
+
88
+ desc "generate rdoc"
89
+ task :rdoc => [:clean, :readme2html] do
90
+ sh "rdoc #{(RDOC_OPTS + RDOC_FILES).join(' ')}"
91
+ end
92
+
93
+ desc "generate improved allison-rdoc"
94
+ task :allison => :clean do
95
+ opts = RDOC_OPTS
96
+ path = `allison --path`.strip
97
+ raise LoadError, "Please `gem install allison` first" if $?.exitstatus == 127
98
+ opts << %W[--template '#{path}']
99
+ sh "rdoc #{(RDOC_OPTS + RDOC_FILES).join(' ')}"
100
+ end
101
+
102
+ desc "create bzip2 and tarball"
103
+ task :distribute => :gem do
104
+ sh "rm -rf pkg/ramaze-#{VERS}"
105
+ sh "mkdir -p pkg/ramaze-#{VERS}"
106
+ sh "cp -r {bin,doc,lib,examples,spec,Rakefile,README,rake_tasks} pkg/ramaze-#{VERS}/"
107
+
108
+ Dir.chdir('pkg') do |pwd|
109
+ sh "tar -zcvf ramaze-#{VERS}.tar.gz ramaze-#{VERS}"
110
+ sh "tar -jcvf ramaze-#{VERS}.tar.bz2 ramaze-#{VERS}"
111
+ end
112
+
113
+ sh "rm -rf pkg/ramaze-#{VERS}"
114
+ end
115
+
116
+ desc "show a todolist from all the TODO tags in the source"
117
+ task :todo do
118
+ files = Dir[File.join(BASEDIR, '{lib,spec}', '**/*.rb')]
119
+
120
+ files.each do |file|
121
+ lastline = todo = comment = long_comment = false
122
+
123
+ File.readlines(file).each_with_index do |line, lineno|
124
+ lineno += 1
125
+ comment = line =~ /^\s*?#.*?$/
126
+ long_comment = line =~ /^=begin/
127
+ long_comment = line =~ /^=end/
128
+ todo = true if line =~ /TODO/ and (long_comment or comment)
129
+ todo = false if line.gsub('#', '').strip.empty?
130
+ todo = false unless comment or long_comment
131
+ if todo
132
+ unless lastline and lastline + 1 == lineno
133
+ puts
134
+ puts "vim #{file} +#{lineno}"
135
+ end
136
+
137
+ l = line.strip.gsub(/^#\s*/, '')
138
+ print ' ' unless l =~ /^-/
139
+ puts l
140
+ lastline = lineno
141
+ end
142
+ end
143
+ end
144
+ end
145
+
146
+ desc "opens a simple readline that makes making requests easier"
147
+ task 'request' do
148
+ ARGV.clear
149
+ require 'open-uri'
150
+ require 'pp'
151
+
152
+ loop do
153
+ print 'do request? [enter] '
154
+ gets
155
+ begin
156
+ pp open('http://localhost:7000/xxx').read
157
+ rescue Object => ex
158
+ puts ex
159
+ end
160
+ end
161
+ end
162
+
163
+ desc "runs all the testdocs (not functional yet)"
164
+ task "testdoc" do
165
+ require '../testdoc/lib/testdoc'
166
+ Dir['lib/ramaze/helper/*.rb'].each do |file|
167
+ p file
168
+ begin
169
+ require file
170
+ TestDoc.rspec_run(file)
171
+ rescue Object => ex
172
+ puts ex
173
+ end
174
+ end
175
+ end
176
+
177
+ desc 'listing of available traits per class/module'
178
+ task 'traits' do
179
+ nodes = Hash.new{|h,k| h[k] = []}
180
+ Dir['lib/**/*.rb'].each do |file|
181
+ content = File.read(file)
182
+ traits = content.grep(/^\s*trait\s*:/)
183
+ traits.each do |trait|
184
+ space = content[0..content.index(trait)].scan(/^\s*(?:class|module)\s+(.*)$/)
185
+ space = space.flatten.join('::')
186
+ nodes[space] << trait.strip
187
+ end
188
+ end
189
+
190
+ nodes.each do |space, traits|
191
+ puts space
192
+ traits.each do |trait|
193
+ print ' ', trait, "\n"
194
+ end
195
+ puts
196
+ end
197
+ end