ramaze 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (304) hide show
  1. data/Rakefile +20 -3
  2. data/bin/ramaze +1 -4
  3. data/doc/AUTHORS +2 -1
  4. data/doc/CHANGELOG +539 -32
  5. data/doc/LEGAL +4 -0
  6. data/doc/meta/announcement.txt +79 -47
  7. data/examples/blog/README +2 -2
  8. data/examples/blog/spec/blog.rb +33 -48
  9. data/examples/blog/src/controller.rb +15 -13
  10. data/examples/blog/src/model.rb +28 -10
  11. data/examples/blog/start.rb +0 -10
  12. data/examples/blog/template/edit.xhtml +1 -1
  13. data/examples/blog/template/index.xhtml +2 -2
  14. data/examples/facebook.rb +152 -0
  15. data/examples/linking.rb +28 -0
  16. data/examples/ramaise.rb +4 -11
  17. data/examples/rammit/spec/rammit.rb +30 -0
  18. data/examples/rammit/src/controller/main.rb +3 -0
  19. data/examples/rammit/src/controller/page.rb +16 -0
  20. data/examples/rammit/src/model.rb +33 -0
  21. data/examples/rammit/start.rb +7 -0
  22. data/examples/rammit/template/index.xhtml +14 -0
  23. data/examples/rammit/template/page/view.xhtml +4 -0
  24. data/examples/rapaste/Rakefile +28 -0
  25. data/examples/rapaste/public/css/active4d.css +114 -0
  26. data/examples/rapaste/public/css/all_hallows_eve.css +72 -0
  27. data/examples/rapaste/public/css/amy.css +147 -0
  28. data/examples/rapaste/public/css/blackboard.css +88 -0
  29. data/examples/rapaste/public/css/brilliance_black.css +605 -0
  30. data/examples/rapaste/public/css/brilliance_dull.css +599 -0
  31. data/examples/rapaste/public/css/cobalt.css +149 -0
  32. data/examples/rapaste/public/css/dawn.css +121 -0
  33. data/examples/rapaste/public/css/display.css +179 -0
  34. data/examples/rapaste/public/css/eiffel.css +121 -0
  35. data/examples/rapaste/public/css/espresso_libre.css +109 -0
  36. data/examples/rapaste/public/css/idle.css +62 -0
  37. data/examples/rapaste/public/css/iplastic.css +80 -0
  38. data/examples/rapaste/public/css/lazy.css +73 -0
  39. data/examples/rapaste/public/css/mac_classic.css +123 -0
  40. data/examples/rapaste/public/css/magicwb_amiga.css +104 -0
  41. data/examples/rapaste/public/css/pastels_on_dark.css +188 -0
  42. data/examples/rapaste/public/css/slush_poppies.css +85 -0
  43. data/examples/rapaste/public/css/spacecadet.css +51 -0
  44. data/examples/rapaste/public/css/sunburst.css +180 -0
  45. data/examples/rapaste/public/css/twilight.css +137 -0
  46. data/examples/rapaste/public/css/zenburnesque.css +91 -0
  47. data/examples/rapaste/public/js/jquery.js +11 -0
  48. data/examples/rapaste/rapaste.sqlite +0 -0
  49. data/examples/rapaste/spec/rapaste.rb +49 -0
  50. data/examples/rapaste/src/controller.rb +69 -0
  51. data/examples/rapaste/src/model.rb +61 -0
  52. data/examples/rapaste/start.rb +20 -0
  53. data/examples/rapaste/template/copy.xhtml +10 -0
  54. data/examples/rapaste/template/index.xhtml +9 -0
  55. data/examples/rapaste/template/layout.xhtml +22 -0
  56. data/examples/rapaste/template/list.xhtml +28 -0
  57. data/examples/rapaste/template/view.xhtml +37 -0
  58. data/examples/sourceview/sourceview.rb +3 -3
  59. data/examples/templates/template_amrita2.rb +1 -3
  60. data/examples/todolist/spec/todolist.rb +15 -18
  61. data/examples/whywiki/spec/whywiki.rb +15 -20
  62. data/examples/whywiki/start.rb +0 -1
  63. data/examples/wikore/spec/wikore.rb +14 -19
  64. data/examples/wiktacular/spec/wiktacular.rb +8 -15
  65. data/lib/proto/{src/controller → controller}/main.rb +4 -4
  66. data/lib/proto/public/css/ramaze_error.css +39 -3
  67. data/lib/proto/public/js/jquery.js +2039 -1020
  68. data/lib/proto/spec/main.rb +27 -0
  69. data/lib/proto/start.rb +5 -5
  70. data/lib/proto/view/error.xhtml +62 -0
  71. data/lib/proto/view/index.xhtml +34 -0
  72. data/lib/proto/view/page.xhtml +15 -0
  73. data/lib/ramaze.rb +9 -7
  74. data/lib/ramaze/action.rb +7 -3
  75. data/lib/ramaze/action/render.rb +15 -5
  76. data/lib/ramaze/adapter.rb +5 -5
  77. data/lib/ramaze/adapter/base.rb +2 -2
  78. data/lib/ramaze/adapter/cgi.rb +1 -1
  79. data/lib/ramaze/adapter/evented_mongrel.rb +1 -1
  80. data/lib/ramaze/adapter/fcgi.rb +2 -2
  81. data/lib/ramaze/adapter/mongrel.rb +1 -1
  82. data/lib/ramaze/adapter/swiftiplied_mongrel.rb +1 -1
  83. data/lib/ramaze/adapter/thin.rb +25 -0
  84. data/lib/ramaze/adapter/webrick.rb +1 -1
  85. data/lib/ramaze/cache.rb +3 -2
  86. data/lib/ramaze/cache/memcached.rb +1 -1
  87. data/lib/ramaze/cache/memory.rb +1 -1
  88. data/lib/ramaze/cache/yaml_store.rb +1 -1
  89. data/lib/ramaze/contrib.rb +1 -1
  90. data/lib/ramaze/contrib/auto_params.rb +12 -5
  91. data/lib/ramaze/contrib/auto_params/get_args.rb +1 -0
  92. data/lib/ramaze/contrib/facebook.rb +23 -0
  93. data/lib/ramaze/contrib/facebook/facebook.rb +168 -0
  94. data/lib/ramaze/contrib/gettext.rb +111 -0
  95. data/lib/ramaze/contrib/gettext/mo.rb +155 -0
  96. data/lib/ramaze/contrib/gettext/po.rb +109 -0
  97. data/lib/ramaze/contrib/gzip_filter.rb +1 -1
  98. data/lib/ramaze/contrib/route.rb +15 -5
  99. data/lib/ramaze/contrib/sequel/fill.rb +1 -1
  100. data/lib/ramaze/controller.rb +10 -4
  101. data/lib/ramaze/controller/error.rb +5 -13
  102. data/lib/ramaze/controller/main.rb +2 -0
  103. data/lib/ramaze/controller/resolve.rb +18 -10
  104. data/lib/ramaze/dispatcher.rb +1 -1
  105. data/lib/ramaze/dispatcher/action.rb +1 -1
  106. data/lib/ramaze/dispatcher/directory.rb +3 -2
  107. data/lib/ramaze/dispatcher/error.rb +5 -5
  108. data/lib/ramaze/dispatcher/file.rb +13 -2
  109. data/lib/ramaze/error.rb +1 -1
  110. data/lib/ramaze/gestalt.rb +2 -2
  111. data/lib/ramaze/global.rb +5 -5
  112. data/lib/ramaze/global/dsl.rb +1 -1
  113. data/lib/ramaze/global/globalstruct.rb +11 -5
  114. data/lib/ramaze/helper.rb +1 -1
  115. data/lib/ramaze/helper/aspect.rb +1 -1
  116. data/lib/ramaze/helper/auth.rb +2 -2
  117. data/lib/ramaze/helper/cache.rb +1 -1
  118. data/lib/ramaze/helper/cgi.rb +1 -1
  119. data/lib/ramaze/helper/file.rb +1 -1
  120. data/lib/ramaze/helper/flash.rb +1 -1
  121. data/lib/ramaze/helper/formatting.rb +1 -1
  122. data/lib/ramaze/helper/identity.rb +1 -1
  123. data/lib/ramaze/helper/inform.rb +1 -1
  124. data/lib/ramaze/helper/link.rb +4 -4
  125. data/lib/ramaze/helper/markaby.rb +1 -1
  126. data/lib/ramaze/helper/nitroform.rb +1 -1
  127. data/lib/ramaze/helper/pager.rb +2 -1
  128. data/lib/ramaze/helper/partial.rb +1 -1
  129. data/lib/ramaze/helper/redirect.rb +6 -1
  130. data/lib/ramaze/helper/sequel.rb +54 -0
  131. data/lib/ramaze/helper/stack.rb +1 -1
  132. data/lib/ramaze/inform.rb +1 -1
  133. data/lib/ramaze/inform/analogger.rb +1 -1
  134. data/lib/ramaze/inform/growl.rb +1 -1
  135. data/lib/ramaze/inform/hub.rb +1 -1
  136. data/lib/ramaze/inform/informer.rb +1 -1
  137. data/lib/ramaze/inform/informing.rb +2 -2
  138. data/lib/ramaze/inform/knotify.rb +1 -1
  139. data/lib/ramaze/inform/syslog.rb +1 -1
  140. data/lib/ramaze/inform/xosd.rb +1 -1
  141. data/lib/ramaze/snippets.rb +1 -1
  142. data/lib/ramaze/snippets/array/put_within.rb +1 -1
  143. data/lib/ramaze/snippets/blankslate.rb +7 -0
  144. data/lib/ramaze/snippets/dictionary.rb +6 -1
  145. data/lib/ramaze/snippets/divide.rb +1 -1
  146. data/lib/ramaze/snippets/kernel/__dir__.rb +1 -1
  147. data/lib/ramaze/snippets/kernel/acquire.rb +39 -0
  148. data/lib/ramaze/snippets/kernel/aquire.rb +1 -34
  149. data/lib/ramaze/snippets/kernel/constant.rb +1 -1
  150. data/lib/ramaze/snippets/kernel/pretty_inspect.rb +1 -1
  151. data/lib/ramaze/snippets/numeric/filesize_format.rb +1 -1
  152. data/lib/ramaze/snippets/object/traits.rb +1 -1
  153. data/lib/ramaze/snippets/ordered_set.rb +12 -7
  154. data/lib/ramaze/snippets/ramaze/caller_info.rb +1 -1
  155. data/lib/ramaze/snippets/ramaze/caller_lines.rb +1 -1
  156. data/lib/ramaze/snippets/string/camel_case.rb +1 -1
  157. data/lib/ramaze/snippets/string/color.rb +2 -4
  158. data/lib/ramaze/snippets/string/each.rb +1 -1
  159. data/lib/ramaze/snippets/string/ord.rb +15 -0
  160. data/lib/ramaze/snippets/string/snake_case.rb +1 -1
  161. data/lib/ramaze/snippets/struct/fill.rb +4 -2
  162. data/lib/ramaze/snippets/struct/values_at.rb +2 -2
  163. data/lib/ramaze/snippets/symbol/to_proc.rb +15 -8
  164. data/lib/ramaze/snippets/thread/into.rb +1 -1
  165. data/lib/ramaze/sourcereload.rb +4 -3
  166. data/lib/ramaze/spec/helper.rb +85 -32
  167. data/lib/ramaze/spec/helper/bacon.rb +7 -0
  168. data/lib/ramaze/spec/helper/browser.rb +1 -2
  169. data/lib/ramaze/spec/helper/mock_http.rb +1 -1
  170. data/lib/ramaze/spec/helper/pretty_output.rb +70 -0
  171. data/lib/ramaze/spec/helper/requester.rb +1 -1
  172. data/lib/ramaze/spec/helper/simple_http.rb +5 -4
  173. data/lib/ramaze/spec/helper/snippets.rb +6 -0
  174. data/lib/ramaze/store/default.rb +1 -1
  175. data/lib/ramaze/template.rb +1 -1
  176. data/lib/ramaze/template/amrita2.rb +6 -5
  177. data/lib/ramaze/template/erubis.rb +1 -1
  178. data/lib/ramaze/template/ezamar.rb +1 -1
  179. data/lib/ramaze/template/ezamar/element.rb +1 -1
  180. data/lib/ramaze/template/ezamar/engine.rb +1 -1
  181. data/lib/ramaze/template/ezamar/morpher.rb +1 -1
  182. data/lib/ramaze/template/ezamar/render_partial.rb +1 -1
  183. data/lib/ramaze/template/haml.rb +1 -1
  184. data/lib/ramaze/template/liquid.rb +1 -1
  185. data/lib/ramaze/template/markaby.rb +1 -1
  186. data/lib/ramaze/template/nagoro.rb +4 -6
  187. data/lib/ramaze/template/none.rb +1 -1
  188. data/lib/ramaze/template/remarkably.rb +1 -1
  189. data/lib/ramaze/template/sass.rb +1 -1
  190. data/lib/ramaze/tool.rb +1 -1
  191. data/lib/ramaze/tool/create.rb +7 -1
  192. data/lib/ramaze/tool/localize.rb +7 -14
  193. data/lib/ramaze/tool/mime.rb +1 -1
  194. data/lib/ramaze/tool/record.rb +1 -1
  195. data/lib/ramaze/trinity.rb +1 -1
  196. data/lib/ramaze/trinity/request.rb +4 -2
  197. data/lib/ramaze/trinity/response.rb +1 -1
  198. data/lib/ramaze/trinity/session.rb +7 -1
  199. data/lib/ramaze/version.rb +3 -3
  200. data/lib/vendor/bacon.rb +317 -0
  201. data/rake_tasks/conf.rake +1 -1
  202. data/rake_tasks/maintenance.rake +7 -5
  203. data/rake_tasks/spec.rake +54 -40
  204. data/spec/contrib/auto_params.rb +21 -4
  205. data/spec/contrib/route.rb +31 -4
  206. data/spec/contrib/sequel/fill.rb +3 -4
  207. data/spec/examples/caching.rb +5 -2
  208. data/spec/examples/css.rb +5 -2
  209. data/spec/examples/element.rb +5 -4
  210. data/spec/examples/hello.rb +1 -0
  211. data/spec/examples/linking.rb +18 -0
  212. data/spec/examples/simple.rb +13 -18
  213. data/spec/examples/templates/template_amrita2.rb +3 -2
  214. data/spec/examples/templates/template_erubis.rb +3 -2
  215. data/spec/examples/templates/template_ezamar.rb +2 -1
  216. data/spec/examples/templates/template_haml.rb +3 -2
  217. data/spec/examples/templates/template_liquid.rb +3 -2
  218. data/spec/examples/templates/template_markaby.rb +3 -2
  219. data/spec/examples/templates/template_remarkably.rb +3 -2
  220. data/spec/ramaze/action/basics.rb +4 -4
  221. data/spec/ramaze/action/cache.rb +11 -13
  222. data/spec/ramaze/action/layout.rb +47 -3
  223. data/spec/ramaze/action/render.rb +3 -3
  224. data/spec/ramaze/action/template/instancevars/layout.xhtml +1 -0
  225. data/spec/ramaze/adapter.rb +7 -7
  226. data/spec/ramaze/adapter/mongrel.rb +1 -1
  227. data/spec/ramaze/adapter/record.rb +7 -7
  228. data/spec/ramaze/adapter/webrick.rb +1 -1
  229. data/spec/ramaze/cache.rb +6 -8
  230. data/spec/ramaze/controller.rb +77 -65
  231. data/spec/ramaze/controller/resolve.rb +2 -1
  232. data/spec/ramaze/controller/template_resolving.rb +3 -4
  233. data/spec/ramaze/dispatcher.rb +3 -4
  234. data/spec/ramaze/dispatcher/directory.rb +35 -35
  235. data/spec/ramaze/dispatcher/file.rb +8 -5
  236. data/spec/ramaze/element.rb +4 -4
  237. data/spec/ramaze/error.rb +13 -11
  238. data/spec/ramaze/gestalt.rb +1 -1
  239. data/spec/ramaze/helper/aspect.rb +2 -1
  240. data/spec/ramaze/helper/auth.rb +4 -2
  241. data/spec/ramaze/helper/cache.rb +10 -9
  242. data/spec/ramaze/helper/cgi.rb +2 -2
  243. data/spec/ramaze/helper/file.rb +1 -0
  244. data/spec/ramaze/helper/flash.rb +5 -4
  245. data/spec/ramaze/helper/formatting.rb +1 -1
  246. data/spec/ramaze/helper/link.rb +3 -3
  247. data/spec/ramaze/helper/pager.rb +44 -80
  248. data/spec/ramaze/helper/partial.rb +2 -3
  249. data/spec/ramaze/helper/redirect.rb +10 -1
  250. data/spec/ramaze/helper/stack.rb +4 -3
  251. data/spec/ramaze/helper/template/loop.xhtml +2 -1
  252. data/spec/ramaze/inform/informer.rb +2 -2
  253. data/spec/ramaze/inform/syslog.rb +1 -1
  254. data/spec/ramaze/localize.rb +26 -26
  255. data/spec/ramaze/morpher.rb +6 -7
  256. data/spec/ramaze/params.rb +7 -8
  257. data/spec/ramaze/request.rb +27 -6
  258. data/spec/ramaze/request/mongrel.rb +1 -1
  259. data/spec/ramaze/request/thin.rb +9 -0
  260. data/spec/ramaze/session.rb +2 -1
  261. data/spec/ramaze/store/default.rb +14 -17
  262. data/spec/ramaze/template.rb +5 -7
  263. data/spec/ramaze/template/amrita2.rb +4 -1
  264. data/spec/ramaze/template/erubis.rb +2 -1
  265. data/spec/ramaze/template/ezamar.rb +2 -3
  266. data/spec/ramaze/template/ezamar/other__index.xhtml +1 -0
  267. data/spec/ramaze/template/haml.rb +2 -1
  268. data/spec/ramaze/template/liquid.rb +4 -2
  269. data/spec/ramaze/template/markaby.rb +4 -2
  270. data/spec/ramaze/template/nagoro.rb +3 -4
  271. data/spec/ramaze/template/remarkably.rb +4 -2
  272. data/spec/ramaze/template/sass.rb +3 -2
  273. data/spec/ramaze/template/xslt.rb +4 -7
  274. data/spec/ramaze/trinity/request.rb +4 -3
  275. data/spec/ramaze/trinity/session.rb +6 -4
  276. data/spec/snippets/array/put_within.rb +3 -2
  277. data/spec/snippets/divide.rb +1 -4
  278. data/spec/snippets/kernel/__dir__.rb +1 -1
  279. data/spec/snippets/kernel/acquire.rb +71 -0
  280. data/spec/snippets/kernel/constant.rb +4 -8
  281. data/spec/snippets/numeric/filesize_format.rb +1 -1
  282. data/spec/snippets/ordered_set.rb +9 -2
  283. data/spec/snippets/ramaze/caller_info.rb +3 -3
  284. data/spec/snippets/ramaze/caller_lines.rb +3 -3
  285. data/spec/snippets/string/camel_case.rb +1 -1
  286. data/spec/snippets/string/color.rb +2 -2
  287. data/spec/snippets/string/snake_case.rb +5 -1
  288. data/spec/snippets/string/unindent.rb +1 -1
  289. data/spec/snippets/struct/fill.rb +14 -15
  290. data/spec/snippets/struct/values_at.rb +15 -10
  291. data/spec/snippets/symbol/to_proc.rb +13 -0
  292. data/spec/snippets/thread/into.rb +3 -4
  293. metadata +458 -386
  294. data/doc/README.html +0 -729
  295. data/doc/changes.txt +0 -5044
  296. data/doc/changes.xml +0 -5046
  297. data/lib/proto/public/error.zmr +0 -61
  298. data/lib/proto/src/element/page.rb +0 -17
  299. data/lib/proto/src/model.rb +0 -6
  300. data/lib/proto/template/index.xhtml +0 -15
  301. data/lib/ramaze/spec/helper/layout.rb +0 -58
  302. data/lib/ramaze/spec/helper/minimal.rb +0 -23
  303. data/lib/ramaze/spec/helper/wrap.rb +0 -198
  304. data/spec/snippets/kernel/aquire.rb +0 -71
