ramaze 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +4 -12
- data/bin/ramaze +95 -171
- data/doc/CHANGELOG +387 -4
- data/doc/README +81 -13
- data/doc/meta/announcement.txt +51 -8
- data/doc/meta/configuration.txt +17 -34
- data/doc/meta/internals.txt +34 -4
- data/doc/migrate/1110_to_1111.txt +131 -0
- data/doc/readme_chunks/features.txt +81 -12
- data/doc/readme_chunks/installing.txt +0 -1
- data/doc/tutorial/todolist.html +293 -65
- data/doc/tutorial/{todolist.txt → todolist.mkd} +251 -51
- data/examples/blog/main.rb +1 -1
- data/examples/blog/src/model.rb +0 -1
- data/examples/hello.rb +2 -5
- data/examples/templates/template/external.haml +5 -5
- data/examples/templates/template/external.liquid +1 -1
- data/examples/templates/template/external.mab +8 -8
- data/examples/templates/template/external.rem +30 -0
- data/examples/templates/template/external.rhtml +6 -7
- data/examples/templates/template/external.zmr +13 -9
- data/examples/templates/template_amrita2.rb +8 -8
- data/examples/templates/template_erubis.rb +11 -11
- data/examples/templates/template_ezamar.rb +9 -11
- data/examples/templates/template_haml.rb +13 -13
- data/examples/templates/template_liquid.rb +10 -10
- data/examples/templates/template_markaby.rb +13 -10
- data/examples/templates/template_remarkably.rb +59 -0
- data/examples/todolist/main.rb +1 -7
- data/examples/todolist/src/controller/main.rb +26 -13
- data/examples/todolist/src/element/page.rb +5 -0
- data/examples/whywiki/main.rb +1 -1
- data/lib/proto/main.rb +0 -8
- data/lib/proto/public/css/ramaze_error.css +12 -4
- data/lib/proto/public/error.zmr +6 -25
- data/lib/ramaze.rb +35 -245
- data/lib/ramaze/action.rb +21 -0
- data/lib/ramaze/adapter.rb +94 -29
- data/lib/ramaze/adapter/base.rb +57 -0
- data/lib/ramaze/adapter/mongrel.rb +12 -19
- data/lib/ramaze/adapter/webrick.rb +21 -20
- data/lib/ramaze/cache.rb +47 -3
- data/lib/ramaze/cache/memcached.rb +22 -0
- data/lib/ramaze/cache/yaml_store.rb +19 -0
- data/lib/ramaze/controller.rb +47 -271
- data/lib/ramaze/controller/error.rb +43 -0
- data/lib/ramaze/controller/render.rb +90 -0
- data/lib/ramaze/controller/resolve.rb +147 -0
- data/lib/ramaze/dispatcher.rb +41 -9
- data/lib/ramaze/dispatcher/file.rb +1 -1
- data/lib/ramaze/global.rb +73 -158
- data/lib/ramaze/global/dsl.rb +29 -0
- data/lib/ramaze/global/globalstruct.rb +90 -0
- data/lib/ramaze/helper.rb +1 -1
- data/lib/ramaze/helper/aspect.rb +39 -179
- data/lib/ramaze/helper/cache.rb +8 -9
- data/lib/ramaze/helper/cgi.rb +23 -0
- data/lib/ramaze/helper/file.rb +3 -0
- data/lib/ramaze/helper/inform.rb +3 -0
- data/lib/ramaze/helper/link.rb +56 -63
- data/lib/ramaze/helper/nitroform.rb +4 -0
- data/lib/ramaze/helper/redirect.rb +1 -1
- data/lib/ramaze/inform.rb +6 -2
- data/lib/ramaze/inform/analogger.rb +5 -1
- data/lib/ramaze/inform/hub.rb +1 -1
- data/lib/ramaze/inform/informing.rb +7 -0
- data/lib/ramaze/snippets/kernel/aquire.rb +2 -0
- data/lib/ramaze/snippets/kernel/constant.rb +2 -0
- data/lib/ramaze/snippets/kernel/pretty_inspect.rb +2 -0
- data/lib/ramaze/snippets/object/traits.rb +4 -0
- data/lib/ramaze/snippets/openstruct/temp.rb +3 -0
- data/lib/ramaze/snippets/string/DIVIDE.rb +2 -0
- data/lib/ramaze/snippets/string/camel_case.rb +2 -0
- data/lib/ramaze/snippets/string/color.rb +2 -0
- data/lib/ramaze/snippets/string/each.rb +2 -0
- data/lib/ramaze/snippets/string/snake_case.rb +3 -0
- data/lib/ramaze/snippets/struct/fill.rb +8 -2
- data/lib/ramaze/snippets/struct/values_at.rb +16 -0
- data/lib/ramaze/snippets/symbol/to_proc.rb +3 -0
- data/lib/ramaze/sourcereload.rb +89 -0
- data/lib/ramaze/template.rb +21 -12
- data/lib/ramaze/template/amrita2.rb +6 -6
- data/lib/ramaze/template/erubis.rb +4 -9
- data/lib/ramaze/template/ezamar.rb +13 -57
- data/lib/ramaze/template/ezamar/element.rb +10 -12
- data/lib/ramaze/template/ezamar/engine.rb +40 -101
- data/lib/ramaze/template/ezamar/morpher.rb +3 -3
- data/lib/ramaze/template/haml.rb +3 -6
- data/lib/ramaze/template/liquid.rb +4 -9
- data/lib/ramaze/template/markaby.rb +16 -22
- data/lib/ramaze/template/remarkably.rb +28 -0
- data/lib/ramaze/tool/mime.rb +2 -0
- data/lib/ramaze/tool/record.rb +6 -0
- data/lib/ramaze/trinity/request.rb +44 -54
- data/lib/ramaze/trinity/response.rb +1 -1
- data/lib/ramaze/trinity/session.rb +15 -37
- data/lib/ramaze/version.rb +1 -1
- data/rake_tasks/gem.rake +2 -2
- data/rake_tasks/maintaince.rake +42 -1
- data/rake_tasks/spec.rake +45 -0
- data/spec/examples/caching.rb +1 -1
- data/spec/examples/simple.rb +1 -1
- data/spec/examples/templates/template_amrita2.rb +1 -0
- data/spec/examples/templates/template_erubis.rb +2 -1
- data/spec/examples/templates/template_ezamar.rb +1 -1
- data/spec/examples/templates/template_haml.rb +2 -1
- data/spec/examples/templates/template_liquid.rb +2 -1
- data/spec/examples/templates/template_markaby.rb +2 -1
- data/spec/examples/templates/template_remarkably.rb +22 -0
- data/spec/examples/todolist.rb +125 -0
- data/spec/helper.rb +2 -23
- data/spec/helper/minimal.rb +20 -0
- data/spec/helper/mock_http.rb +24 -30
- data/spec/helper/simple_http.rb +2 -2
- data/spec/helper/wrap.rb +6 -9
- data/spec/ramaze/adapter.rb +1 -1
- data/spec/ramaze/adapter/record.rb +31 -0
- data/spec/ramaze/cache.rb +41 -54
- data/spec/ramaze/controller.rb +121 -137
- data/spec/ramaze/controller/template/list.xhtml +1 -0
- data/spec/ramaze/controller/template/other/greet/other.xhtml +1 -0
- data/spec/ramaze/controller/template_resolving.rb +27 -3
- data/spec/ramaze/element.rb +11 -7
- data/spec/ramaze/error.rb +1 -1
- data/spec/ramaze/gestalt.rb +2 -0
- data/spec/ramaze/helper/aspect.rb +30 -21
- data/spec/ramaze/helper/auth.rb +1 -1
- data/spec/ramaze/helper/cache.rb +2 -1
- data/spec/ramaze/helper/form.rb +14 -11
- data/spec/ramaze/helper/link.rb +18 -41
- data/spec/ramaze/localize.rb +29 -2
- data/spec/ramaze/morpher.rb +23 -12
- data/spec/ramaze/params.rb +46 -24
- data/spec/ramaze/request.rb +6 -2
- data/spec/ramaze/store/yaml.rb +5 -0
- data/spec/ramaze/template.rb +22 -27
- data/spec/ramaze/template/amrita2.rb +1 -2
- data/spec/ramaze/template/erubis.rb +1 -1
- data/spec/ramaze/template/ezamar.rb +1 -2
- data/spec/ramaze/template/haml.rb +2 -2
- data/spec/ramaze/template/haml/with_vars.haml +1 -1
- data/spec/ramaze/template/liquid.rb +1 -1
- data/spec/ramaze/template/markaby.rb +1 -1
- data/spec/ramaze/template/remarkably.rb +56 -0
- data/spec/ramaze/template/remarkably/external.rem +8 -0
- data/spec/ramaze/template/remarkably/sum.rem +1 -0
- metadata +38 -63
- data/doc/README.html +0 -637
- data/doc/allison/LICENSE +0 -184
- data/doc/allison/README +0 -37
- data/doc/allison/allison.css +0 -299
- data/doc/allison/allison.gif +0 -0
- data/doc/allison/allison.js +0 -307
- data/doc/allison/allison.rb +0 -287
- data/doc/allison/cache/BODY +0 -588
- data/doc/allison/cache/CLASS_INDEX +0 -4
- data/doc/allison/cache/CLASS_PAGE +0 -1
- data/doc/allison/cache/FILE_INDEX +0 -4
- data/doc/allison/cache/FILE_PAGE +0 -1
- data/doc/allison/cache/FONTS +0 -1
- data/doc/allison/cache/FR_INDEX_BODY +0 -1
- data/doc/allison/cache/IMGPATH +0 -1
- data/doc/allison/cache/INDEX +0 -1
- data/doc/allison/cache/JAVASCRIPT +0 -307
- data/doc/allison/cache/METHOD_INDEX +0 -4
- data/doc/allison/cache/METHOD_LIST +0 -1
- data/doc/allison/cache/SRC_PAGE +0 -1
- data/doc/allison/cache/STYLE +0 -321
- data/doc/allison/cache/URL +0 -1
- data/doc/changes.txt +0 -3375
- data/doc/changes.xml +0 -3378
- data/examples/todolist/conf/benchmark.yaml +0 -35
- data/examples/todolist/conf/debug.yaml +0 -34
- data/examples/todolist/conf/live.yaml +0 -33
- data/examples/todolist/conf/silent.yaml +0 -31
- data/examples/todolist/conf/stage.yaml +0 -33
- data/examples/todolist/public/css/coderay.css +0 -105
- data/examples/todolist/public/css/ramaze_error.css +0 -42
- data/lib/proto/conf/benchmark.yaml +0 -21
- data/lib/proto/conf/debug.yaml +0 -21
- data/lib/proto/conf/live.yaml +0 -21
- data/lib/proto/conf/silent.yaml +0 -21
- data/lib/proto/conf/stage.yaml +0 -21
- data/lib/proto/public/css/coderay.css +0 -105
- data/lib/ramaze/http_status.rb +0 -66
- data/lib/ramaze/snippets/hash/keys_to_sym.rb +0 -19
- data/lib/ramaze/snippets/kernel/method.rb +0 -26
- data/lib/ramaze/snippets/method/name.rb +0 -22
- data/lib/ramaze/snippets/ramaze/autoreload.rb +0 -135
- data/lib/ramaze/snippets/rdoc/usage_no_exit.rb +0 -65
- data/spec/all.rb +0 -32
- data/spec/ramaze/conf/locale_de.yaml +0 -6
- data/spec/ramaze/conf/locale_en.yaml +0 -6
- data/spec/ramaze/dependencies.rb +0 -16
- data/spec/ramaze/global.rb +0 -44
data/doc/README.html
DELETED
@@ -1,637 +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>Fri May 11 20:47:35 +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, Lighttpd or Nginx.
|
127
|
-
</pre>
|
128
|
-
</li>
|
129
|
-
<li>Templates
|
130
|
-
|
131
|
-
<ul>
|
132
|
-
<li>[Amrita2](<a
|
133
|
-
href="http://amrita2.rubyforge.org">amrita2.rubyforge.org</a>/)
|
134
|
-
|
135
|
-
<p>
|
136
|
-
Amrita2 is a xml/xhtml template library for Ruby. It makes html documents
|
137
|
-
from a template and a model data.
|
138
|
-
</p>
|
139
|
-
</li>
|
140
|
-
<li>[Erubis](<a
|
141
|
-
href="http://rubyforge.org/projects/erubis">rubyforge.org/projects/erubis</a>)
|
142
|
-
|
143
|
-
<p>
|
144
|
-
Erubis is a fast, secure, and very extensible implementation of eRuby.
|
145
|
-
</p>
|
146
|
-
</li>
|
147
|
-
<li>[Haml](<a href="http://haml.hamptoncatlin.com">haml.hamptoncatlin.com</a>/)
|
148
|
-
|
149
|
-
<p>
|
150
|
-
Haml takes your gross, ugly templates and replaces them with veritable
|
151
|
-
Haiku.
|
152
|
-
</p>
|
153
|
-
</li>
|
154
|
-
<li>[Liquid](<a
|
155
|
-
href="http://home.leetsoft.com/liquid">home.leetsoft.com/liquid</a>)
|
156
|
-
|
157
|
-
<p>
|
158
|
-
Liquid‘s syntax and parse model are inspired by Django templates, as
|
159
|
-
well as PHP‘s smarty.
|
160
|
-
</p>
|
161
|
-
</li>
|
162
|
-
<li>[Markaby](<a
|
163
|
-
href="http://code.whytheluckystiff.net/markaby">code.whytheluckystiff.net/markaby</a>/)
|
164
|
-
|
165
|
-
<p>
|
166
|
-
Markaby means Markup as Ruby.
|
167
|
-
</p>
|
168
|
-
</li>
|
169
|
-
<li>Ezamar
|
170
|
-
|
171
|
-
<p>
|
172
|
-
A simple homage to [Nitro](<a
|
173
|
-
href="http://nitroproject.org)s">nitroproject.org)s</a> templating.
|
174
|
-
</p>
|
175
|
-
</li>
|
176
|
-
</ul>
|
177
|
-
</li>
|
178
|
-
<li>Cache
|
179
|
-
|
180
|
-
<ul>
|
181
|
-
<li>Hash
|
182
|
-
|
183
|
-
</li>
|
184
|
-
<li>YAML::Store
|
185
|
-
|
186
|
-
</li>
|
187
|
-
<li>MemCache
|
188
|
-
|
189
|
-
</li>
|
190
|
-
</ul>
|
191
|
-
</li>
|
192
|
-
<li>Helper
|
193
|
-
|
194
|
-
<ul>
|
195
|
-
<li>Aspect
|
196
|
-
|
197
|
-
</li>
|
198
|
-
<li>Auth
|
199
|
-
|
200
|
-
</li>
|
201
|
-
<li>Cache
|
202
|
-
|
203
|
-
</li>
|
204
|
-
<li>Feed
|
205
|
-
|
206
|
-
</li>
|
207
|
-
<li>Flash
|
208
|
-
|
209
|
-
</li>
|
210
|
-
<li>Form
|
211
|
-
|
212
|
-
</li>
|
213
|
-
<li>Link
|
214
|
-
|
215
|
-
</li>
|
216
|
-
<li>OpenID
|
217
|
-
|
218
|
-
</li>
|
219
|
-
<li>Redirect
|
220
|
-
|
221
|
-
</li>
|
222
|
-
<li>Stack
|
223
|
-
|
224
|
-
</li>
|
225
|
-
</ul>
|
226
|
-
</li>
|
227
|
-
<li>Various
|
228
|
-
|
229
|
-
<ul>
|
230
|
-
<li>Sessions
|
231
|
-
|
232
|
-
</li>
|
233
|
-
<li>Global configuration system
|
234
|
-
|
235
|
-
</li>
|
236
|
-
<li>Simple request/response handling
|
237
|
-
|
238
|
-
</li>
|
239
|
-
<li>Custom Error-handling
|
240
|
-
|
241
|
-
</li>
|
242
|
-
</ul>
|
243
|
-
</li>
|
244
|
-
</ul>
|
245
|
-
<h1>Basic Principles</h1>
|
246
|
-
<p>
|
247
|
-
There are some basic principles that Ramaze tries to follow:
|
248
|
-
</p>
|
249
|
-
<ul>
|
250
|
-
<li>KISS (Keep It Super Simple)
|
251
|
-
|
252
|
-
<p>
|
253
|
-
Ramaze doesn‘t introduce any major change of paradigm for everyone
|
254
|
-
familiar with Ruby and the basics of Web-development.
|
255
|
-
</p>
|
256
|
-
</li>
|
257
|
-
<li>POLS (Principle Of Least Surprise)
|
258
|
-
|
259
|
-
<p>
|
260
|
-
Ramaze tries to be intuitive and easy to learn. Most functionality is built
|
261
|
-
in a way to help, not to obfuscate or confuse.
|
262
|
-
</p>
|
263
|
-
</li>
|
264
|
-
<li>Modular design
|
265
|
-
|
266
|
-
<p>
|
267
|
-
Use what you want and how you want it.
|
268
|
-
</p>
|
269
|
-
<p>
|
270
|
-
Through Ruby Ramaze provides one of the most powerful programming-languages
|
271
|
-
available, giving you full control over your system.
|
272
|
-
</p>
|
273
|
-
<p>
|
274
|
-
Even the most essential parts of Ramaze can easily be replaced and/or
|
275
|
-
modified without losing the advantage of the whole framework.
|
276
|
-
</p>
|
277
|
-
</li>
|
278
|
-
<li>Minimal dependencies
|
279
|
-
|
280
|
-
<p>
|
281
|
-
Nothing besides Ruby is required for the basic features.
|
282
|
-
</p>
|
283
|
-
<p>
|
284
|
-
Of course you can take advantage of several wonderful libraries, but Ramaze
|
285
|
-
is built in a way to be run on any basic setup.
|
286
|
-
</p>
|
287
|
-
</li>
|
288
|
-
<li>Documentation
|
289
|
-
|
290
|
-
<p>
|
291
|
-
Document everything, classes, modules, methods, configuration…
|
292
|
-
</p>
|
293
|
-
<p>
|
294
|
-
Through 100% documentation Ramaze gives the developer easy and solid
|
295
|
-
understanding of the underlying concepts and functionality.
|
296
|
-
</p>
|
297
|
-
</li>
|
298
|
-
<li>Open development
|
299
|
-
|
300
|
-
<p>
|
301
|
-
Everyone is welcome to contribute to Ramaze in the easiest way possible.
|
302
|
-
The repository is open for patches passing the Test-suite.
|
303
|
-
</p>
|
304
|
-
</li>
|
305
|
-
<li>Examples
|
306
|
-
|
307
|
-
<p>
|
308
|
-
Everyone learns different, some only read the source, others browse
|
309
|
-
documentation, but everyone loves examples for a quick and painless start.
|
310
|
-
</p>
|
311
|
-
<p>
|
312
|
-
Ramaze addresses this need and offers a wide variety of examples of usage,
|
313
|
-
basic functionality, project-layout and more advanced applications.
|
314
|
-
</p>
|
315
|
-
</li>
|
316
|
-
<li>Fully BDD (Behaviour Driven Design)
|
317
|
-
|
318
|
-
<p>
|
319
|
-
Ramaze has a very complete set of so-called specifications built by RSpec.
|
320
|
-
These specs define the way Ramaze has to behave.
|
321
|
-
</p>
|
322
|
-
<p>
|
323
|
-
The specs are checked every time a new patch is pushed into the repository,
|
324
|
-
deciding whether the changes the patch applies are valid and don‘t
|
325
|
-
break the framework.
|
326
|
-
</p>
|
327
|
-
</li>
|
328
|
-
</ul>
|
329
|
-
<h1>Installation</h1>
|
330
|
-
<ul>
|
331
|
-
<li>via RubyGems
|
332
|
-
|
333
|
-
<p>
|
334
|
-
The simplest way of installing Ramaze is via
|
335
|
-
</p>
|
336
|
-
<pre>
|
337
|
-
$ gem install ramaze
|
338
|
-
</pre>
|
339
|
-
<p>
|
340
|
-
in case you have RubyGems installed. (this will work as soon as I have
|
341
|
-
registered on RubyForge ;)
|
342
|
-
</p>
|
343
|
-
</li>
|
344
|
-
<li>via darcs
|
345
|
-
|
346
|
-
<p>
|
347
|
-
To get the latest and sweetest, you can just pull from the repository and
|
348
|
-
run Ramaze that way.
|
349
|
-
</p>
|
350
|
-
<pre>
|
351
|
-
$ darcs get --partial http://manveru.mine.nu/ramaze
|
352
|
-
</pre>
|
353
|
-
<p>
|
354
|
-
Please read the man page or `darcs help` for more information about
|
355
|
-
updating and creating your own patches. This is at the moment the premier
|
356
|
-
way to use Ramaze, since it is the way I use it.
|
357
|
-
</p>
|
358
|
-
<p>
|
359
|
-
Some hints for the usage of Darcs.
|
360
|
-
</p>
|
361
|
-
<ul>
|
362
|
-
<li>use require ‘ramaze’ from everywhere
|
363
|
-
|
364
|
-
<p>
|
365
|
-
add a file to your site_ruby named ‘ramaze.rb’ the content
|
366
|
-
should be: "require
|
367
|
-
’/path/to/darcs/repo/ramaze/lib/ramaze’"
|
368
|
-
</p>
|
369
|
-
</li>
|
370
|
-
<li>get the latest version (from inside the ramaze-directory)
|
371
|
-
|
372
|
-
<p>
|
373
|
-
$ darcs pull
|
374
|
-
</p>
|
375
|
-
</li>
|
376
|
-
<li>record a patch
|
377
|
-
|
378
|
-
<p>
|
379
|
-
$ darcs record
|
380
|
-
</p>
|
381
|
-
</li>
|
382
|
-
<li>output your patches into a bundle ready to be mailed (compress it before
|
383
|
-
sending to make sure it arrives in the way you sent it)
|
384
|
-
|
385
|
-
<p>
|
386
|
-
$ darcs send -o ramaze_bundle $ gzip -c ramaze_bundle > ramaze_bundle.gz
|
387
|
-
</p>
|
388
|
-
</li>
|
389
|
-
</ul>
|
390
|
-
</li>
|
391
|
-
<li>via install.rb
|
392
|
-
|
393
|
-
<p>
|
394
|
-
Support for install.rb has been canceled and the file removed.
|
395
|
-
</p>
|
396
|
-
</li>
|
397
|
-
</ul>
|
398
|
-
<h1>Getting Started</h1>
|
399
|
-
<p>
|
400
|
-
Now that you have a vague idea of what you‘re about to get into you
|
401
|
-
might just want to get a way to get up and running ASAP. Please read below
|
402
|
-
for more information about installation.
|
403
|
-
</p>
|
404
|
-
<p>
|
405
|
-
Depending on what you are planning to do you can either just go and start
|
406
|
-
reading the source or directly get some hands-on experience by trying some
|
407
|
-
of the examples. Most things will require dependencies though. The basic
|
408
|
-
functionality is provided by the WEBrick adapter and the Template::Ramaze,
|
409
|
-
which just run out of the box. For more features you will have to install
|
410
|
-
some templating-engines and mongrel (<em>very</em> recommended). Ramaze
|
411
|
-
will inform you when it needs further dependencies, so just go and try some
|
412
|
-
things.
|
413
|
-
</p>
|
414
|
-
<p>
|
415
|
-
Some places to get started are:
|
416
|
-
</p>
|
417
|
-
<ul>
|
418
|
-
<li>Read the documentation.
|
419
|
-
|
420
|
-
</li>
|
421
|
-
<li>Run and read the test cases.
|
422
|
-
|
423
|
-
</li>
|
424
|
-
<li>Look at the examples and run/modify them.
|
425
|
-
|
426
|
-
</li>
|
427
|
-
</ul>
|
428
|
-
<h1>A couple of Examples</h1>
|
429
|
-
<p>
|
430
|
-
There are some examples for your instant pleasure inside the
|
431
|
-
examples-directory in the Ramaze-distribution. To start up an example, you
|
432
|
-
can use the Ramaze binary located in bin/ramaze for example:
|
433
|
-
</p>
|
434
|
-
<pre>
|
435
|
-
$ ramaze examples/hello.rb
|
436
|
-
</pre>
|
437
|
-
<p>
|
438
|
-
Or:
|
439
|
-
</p>
|
440
|
-
<pre>
|
441
|
-
$ cd examples/blog
|
442
|
-
$ ramaze
|
443
|
-
</pre>
|
444
|
-
<p>
|
445
|
-
Since ramaze uses the main.rb by default if you don‘t pass anything
|
446
|
-
else.
|
447
|
-
</p>
|
448
|
-
<p>
|
449
|
-
For more information about the usage of ramaze try:
|
450
|
-
</p>
|
451
|
-
<pre>
|
452
|
-
$ ramaze --help
|
453
|
-
</pre>
|
454
|
-
<p>
|
455
|
-
Examples include:
|
456
|
-
</p>
|
457
|
-
<ul>
|
458
|
-
<li>examples/hello.rb Hello, World!
|
459
|
-
|
460
|
-
</li>
|
461
|
-
<li>examples/simple.rb A bit more advanced than the hello-example, but still
|
462
|
-
very basic.
|
463
|
-
|
464
|
-
</li>
|
465
|
-
<li>examples/blog Not yet fully functional, but coming along.
|
466
|
-
|
467
|
-
</li>
|
468
|
-
<li>examples/whywiki A basic examples of a minimalistic application, based on
|
469
|
-
the Wiki of _why in his camping-framework.
|
470
|
-
|
471
|
-
</li>
|
472
|
-
<li>examples/templates examples of real usage of the templating-engines. Tries
|
473
|
-
to implement the same functionality in each template_*.rb file using a
|
474
|
-
different engine.
|
475
|
-
|
476
|
-
</li>
|
477
|
-
</ul>
|
478
|
-
<h1>How to find Help</h1>
|
479
|
-
<p>
|
480
|
-
For help you can:
|
481
|
-
</p>
|
482
|
-
<ul>
|
483
|
-
<li>Visit us in the channel ramaze on irc.freenode.net
|
484
|
-
|
485
|
-
</li>
|
486
|
-
<li>Join the Mailinglist at <a
|
487
|
-
href="http://ramaze.rubyforge.org">ramaze.rubyforge.org</a>
|
488
|
-
|
489
|
-
</li>
|
490
|
-
</ul>
|
491
|
-
<h1>Appendix</h1>
|
492
|
-
<ul>
|
493
|
-
<li>Nicer Error-pages
|
494
|
-
|
495
|
-
<ul>
|
496
|
-
<li>Install coderay (it‘s a gem)
|
497
|
-
|
498
|
-
</li>
|
499
|
-
</ul>
|
500
|
-
</li>
|
501
|
-
<li>Performance
|
502
|
-
|
503
|
-
<ul>
|
504
|
-
<li>Serving
|
505
|
-
|
506
|
-
<p>
|
507
|
-
For best performance you should consider using Mongrel to host your
|
508
|
-
application.
|
509
|
-
</p>
|
510
|
-
</li>
|
511
|
-
<li>Caching
|
512
|
-
|
513
|
-
<p>
|
514
|
-
You can easily cache your pages using the CacheHelper. Also, using MemCache
|
515
|
-
gives you high-end performance and security.
|
516
|
-
</p>
|
517
|
-
</li>
|
518
|
-
</ul>
|
519
|
-
</li>
|
520
|
-
</ul>
|
521
|
-
<h1>And thanks to…</h1>
|
522
|
-
<p>
|
523
|
-
There is a large number of people who made Ramaze possibe by their ongoing
|
524
|
-
efforts in the world of open source and by encouraging and helping me.
|
525
|
-
</p>
|
526
|
-
<p>
|
527
|
-
This list is by no means a full listing of all these people, but I try to
|
528
|
-
get a good coverage despite that.
|
529
|
-
</p>
|
530
|
-
<p>
|
531
|
-
I would like to thank:
|
532
|
-
</p>
|
533
|
-
<ul>
|
534
|
-
<li>Yukihiro Matsumoto a.k.a matz
|
535
|
-
|
536
|
-
<pre>
|
537
|
-
For giving the world Ruby and bringing fun back into programming.
|
538
|
-
</pre>
|
539
|
-
</li>
|
540
|
-
<li>Zed Shawn a.k.a. zedas
|
541
|
-
|
542
|
-
<pre>
|
543
|
-
For developing Mongrel, Ramaze started out as a simple Hello World based
|
544
|
-
on that awesome server.
|
545
|
-
</pre>
|
546
|
-
</li>
|
547
|
-
<li>Christian Neukirchen a.k.a chris2
|
548
|
-
|
549
|
-
<pre>
|
550
|
-
For building rack, which is just what the numerous web-developers had
|
551
|
-
anticipated and which will, with no doubt, change the world.
|
552
|
-
</pre>
|
553
|
-
</li>
|
554
|
-
<li>Pistos
|
555
|
-
|
556
|
-
<pre>
|
557
|
-
For continious encouragment and building the first real webpage on Ramaze.
|
558
|
-
His bugreports were invaluable.
|
559
|
-
</pre>
|
560
|
-
</li>
|
561
|
-
<li>Jim Weirich
|
562
|
-
|
563
|
-
<pre>
|
564
|
-
For Rake, which lifts off a lot of tasks from the shoulders of every
|
565
|
-
developer who uses it.
|
566
|
-
</pre>
|
567
|
-
</li>
|
568
|
-
<li>Thomas Sawyer a.k.a Trans
|
569
|
-
|
570
|
-
<pre>
|
571
|
-
Dragging me deep into the rabbit-hole and showing me how awesome Ruby
|
572
|
-
truely is through his work on facets, ratchets and tons of other projects.
|
573
|
-
</pre>
|
574
|
-
</li>
|
575
|
-
<li>George Moschovitis a.k.a gmosx
|
576
|
-
|
577
|
-
<pre>
|
578
|
-
For his tremendous efforts in the Nitro/Og framework, which is a source of
|
579
|
-
steady inspiration for Ramaze and brought me to Ruby in the first place.
|
580
|
-
</pre>
|
581
|
-
</li>
|
582
|
-
<li>Rob Levin a.k.a. lilo
|
583
|
-
|
584
|
-
<pre>
|
585
|
-
He founded the most excellent Freenode IRC-network, where the most important
|
586
|
-
channels for rubyists are located (as is #ramaze).
|
587
|
-
May he rest in peace.
|
588
|
-
</pre>
|
589
|
-
</li>
|
590
|
-
<li>The guys (and gals) in the various channels on Freenode
|
591
|
-
|
592
|
-
<pre>
|
593
|
-
As the people are way too many to be listed, here the channels that i call
|
594
|
-
my online home.
|
595
|
-
All the people in there deserve special thanks for getting me hooked to Ruby
|
596
|
-
and providing their help in a friendly and patient manner.
|
597
|
-
|
598
|
-
* #nitro
|
599
|
-
* #ruby-de
|
600
|
-
* #ruby-lang
|
601
|
-
* #rubyforce
|
602
|
-
</pre>
|
603
|
-
</li>
|
604
|
-
</ul>
|
605
|
-
|
606
|
-
</div>
|
607
|
-
|
608
|
-
|
609
|
-
</div>
|
610
|
-
|
611
|
-
|
612
|
-
</div>
|
613
|
-
|
614
|
-
|
615
|
-
<!-- if includes -->
|
616
|
-
|
617
|
-
<div id="section">
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
<!-- if method_list -->
|
627
|
-
|
628
|
-
|
629
|
-
</div>
|
630
|
-
|
631
|
-
|
632
|
-
<div id="validator-badges">
|
633
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
634
|
-
</div>
|
635
|
-
|
636
|
-
</body>
|
637
|
-
</html>
|