Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 881 Bytes
1 | # Rackup config that serves the contents of Rack::Cache's |
2 | # doc directory. The documentation is rebuilt on each request. |
3 | |
4 | # Rewrites URLs like conventional web server configs. |
5 | class Rewriter < Struct.new(:app) |
6 | def call(env) |
7 | if env['PATH_INFO'] =~ /\/$/ |
8 | env['PATH_INFO'] += 'index.html' |
9 | elsif env['PATH_INFO'] !~ /\.\w+$/ |
10 | env['PATH_INFO'] += '.html' |
11 | end |
12 | app.call(env) |
13 | end |
14 | end |
15 | |
16 | # Rebuilds documentation on each request. |
17 | class DocBuilder < Struct.new(:app) |
18 | def call(env) |
19 | if env['PATH_INFO'] !~ /\.(css|js|gif|jpg|png|ico)$/ |
20 | env['rack.errors'] << "*** rebuilding documentation (rake -s doc)\n" |
21 | system "rake -s doc" |
22 | end |
23 | app.call(env) |
24 | end |
25 | end |
26 | |
27 | use Rack::CommonLogger |
28 | use DocBuilder |
29 | use Rewriter |
30 | use Rack::Static, :root => File.dirname(__FILE__), :urls => ["/"] |
31 | |
32 | run(lambda{|env| [404,{},'<h1>Not Found</h1>']}) |
33 | |
34 | # vim: ft=ruby |