@@ -1,729 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: README</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>README</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>doc/README
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Wed Nov 21 14:52:17 +0900 2007</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <pre>
73
- Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com
74
- All files in this distribution are subject to the terms of the Ruby license.
75
- </pre>
76
- <h1>About Ramaze</h1>
77
- <p>
78
- Ramaze is a very simple and straight-forward web-framework. The philosophy
79
- of it could be expressed in a mix of KISS and POLS, trying to make simple
80
- things simple and complex things possible.
81
- </p>
82
- <p>
83
- This of course is nothing new to anyone who knows some ruby, but is often
84
- forgotten in a chase for new functionality and features. Ramaze only tries
85
- to give you the ultimate tools, but you have to use them yourself to
86
- achieve perfect custom-tailored results.
87
- </p>
88
- <p>
89
- Another one of the goals during development of Ramaze was to make every
90
- part as modular and therefor reuasable as possible, not only to provide a
91
- basic understanding after the first glance, but also to make it as simple
92
- as possible to reuse parts of the code.
93
- </p>
94
- <p>
95
- The original purpose of Ramaze was to act as a kind of framework to build
96
- web-frameworks, this was made obsolete by the introduction of rack, which
97
- provides this feature at a better level without trying to enforce any
98
- structural layout of the resulting framework.
99
- </p>
100
- <h1>Features Overview</h1>
101
- <p>
102
- Ramaze offers following features at the moment:
103
- </p>
104
- <ul>
105
- <li>Adapters
106
-
107
- <pre>
108
- Ramaze takes advantage of the rack library to provide a common way of
109
- handling different ways to serve its content.
110
-
111
- Rack supports at the moment:
112
-
113
- * [Mongrel](http://mongrel.rubyforge.org/)
114
-
115
- Mongrel is a fast HTTP library and server for Ruby that is intended for
116
- hosting Ruby web applications of any kind using plain HTTP rather than
117
- FastCGI or SCGI.
118
-
119
- * [WEBrick](http://www.webrick.org/)
120
-
121
- WEBrick is a Ruby library program to build HTTP servers.
122
-
123
- * CGI
124
-
125
- CGI is the Common Gateway Interface and is one of the most basic ways
126
- to integrate into Webservers like Apache or Lighttpd.
127
-
128
- * FCGI
129
-
130
- Improvment of CGI as it doesn't start up a new connection to Ramaze on
131
- every request.
132
- </pre>
133
- </li>
134
- <li>Templates
135
-
136
- <ul>
137
- <li>[Amrita2](<a
138
- href="http://amrita2.rubyforge.org">amrita2.rubyforge.org</a>/)
139
-
140
- <p>
141
- Amrita2 is a xml/xhtml template library for Ruby. It makes html documents
142
- from a template and a model data.
143
- </p>
144
- </li>
145
- <li>[Erubis](<a
146
- href="http://rubyforge.org/projects/erubis">rubyforge.org/projects/erubis</a>)
147
-
148
- <p>
149
- Erubis is a fast, secure, and very extensible implementation of eRuby.
150
- </p>
151
- </li>
152
- <li>[Haml](<a href="http://haml.hamptoncatlin.com">haml.hamptoncatlin.com</a>/)
153
-
154
- <p>
155
- Haml takes your gross, ugly templates and replaces them with veritable
156
- Haiku.
157
- </p>
158
- </li>
159
- <li>[Liquid](<a
160
- href="http://home.leetsoft.com/liquid">home.leetsoft.com/liquid</a>)
161
-
162
- <p>
163
- Liquid&#8216;s syntax and parse model are inspired by Django templates, as
164
- well as PHP&#8216;s smarty.
165
- </p>
166
- </li>
167
- <li>[Remarkably](<a
168
- href="http://rubyforge.org/projects/remarkably">rubyforge.org/projects/remarkably</a>)
169
-
170
- <p>
171
- Remarkably is a very tiny Markaby-like XML builder
172
- </p>
173
- </li>
174
- <li>[Markaby](<a
175
- href="http://code.whytheluckystiff.net/markaby">code.whytheluckystiff.net/markaby</a>/)
176
-
177
- <p>
178
- Markaby means Markup as Ruby.
179
- </p>
180
- </li>
181
- <li>[Sass](<a
182
- href="http://haml.hamptoncatlin.com/docs/sass">haml.hamptoncatlin.com/docs/sass</a>)
183
-
184
- <p>
185
- Sass is a meta-language on top of CSS that‘s used to describe the style
186
- of a document cleanly and structurally, with more power than flat CSS
187
- allows.
188
- </p>
189
- </li>
190
- <li>Ezamar
191
-
192
- <p>
193
- A simple homage to [Nitro](<a
194
- href="http://nitroproject.org)s">nitroproject.org)s</a> templating, is
195
- shipped together with Ramaze.
196
- </p>
197
- </li>
198
- </ul>
199
- </li>
200
- <li>Cache
201
-
202
- <ul>
203
- <li>Hash
204
-
205
- </li>
206
- <li>YAML::Store
207
-
208
- </li>
209
- <li>MemCache
210
-
211
- </li>
212
- </ul>
213
- </li>
214
- <li>Helper
215
-
216
- <ul>
217
- <li>Active by default
218
-
219
- <ul>
220
- <li>CGI
221
-
222
- <p>
223
- Shortcuts for escape/unescape of the CGI module.
224
- </p>
225
- </li>
226
- <li>File
227
-
228
- <p>
229
- Helps you serving files from your Controller.
230
- </p>
231
- </li>
232
- <li>Flash
233
-
234
- <p>
235
- Store a couple of values for one request associated with a session.
236
- </p>
237
- </li>
238
- <li>Link
239
-
240
- <p>
241
- Easier linking to the various parts of your applications Controllers and
242
- Actions.
243
- </p>
244
- </li>
245
- <li>Redirect
246
-
247
- <p>
248
- Easy redirection.
249
- </p>
250
- </li>
251
- </ul>
252
- </li>
253
- <li>Optional
254
-
255
- <ul>
256
- <li>Aspect
257
-
258
- <p>
259
- Allows you to wrap different Actions on your Controller with code.
260
- </p>
261
- </li>
262
- <li>Auth
263
-
264
- <p>
265
- Simple way to add basic authentication.
266
- </p>
267
- </li>
268
- <li>Cache
269
-
270
- <p>
271
- Easy caching Actions and values.
272
- </p>
273
- </li>
274
- <li>Identity
275
-
276
- <p>
277
- For ease of use of the OpenID authentication mechanism.
278
- </p>
279
- </li>
280
- <li>Inform
281
-
282
- <p>
283
- Wrapping the functionality of Ramazes logging facilities.
284
- </p>
285
- </li>
286
- <li>Markaby
287
-
288
- <p>
289
- Allows you to use Markaby in your Controller without having it as the
290
- default templating engine.
291
- </p>
292
- </li>
293
- <li>Nitroform
294
-
295
- <p>
296
- Hooks up on nitros form builder to help you creating forms from Og objects.
297
- </p>
298
- </li>
299
- <li>OpenID
300
-
301
- <p>
302
- Authentication via OpenID made easy.
303
- </p>
304
- </li>
305
- <li>Pager
306
-
307
- <p>
308
- Displays a collection of entitities in multiple pages.
309
- </p>
310
- </li>
311
- <li>Partial
312
-
313
- <p>
314
- Renders so-called partials.
315
- </p>
316
- </li>
317
- <li>Stack
318
-
319
- <p>
320
- Allows you to use a call/answer mechanism for things like redirection to
321
- the site a user entered login-forms from.
322
- </p>
323
- </li>
324
- </ul>
325
- </li>
326
- </ul>
327
- </li>
328
- <li>Various
329
-
330
- <ul>
331
- <li>Sessions
332
-
333
- </li>
334
- <li>Global configuration system
335
-
336
- </li>
337
- <li>Simple request/response handling
338
-
339
- </li>
340
- <li>Custom sophisticated Error-handling
341
-
342
- </li>
343
- </ul>
344
- </li>
345
- </ul>
346
- <h1>Basic Principles</h1>
347
- <p>
348
- There are some basic principles that Ramaze tries to follow:
349
- </p>
350
- <ul>
351
- <li>KISS (Keep It Super Simple)
352
-
353
- <p>
354
- Ramaze doesn&#8216;t introduce any major change of paradigm for everyone
355
- familiar with Ruby and the basics of Web-development.
356
- </p>
357
- </li>
358
- <li>POLS (Principle Of Least Surprise)
359
-
360
- <p>
361
- Ramaze tries to be intuitive and easy to learn. Most functionality is built
362
- in a way to help, not to obfuscate or confuse.
363
- </p>
364
- </li>
365
- <li>Modular design
366
-
367
- <p>
368
- Use what you want and how you want it.
369
- </p>
370
- <p>
371
- Through Ruby Ramaze provides one of the most powerful programming-languages
372
- available, giving you full control over your system.
373
- </p>
374
- <p>
375
- Even the most essential parts of Ramaze can easily be replaced and/or
376
- modified without losing the advantage of the whole framework.
377
- </p>
378
- </li>
379
- <li>Minimal dependencies
380
-
381
- <p>
382
- Nothing besides Ruby is required for the basic features.
383
- </p>
384
- <p>
385
- Of course you can take advantage of several wonderful libraries, but Ramaze
386
- is built in a way to be run on any basic setup.
387
- </p>
388
- </li>
389
- <li>Documentation
390
-
391
- <p>
392
- Document everything, classes, modules, methods, configuration&#8230;
393
- </p>
394
- <p>
395
- Through 100% documentation Ramaze gives the developer easy and solid
396
- understanding of the underlying concepts and functionality.
397
- </p>
398
- </li>
399
- <li>Open development
400
-
401
- <p>
402
- Everyone is welcome to contribute to Ramaze in the easiest way possible.
403
- The repository is open for patches passing the Test-suite.
404
- </p>
405
- </li>
406
- <li>Examples
407
-
408
- <p>
409
- Everyone learns different, some only read the source, others browse
410
- documentation, but everyone loves examples for a quick and painless start.
411
- </p>
412
- <p>
413
- Ramaze addresses this need and offers a wide variety of examples of usage,
414
- basic functionality, project-layout and more advanced applications.
415
- </p>
416
- </li>
417
- <li>Fully BDD (Behaviour Driven Design)
418
-
419
- <p>
420
- Ramaze has a very complete set of so-called specifications built by RSpec.
421
- These specs define the way Ramaze has to behave.
422
- </p>
423
- <p>
424
- The specs are checked every time a new patch is pushed into the repository,
425
- deciding whether the changes the patch applies are valid and don&#8216;t
426
- break the framework.
427
- </p>
428
- </li>
429
- </ul>
430
- <h1>Installation</h1>
431
- <ul>
432
- <li>via RubyGems
433
-
434
- <p>
435
- The simplest way of installing Ramaze is via
436
- </p>
437
- <pre>
438
- $ gem install ramaze
439
- </pre>
440
- <p>
441
- in case you have RubyGems installed.
442
- </p>
443
- </li>
444
- <li>via darcs
445
-
446
- <p>
447
- To get the latest and sweetest, you can just pull from the repository and
448
- run Ramaze that way.
449
- </p>
450
- <pre>
451
- $ darcs get --partial http://darcs.ramaze.net/ramaze
452
- </pre>
453
- <p>
454
- Please read the man page or `darcs help` for more information about
455
- updating and creating your own patches. This is at the moment the premier
456
- way to use Ramaze, since it is the way I use it.
457
- </p>
458
- <p>
459
- Some hints for the usage of Darcs.
460
- </p>
461
- <ul>
462
- <li>use require &#8216;ramaze&#8217; from everywhere
463
-
464
- <p>
465
- add a file to your site_ruby named &#8216;ramaze.rb&#8217; the content
466
- should be: &quot;require
467
- &#8217;/path/to/darcs/repo/ramaze/lib/ramaze&#8217;&quot;
468
- </p>
469
- </li>
470
- <li>get the latest version (from inside the ramaze-directory)
471
-
472
- <p>
473
- $ darcs pull
474
- </p>
475
- </li>
476
- <li>record a patch
477
-
478
- <p>
479
- $ darcs record
480
- </p>
481
- </li>
482
- <li>output your patches into a bundle ready to be mailed (compress it before
483
- sending to make sure it arrives in the way you sent it)
484
-
485
- <p>
486
- $ darcs send -o ramaze_bundle $ gzip -c ramaze_bundle &gt; ramaze_bundle.gz
487
- </p>
488
- </li>
489
- </ul>
490
- </li>
491
- <li>via install.rb
492
-
493
- <p>
494
- Support for install.rb has been canceled and the file removed.
495
- </p>
496
- </li>
497
- </ul>
498
- <h1>Getting Started</h1>
499
- <p>
500
- Now that you have a vague idea of what you&#8216;re about to get into you
501
- might just want to get a way to get up and running ASAP. Please read below
502
- for more information about installation.
503
- </p>
504
- <p>
505
- Depending on what you are planning to do you can either just go and start
506
- reading the source or directly get some hands-on experience by trying some
507
- of the examples. Most things will require dependencies though. The basic
508
- functionality is provided by the WEBrick adapter and the Template::Ramaze,
509
- which just run out of the box. For more features you will have to install
510
- some templating-engines and mongrel (<em>very</em> recommended). Ramaze
511
- will inform you when it needs further dependencies, so just go and try some
512
- things.
513
- </p>
514
- <p>
515
- Some places to get started are:
516
- </p>
517
- <ul>
518
- <li>Read the documentation.
519
-
520
- </li>
521
- <li>Run and read the test cases.
522
-
523
- </li>
524
- <li>Look at the examples and run/modify them.
525
-
526
- </li>
527
- </ul>
528
- <h1>A couple of Examples</h1>
529
- <p>
530
- There are some examples for your instant pleasure inside the
531
- examples-directory in the Ramaze-distribution. To start up an example, you
532
- can use the Ramaze binary located in bin/ramaze for example:
533
- </p>
534
- <pre>
535
- $ ramaze examples/hello.rb
536
- </pre>
537
- <p>
538
- Or:
539
- </p>
540
- <pre>
541
- $ cd examples/blog
542
- $ ramaze
543
- </pre>
544
- <p>
545
- Since ramaze uses the start.rb by default if you don&#8216;t pass anything
546
- else.
547
- </p>
548
- <p>
549
- For more information about the usage of ramaze try:
550
- </p>
551
- <pre>
552
- $ ramaze --help
553
- </pre>
554
- <p>
555
- Examples include:
556
- </p>
557
- <ul>
558
- <li>examples/hello.rb Hello, World!
559
-
560
- </li>
561
- <li>examples/simple.rb A bit more advanced than the hello-example, but still
562
- very basic.
563
-
564
- </li>
565
- <li>examples/blog Not yet fully functional, but coming along.
566
-
567
- </li>
568
- <li>examples/whywiki A basic examples of a minimalistic application, based on
569
- the Wiki of _why in his camping-framework.
570
-
571
- </li>
572
- <li>examples/templates examples of real usage of the templating-engines. Tries
573
- to implement the same functionality in each template_*.rb file using a
574
- different engine.
575
-
576
- </li>
577
- </ul>
578
- <h1>How to find Help</h1>
579
- <p>
580
- For help you can:
581
- </p>
582
- <ul>
583
- <li>Visit us in the channel ramaze on irc.freenode.net
584
-
585
- </li>
586
- <li>Join the Mailinglist at <a
587
- href="http://ramaze.rubyforge.org">ramaze.rubyforge.org</a>
588
-
589
- </li>
590
- </ul>
591
- <h1>Appendix</h1>
592
- <ul>
593
- <li>Performance
594
-
595
- <ul>
596
- <li>Serving
597
-
598
- <p>
599
- For best performance you should consider using Mongrel to host your
600
- application.
601
- </p>
602
- </li>
603
- <li>Caching
604
-
605
- <p>
606
- You can easily cache your pages using the CacheHelper. Also, using MemCache
607
- gives you high-end performance and security.
608
- </p>
609
- </li>
610
- </ul>
611
- </li>
612
- </ul>
613
- <h1>And thanks to&#8230;</h1>
614
- <p>
615
- There is a large number of people who made Ramaze possibe by their ongoing
616
- efforts in the world of open source and by encouraging and helping me.
617
- </p>
618
- <p>
619
- This list is by no means a full listing of all these people, but I try to
620
- get a good coverage despite that.
621
- </p>
622
- <p>
623
- I would like to thank:
624
- </p>
625
- <ul>
626
- <li>Yukihiro Matsumoto a.k.a matz
627
-
628
- <pre>
629
- For giving the world Ruby and bringing fun back into programming.
630
- </pre>
631
- </li>
632
- <li>Zed Shawn a.k.a. zedas
633
-
634
- <pre>
635
- For developing Mongrel, Ramaze started out as a simple Hello World based
636
- on that awesome server.
637
- </pre>
638
- </li>
639
- <li>Christian Neukirchen a.k.a chris2
640
-
641
- <pre>
642
- For building rack, which is just what the numerous web-developers had
643
- anticipated and which will, with no doubt, change the world.
644
- </pre>
645
- </li>
646
- <li>Pistos
647
-
648
- <pre>
649
- For continious encouragment and building the first real webpage on Ramaze.
650
- His bugreports were invaluable.
651
- </pre>
652
- </li>
653
- <li>Jim Weirich
654
-
655
- <pre>
656
- For Rake, which lifts off a lot of tasks from the shoulders of every
657
- developer who uses it.
658
- </pre>
659
- </li>
660
- <li>Thomas Sawyer a.k.a Trans
661
-
662
- <pre>
663
- Dragging me deep into the rabbit-hole and showing me how awesome Ruby
664
- truely is through his work on facets, ratchets and tons of other projects.
665
- </pre>
666
- </li>
667
- <li>George Moschovitis a.k.a gmosx
668
-
669
- <pre>
670
- For his tremendous efforts in the Nitro/Og framework, which is a source of
671
- steady inspiration for Ramaze and brought me to Ruby in the first place.
672
- </pre>
673
- </li>
674
- <li>Rob Levin a.k.a. lilo
675
-
676
- <pre>
677
- He founded the most excellent Freenode IRC-network, where the most important
678
- channels for rubyists are located (as is #ramaze).
679
- May he rest in peace.
680
- </pre>
681
- </li>
682
- <li>The guys (and gals) in the various channels on Freenode
683
-
684
- <pre>
685
- As the people are way too many to be listed, here the channels that i call
686
- my online home.
687
- All the people in there deserve special thanks for getting me hooked to Ruby
688
- and providing their help in a friendly and patient manner.
689
-
690
- * #nitro
691
- * #ruby-de
692
- * #ruby-lang
693
- * #rubyforce
694
- </pre>
695
- </li>
696
- </ul>
697
-
698
- </div>
699
-
700
-
701
- </div>
702
-
703
-
704
- </div>
705
-
706
-
707
- <!-- if includes -->
708
-
709
- <div id="section">
710
-
711
-
712
-
713
-
714
-
715
-
716
-
717
-
718
- <!-- if method_list -->
719
-
720
-
721
- </div>
722
-
723
-
724
- <div id="validator-badges">
725
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
726
- </div>
727
-
728
- </body>
729
- </html>