nitro 0.3.0 → 0.4.1
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.
- data/ChangeLog +284 -0
- data/{LICENCE → LICENSE} +1 -1
- data/README +13 -17
- data/RELEASES +13 -1
- data/Rakefile +1 -9
- data/bin/cluster.rb +5 -5
- data/examples/blog/README +45 -0
- data/examples/blog/apache.conf +0 -0
- data/examples/blog/app.rb +21 -0
- data/examples/blog/config.rb +88 -0
- data/examples/blog/lib/blog.rb +104 -0
- data/examples/blog/log/app.log +117 -0
- data/examples/blog/root/comments.xhtml +38 -0
- data/examples/blog/root/entry_form.xhtml +18 -0
- data/examples/blog/root/index.xhtml +43 -0
- data/examples/blog/root/login.xhtml +24 -0
- data/examples/blog/root/m/bubbles.gif +0 -0
- data/examples/blog/root/m/comments_curve.gif +0 -0
- data/examples/blog/root/m/down.gif +0 -0
- data/examples/blog/root/m/footer_bg.gif +0 -0
- data/examples/blog/root/m/garrow.gif +0 -0
- data/examples/blog/root/m/gbull.gif +0 -0
- data/examples/blog/root/m/grbull.gif +0 -0
- data/examples/blog/root/m/h1_bg.gif +0 -0
- data/examples/blog/root/m/header_bg.gif +0 -0
- data/examples/blog/root/m/obull.gif +0 -0
- data/examples/blog/root/m/page_bg.gif +0 -0
- data/examples/blog/root/m/side_title_bg.gif +0 -0
- data/examples/blog/root/m/sidebar_bg.gif +0 -0
- data/examples/blog/root/recent_posts.xhtml +14 -0
- data/examples/blog/root/style.css +201 -0
- data/examples/blog/root/style.xsl +118 -0
- data/examples/blog/root/view_entry.xhtml +29 -0
- data/examples/og/run.rb +27 -29
- data/examples/tiny/README +3 -4
- data/examples/tiny/app.rb +6 -16
- data/examples/tiny/config.rb +30 -0
- data/examples/tiny/log/app.log +23 -0
- data/examples/tiny/root/{index.sx → index.xhtml} +3 -6
- data/lib/{n/std.rb → nitro.rb} +9 -4
- data/lib/{n → nitro}/application.rb +13 -7
- data/lib/{n → nitro}/config.rb +38 -8
- data/lib/{n → nitro}/events.rb +1 -1
- data/lib/{n → nitro}/l10n.rb +1 -1
- data/lib/{n → nitro}/logger.rb +8 -8
- data/lib/{n → nitro}/macros.rb +3 -3
- data/lib/{n → nitro}/mixins.rb +1 -1
- data/lib/nitro/properties.rb +301 -0
- data/lib/{n → nitro}/server.rb +2 -2
- data/lib/{n → nitro}/server/appserver.rb +14 -5
- data/lib/{n → nitro}/server/cluster.rb +5 -5
- data/lib/{n → nitro}/server/cookie.rb +1 -1
- data/lib/nitro/server/dispatcher.rb +66 -0
- data/lib/{n → nitro}/server/filters.rb +7 -7
- data/lib/{n → nitro}/server/filters/autologin.rb +3 -3
- data/lib/{n → nitro}/server/fragment.rb +3 -3
- data/lib/{n → nitro}/server/handlers.rb +3 -3
- data/lib/nitro/server/render.rb +200 -0
- data/lib/{n → nitro}/server/request.rb +6 -6
- data/lib/{n → nitro}/server/requestpart.rb +5 -5
- data/lib/{n → nitro}/server/script.rb +3 -3
- data/lib/{n → nitro}/server/server.rb +4 -4
- data/lib/{n → nitro}/server/session.rb +3 -3
- data/lib/nitro/server/shaders.rb +165 -0
- data/lib/{n → nitro}/server/user.rb +1 -1
- data/lib/nitro/server/webrick.rb +175 -0
- data/lib/nitro/service.rb +25 -0
- data/lib/{n → nitro}/sitemap.rb +2 -2
- data/lib/{n → nitro}/ui/date-select.rb +0 -0
- data/lib/{n → nitro}/ui/pager.rb +1 -1
- data/lib/{n → nitro}/ui/popup.rb +1 -1
- data/lib/{n → nitro}/ui/select.rb +1 -1
- data/lib/{n → nitro}/ui/tabs.rb +1 -1
- data/lib/{n → nitro}/utils/array.rb +1 -1
- data/lib/{n → nitro}/utils/cache.rb +1 -1
- data/lib/{n → nitro}/utils/gfx.rb +1 -1
- data/lib/{n → nitro}/utils/hash.rb +1 -1
- data/lib/{n → nitro}/utils/html.rb +1 -1
- data/lib/{n → nitro}/utils/http.rb +1 -1
- data/lib/{n → nitro}/utils/mail.rb +1 -1
- data/lib/{n → nitro}/utils/number.rb +1 -1
- data/lib/{n → nitro}/utils/pool.rb +1 -1
- data/lib/{n → nitro}/utils/string.rb +19 -95
- data/lib/{n → nitro}/utils/template.rb +0 -0
- data/lib/{n → nitro}/utils/time.rb +1 -1
- data/lib/{n → nitro}/utils/uri.rb +3 -3
- data/lib/nitro/version.rb +11 -0
- data/lib/{n/og.rb → og.rb} +61 -31
- data/lib/{n/og → og}/backend.rb +13 -7
- data/lib/{n/og → og}/backends/mysql.rb +43 -39
- data/lib/{n/og → og}/backends/psql.rb +42 -38
- data/lib/{n/og → og}/connection.rb +21 -9
- data/lib/{n/og → og}/meta.rb +18 -12
- data/lib/xsl/base.xsl +11 -88
- data/test/n/server/tc_cookie.rb +1 -1
- data/test/n/server/tc_filters.rb +1 -1
- data/test/n/server/tc_request.rb +3 -3
- data/test/n/server/tc_requestpart.rb +2 -2
- data/test/n/server/tc_session.rb +1 -1
- data/test/n/tc_events.rb +1 -1
- data/test/n/tc_og.rb +16 -18
- data/test/n/tc_properties.rb +22 -18
- data/test/n/tc_sitemap.rb +2 -2
- data/test/n/ui/tc_pager.rb +4 -4
- data/test/n/utils/tc_cache.rb +1 -1
- data/test/n/utils/tc_hash.rb +1 -1
- data/test/n/utils/tc_html.rb +1 -1
- data/test/n/utils/tc_http.rb +1 -1
- data/test/n/utils/tc_number.rb +1 -1
- data/test/n/utils/tc_strings.rb +1 -46
- data/test/n/utils/tc_uri.rb +1 -1
- metadata +101 -108
- data/examples/simple/README +0 -42
- data/examples/simple/app.rb +0 -31
- data/examples/simple/conf/apache.conf +0 -100
- data/examples/simple/conf/config.rb +0 -72
- data/examples/simple/conf/debug-config.rb +0 -26
- data/examples/simple/conf/live-config.rb +0 -26
- data/examples/simple/conf/requires.rb +0 -43
- data/examples/simple/ctl +0 -32
- data/examples/simple/env.rb +0 -32
- data/examples/simple/install.rb +0 -12
- data/examples/simple/lib/articles/entities.rb +0 -37
- data/examples/simple/lib/articles/lc-en.rb +0 -36
- data/examples/simple/lib/articles/methods.rb +0 -55
- data/examples/simple/lib/articles/part.rb +0 -57
- data/examples/simple/root/add-article.sx +0 -15
- data/examples/simple/root/article-form.ss +0 -20
- data/examples/simple/root/comments-form.ss +0 -16
- data/examples/simple/root/comments.si +0 -30
- data/examples/simple/root/index.sx +0 -44
- data/examples/simple/root/shader/shader.xsl +0 -100
- data/examples/simple/root/shader/style.css +0 -9
- data/examples/simple/root/view-article.sx +0 -29
- data/examples/tiny/conf/config.rb +0 -62
- data/examples/tiny/conf/requires.rb +0 -33
- data/examples/tiny/ctl +0 -16
- data/lib/n/parts.rb +0 -157
- data/lib/n/properties.rb +0 -199
- data/lib/n/server/dispatcher.rb +0 -55
- data/lib/n/server/handlers/code-handler.rb +0 -182
- data/lib/n/server/handlers/page-handler.rb +0 -612
- data/lib/n/server/webrick.rb +0 -283
- data/lib/n/shaders.rb +0 -166
- data/lib/n/sync/clc.rb +0 -110
- data/lib/n/sync/handler.rb +0 -229
- data/lib/n/sync/server.rb +0 -176
- data/lib/p/README +0 -1
data/test/n/utils/tc_uri.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.1
|
|
3
3
|
specification_version: 1
|
4
4
|
name: nitro
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2004-11-
|
6
|
+
version: 0.4.1
|
7
|
+
date: 2004-11-15
|
8
8
|
summary: Web Engine
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -26,130 +26,123 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
26
26
|
version:
|
27
27
|
platform: ruby
|
28
28
|
files:
|
29
|
-
- LICENCE
|
30
29
|
- AUTHORS
|
31
30
|
- RELEASES
|
31
|
+
- LICENSE
|
32
32
|
- README
|
33
33
|
- ChangeLog
|
34
34
|
- Rakefile
|
35
35
|
- bin/cluster.rb
|
36
36
|
- bin/new_app.rb
|
37
37
|
- examples/tiny
|
38
|
+
- examples/blog
|
38
39
|
- examples/og
|
39
|
-
- examples/
|
40
|
-
- examples/tiny/conf
|
40
|
+
- examples/tiny/log
|
41
41
|
- examples/tiny/app.rb
|
42
|
-
- examples/tiny/logs
|
43
42
|
- examples/tiny/root
|
44
43
|
- examples/tiny/README
|
45
|
-
- examples/tiny/
|
46
|
-
- examples/tiny/
|
47
|
-
- examples/tiny/
|
48
|
-
- examples/
|
44
|
+
- examples/tiny/config.rb
|
45
|
+
- examples/tiny/log/app.log
|
46
|
+
- examples/tiny/root/index.xhtml
|
47
|
+
- examples/blog/log
|
48
|
+
- examples/blog/app.rb
|
49
|
+
- examples/blog/apache.conf
|
50
|
+
- examples/blog/root
|
51
|
+
- examples/blog/README
|
52
|
+
- examples/blog/config.rb
|
53
|
+
- examples/blog/lib
|
54
|
+
- examples/blog/log/app.log
|
55
|
+
- examples/blog/root/login.xhtml
|
56
|
+
- examples/blog/root/style.xsl
|
57
|
+
- examples/blog/root/entry_form.xhtml
|
58
|
+
- examples/blog/root/m
|
59
|
+
- examples/blog/root/recent_posts.xhtml
|
60
|
+
- examples/blog/root/view_entry.xhtml
|
61
|
+
- examples/blog/root/comments.xhtml
|
62
|
+
- examples/blog/root/style.css
|
63
|
+
- examples/blog/root/index.xhtml
|
64
|
+
- examples/blog/root/m/bubbles.gif
|
65
|
+
- examples/blog/root/m/footer_bg.gif
|
66
|
+
- examples/blog/root/m/page_bg.gif
|
67
|
+
- examples/blog/root/m/obull.gif
|
68
|
+
- examples/blog/root/m/header_bg.gif
|
69
|
+
- examples/blog/root/m/sidebar_bg.gif
|
70
|
+
- examples/blog/root/m/garrow.gif
|
71
|
+
- examples/blog/root/m/gbull.gif
|
72
|
+
- examples/blog/root/m/down.gif
|
73
|
+
- examples/blog/root/m/comments_curve.gif
|
74
|
+
- examples/blog/root/m/side_title_bg.gif
|
75
|
+
- examples/blog/root/m/grbull.gif
|
76
|
+
- examples/blog/root/m/h1_bg.gif
|
77
|
+
- examples/blog/lib/blog.rb
|
49
78
|
- examples/og/run.rb
|
50
79
|
- examples/og/README
|
51
|
-
- examples/simple/conf
|
52
|
-
- examples/simple/app.rb
|
53
|
-
- examples/simple/install.rb
|
54
|
-
- examples/simple/env.rb
|
55
|
-
- examples/simple/logs
|
56
|
-
- examples/simple/root
|
57
|
-
- examples/simple/README
|
58
|
-
- examples/simple/ctl
|
59
|
-
- examples/simple/lib
|
60
|
-
- examples/simple/conf/requires.rb
|
61
|
-
- examples/simple/conf/apache.conf
|
62
|
-
- examples/simple/conf/live-config.rb
|
63
|
-
- examples/simple/conf/config.rb
|
64
|
-
- examples/simple/conf/debug-config.rb
|
65
|
-
- examples/simple/root/comments-form.ss
|
66
|
-
- examples/simple/root/view-article.sx
|
67
|
-
- examples/simple/root/comments.si
|
68
|
-
- examples/simple/root/shader
|
69
|
-
- examples/simple/root/etc
|
70
|
-
- examples/simple/root/index.sx
|
71
|
-
- examples/simple/root/add-article.sx
|
72
|
-
- examples/simple/root/article-form.ss
|
73
|
-
- examples/simple/root/shader/shader.xsl
|
74
|
-
- examples/simple/root/shader/style.css
|
75
|
-
- examples/simple/lib/articles
|
76
|
-
- examples/simple/lib/articles/lc-en.rb
|
77
|
-
- examples/simple/lib/articles/part.rb
|
78
|
-
- examples/simple/lib/articles/entities.rb
|
79
|
-
- examples/simple/lib/articles/methods.rb
|
80
80
|
- doc/bugs.txt
|
81
81
|
- doc/architecture.txt
|
82
|
-
- lib/
|
82
|
+
- lib/nitro
|
83
83
|
- lib/xsl
|
84
|
-
- lib/
|
85
|
-
- lib/
|
86
|
-
- lib/
|
87
|
-
- lib/
|
88
|
-
- lib/
|
89
|
-
- lib/
|
90
|
-
- lib/
|
91
|
-
- lib/
|
92
|
-
- lib/
|
93
|
-
- lib/
|
94
|
-
- lib/
|
95
|
-
- lib/
|
96
|
-
- lib/
|
97
|
-
- lib/
|
98
|
-
- lib/
|
99
|
-
- lib/
|
100
|
-
- lib/
|
101
|
-
- lib/
|
102
|
-
- lib/
|
103
|
-
- lib/
|
104
|
-
- lib/
|
105
|
-
- lib/
|
106
|
-
- lib/
|
107
|
-
- lib/
|
108
|
-
- lib/
|
109
|
-
- lib/
|
110
|
-
- lib/
|
111
|
-
- lib/
|
112
|
-
- lib/
|
113
|
-
- lib/
|
114
|
-
- lib/
|
115
|
-
- lib/
|
116
|
-
- lib/
|
117
|
-
- lib/
|
118
|
-
- lib/
|
119
|
-
- lib/
|
120
|
-
- lib/
|
121
|
-
- lib/
|
122
|
-
- lib/
|
123
|
-
- lib/
|
124
|
-
- lib/
|
125
|
-
- lib/
|
126
|
-
- lib/
|
127
|
-
- lib/
|
128
|
-
- lib/
|
129
|
-
- lib/
|
130
|
-
- lib/
|
131
|
-
- lib/
|
132
|
-
- lib/
|
133
|
-
- lib/
|
134
|
-
- lib/
|
135
|
-
- lib/
|
136
|
-
- lib/
|
137
|
-
- lib/
|
138
|
-
- lib/n/server/cookie.rb
|
139
|
-
- lib/n/server/user.rb
|
140
|
-
- lib/n/server/handlers.rb
|
141
|
-
- lib/n/server/webrick.rb
|
142
|
-
- lib/n/server/filters/autologin.rb
|
143
|
-
- lib/n/server/handlers/page-handler.rb
|
144
|
-
- lib/n/server/handlers/code-handler.rb
|
145
|
-
- lib/n/ui/popup.rb
|
146
|
-
- lib/n/ui/select.rb
|
147
|
-
- lib/n/ui/date-select.rb
|
148
|
-
- lib/n/ui/tabs.rb
|
149
|
-
- lib/n/ui/pager.rb
|
84
|
+
- lib/og
|
85
|
+
- lib/nitro.rb
|
86
|
+
- lib/og.rb
|
87
|
+
- lib/nitro/sitemap.rb
|
88
|
+
- lib/nitro/properties.rb
|
89
|
+
- lib/nitro/utils
|
90
|
+
- lib/nitro/macros.rb
|
91
|
+
- lib/nitro/service.rb
|
92
|
+
- lib/nitro/server.rb
|
93
|
+
- lib/nitro/server
|
94
|
+
- lib/nitro/events.rb
|
95
|
+
- lib/nitro/mixins.rb
|
96
|
+
- lib/nitro/l10n.rb
|
97
|
+
- lib/nitro/ui
|
98
|
+
- lib/nitro/application.rb
|
99
|
+
- lib/nitro/config.rb
|
100
|
+
- lib/nitro/logger.rb
|
101
|
+
- lib/nitro/version.rb
|
102
|
+
- lib/nitro/utils/pool.rb
|
103
|
+
- lib/nitro/utils/time.rb
|
104
|
+
- lib/nitro/utils/mail.rb
|
105
|
+
- lib/nitro/utils/array.rb
|
106
|
+
- lib/nitro/utils/number.rb
|
107
|
+
- lib/nitro/utils/uri.rb
|
108
|
+
- lib/nitro/utils/gfx.rb
|
109
|
+
- lib/nitro/utils/cache.rb
|
110
|
+
- lib/nitro/utils/html.rb
|
111
|
+
- lib/nitro/utils/template.rb
|
112
|
+
- lib/nitro/utils/string.rb
|
113
|
+
- lib/nitro/utils/http.rb
|
114
|
+
- lib/nitro/utils/hash.rb
|
115
|
+
- lib/nitro/server/filters
|
116
|
+
- lib/nitro/server/session.rb
|
117
|
+
- lib/nitro/server/request.rb
|
118
|
+
- lib/nitro/server/render.rb
|
119
|
+
- lib/nitro/server/requestpart.rb
|
120
|
+
- lib/nitro/server/appserver.rb
|
121
|
+
- lib/nitro/server/fragment.rb
|
122
|
+
- lib/nitro/server/dispatcher.rb
|
123
|
+
- lib/nitro/server/shaders.rb
|
124
|
+
- lib/nitro/server/script.rb
|
125
|
+
- lib/nitro/server/filters.rb
|
126
|
+
- lib/nitro/server/server.rb
|
127
|
+
- lib/nitro/server/cluster.rb
|
128
|
+
- lib/nitro/server/cookie.rb
|
129
|
+
- lib/nitro/server/user.rb
|
130
|
+
- lib/nitro/server/handlers.rb
|
131
|
+
- lib/nitro/server/webrick.rb
|
132
|
+
- lib/nitro/server/filters/autologin.rb
|
133
|
+
- lib/nitro/ui/popup.rb
|
134
|
+
- lib/nitro/ui/select.rb
|
135
|
+
- lib/nitro/ui/date-select.rb
|
136
|
+
- lib/nitro/ui/tabs.rb
|
137
|
+
- lib/nitro/ui/pager.rb
|
150
138
|
- lib/xsl/xforms.xsl
|
151
139
|
- lib/xsl/base.xsl
|
152
|
-
- lib/
|
140
|
+
- lib/og/backends
|
141
|
+
- lib/og/connection.rb
|
142
|
+
- lib/og/backend.rb
|
143
|
+
- lib/og/meta.rb
|
144
|
+
- lib/og/backends/psql.rb
|
145
|
+
- lib/og/backends/mysql.rb
|
153
146
|
- test/n
|
154
147
|
- test/n/utils
|
155
148
|
- test/n/tc_og.rb
|
@@ -178,9 +171,9 @@ rdoc_options:
|
|
178
171
|
- "--title"
|
179
172
|
- Nitro Documentation
|
180
173
|
extra_rdoc_files:
|
181
|
-
- LICENCE
|
182
174
|
- AUTHORS
|
183
175
|
- RELEASES
|
176
|
+
- LICENSE
|
184
177
|
- README
|
185
178
|
- ChangeLog
|
186
179
|
- Rakefile
|
data/examples/simple/README
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
= A Simple Web Application
|
2
|
-
|
3
|
-
This simple application demonstrates various Nitro features.
|
4
|
-
|
5
|
-
|
6
|
-
== Description of contents
|
7
|
-
|
8
|
-
conf/apache.conf
|
9
|
-
apache configuration
|
10
|
-
|
11
|
-
conf/config.rb
|
12
|
-
application configuration
|
13
|
-
|
14
|
-
root/
|
15
|
-
the public web directory
|
16
|
-
|
17
|
-
logs/
|
18
|
-
logfiles come here
|
19
|
-
|
20
|
-
lib/n/
|
21
|
-
application specific ruby code
|
22
|
-
|
23
|
-
lib/p/
|
24
|
-
application specific Nitro parts
|
25
|
-
|
26
|
-
test/
|
27
|
-
unit tests
|
28
|
-
|
29
|
-
|
30
|
-
== Setup
|
31
|
-
|
32
|
-
To setup this example web application run the follwing script:
|
33
|
-
|
34
|
-
$ ruby install.rb
|
35
|
-
|
36
|
-
To start the application
|
37
|
-
|
38
|
-
./ctl start
|
39
|
-
|
40
|
-
To stop the application
|
41
|
-
|
42
|
-
./ctl stop
|
data/examples/simple/app.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
#!/usr/local/bin/ruby
|
2
|
-
|
3
|
-
# = Simple Example
|
4
|
-
#
|
5
|
-
# A simple Web Application to demonstrate the Engine.
|
6
|
-
#
|
7
|
-
# code:
|
8
|
-
# * George Moschovitis <gm@navel.gr>
|
9
|
-
#
|
10
|
-
# (c) 2004 Navel, all rights reserved.
|
11
|
-
# $Id: app.rb 112 2004-10-27 10:59:55Z gmosx $
|
12
|
-
|
13
|
-
$:.unshift "simple/lib"
|
14
|
-
$:.unshift "../lib"
|
15
|
-
|
16
|
-
# Set this to false to optimize for speed.
|
17
|
-
$DBG = true
|
18
|
-
$DBG ? (require "simple/conf/debug-config") : (require "simple/conf/live-config")
|
19
|
-
|
20
|
-
require "n/server/webrick"
|
21
|
-
|
22
|
-
module App
|
23
|
-
|
24
|
-
class Server < N::Webrick
|
25
|
-
include App::Config
|
26
|
-
end
|
27
|
-
|
28
|
-
end # module
|
29
|
-
|
30
|
-
$app = App::Server.new.exec()
|
31
|
-
|
@@ -1,100 +0,0 @@
|
|
1
|
-
# Apache proxy configuration
|
2
|
-
# code: gmosx, drak, elathan, ekarak
|
3
|
-
|
4
|
-
# gmosx: FIXME (optimize this!)
|
5
|
-
LoadModule access_module /usr/lib/httpd/modules/mod_access.so
|
6
|
-
LoadModule log_config_module /usr/lib/httpd/modules/mod_log_config.so
|
7
|
-
LoadModule mime_magic_module /usr/lib/httpd/modules/mod_mime_magic.so
|
8
|
-
LoadModule expires_module /usr/lib/httpd/modules/mod_expires.so
|
9
|
-
LoadModule headers_module /usr/lib/httpd/modules/mod_headers.so
|
10
|
-
LoadModule mime_module /usr/lib/httpd/modules/mod_mime.so
|
11
|
-
LoadModule status_module /usr/lib/httpd/modules/mod_status.so
|
12
|
-
LoadModule autoindex_module /usr/lib/httpd/modules/mod_autoindex.so
|
13
|
-
LoadModule vhost_alias_module /usr/lib/httpd/modules/mod_vhost_alias.so
|
14
|
-
LoadModule dir_module /usr/lib/httpd/modules/mod_dir.so
|
15
|
-
LoadModule alias_module /usr/lib/httpd/modules/mod_alias.so
|
16
|
-
LoadModule rewrite_module /usr/lib/httpd/modules/mod_rewrite.so
|
17
|
-
LoadModule proxy_module /usr/lib/httpd/modules/mod_proxy.so
|
18
|
-
LoadModule proxy_http_module /usr/lib/httpd/modules/mod_proxy_http.so
|
19
|
-
LoadModule proxy_connect_module /usr/lib/httpd/modules/mod_proxy_connect.so
|
20
|
-
LoadModule cgi_module /usr/lib/httpd/modules/mod_cgi.so
|
21
|
-
|
22
|
-
Listen 8080
|
23
|
-
|
24
|
-
User navel
|
25
|
-
Group users
|
26
|
-
|
27
|
-
PidFile /tmp/simple-apache.pid
|
28
|
-
ErrorLog logs/apache.log
|
29
|
-
LogLevel warn
|
30
|
-
|
31
|
-
# used for debuging
|
32
|
-
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
33
|
-
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
34
|
-
CustomLog logs/access_log common
|
35
|
-
|
36
|
-
Timeout 300
|
37
|
-
|
38
|
-
# Keepalive
|
39
|
-
|
40
|
-
KeepAlive On
|
41
|
-
MaxKeepAliveRequests 64
|
42
|
-
KeepAliveTimeout 5
|
43
|
-
|
44
|
-
ServerTokens Off
|
45
|
-
ServerSignature Off
|
46
|
-
ExtendedStatus Off
|
47
|
-
|
48
|
-
UseCanonicalName Off
|
49
|
-
HostnameLookups Off
|
50
|
-
|
51
|
-
#DirectoryIndex index.sx
|
52
|
-
|
53
|
-
TypesConfig /etc/mime.types
|
54
|
-
DefaultType text/plain
|
55
|
-
|
56
|
-
MIMEMagicFile /etc/httpd/conf/magic
|
57
|
-
|
58
|
-
IndexOptions None
|
59
|
-
|
60
|
-
AddEncoding x-compress Z
|
61
|
-
AddEncoding x-gzip gz tgz
|
62
|
-
AddType application/x-tar .tgz
|
63
|
-
AddType image/x-icon .ico
|
64
|
-
AddType text/css .css # gmosx: needed! fixes a bug!
|
65
|
-
|
66
|
-
AddLanguage en .en
|
67
|
-
AddLanguage el .el
|
68
|
-
|
69
|
-
AddDefaultCharset ISO-8859-7
|
70
|
-
|
71
|
-
AddCharset ISO-8859-1 .iso8859-1 .latin1
|
72
|
-
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
|
73
|
-
AddCharset UTF-8 .utf8
|
74
|
-
|
75
|
-
# enable expirations
|
76
|
-
|
77
|
-
ExpiresActive On
|
78
|
-
|
79
|
-
# expire GIF images after a month in the client's cache
|
80
|
-
ExpiresByType image/gif A2592000
|
81
|
-
ExpiresByType image/jpg A2592000
|
82
|
-
ExpiresByType image/bmp A2592000
|
83
|
-
|
84
|
-
ExpiresByType text/css A2592000
|
85
|
-
ExpiresByType text/javascript A2592000
|
86
|
-
|
87
|
-
# prefork MPM
|
88
|
-
StartServers 5
|
89
|
-
MinSpareServers 1
|
90
|
-
MaxSpareServers 7
|
91
|
-
MaxClients 50
|
92
|
-
MaxRequestsPerChild 10000
|
93
|
-
|
94
|
-
DocumentRoot "/navel/nitro/examples/simple/root"
|
95
|
-
|
96
|
-
RewriteEngine on
|
97
|
-
|
98
|
-
RewriteRule ^/(.*[sr][bix])$ http://127.0.0.1:9090/$1 [P]
|
99
|
-
RewriteRule ^(.*)/$ http://127.0.0.1:9090$1/index.sx [P]
|
100
|
-
RewriteRule ^/([^\.]*)$ http://127.0.0.1:9090/$1/index.sx [P]
|
@@ -1,72 +0,0 @@
|
|
1
|
-
# = Configuration
|
2
|
-
#
|
3
|
-
# Use a separate file for configuration, makes the
|
4
|
-
# main file more readable, and allows for reconfiguring
|
5
|
-
# (reload) the webapp without restarting the server.
|
6
|
-
#
|
7
|
-
# code:
|
8
|
-
# * George Moschovitis <gm@navel.gr>
|
9
|
-
#
|
10
|
-
# (c) 2004 Navel, all rights reserved.
|
11
|
-
# $Id: config.rb 124 2004-11-01 12:34:17Z gmosx $
|
12
|
-
|
13
|
-
require "n/std"
|
14
|
-
require "n/properties"
|
15
|
-
require "n/logger"
|
16
|
-
require "n/config"
|
17
|
-
require "n/og"
|
18
|
-
require "n/server/cluster"
|
19
|
-
|
20
|
-
require "simple/conf/requires"
|
21
|
-
|
22
|
-
$name = "Simple"
|
23
|
-
$root_dir = "simple/root"
|
24
|
-
|
25
|
-
$srv_extension_map = {
|
26
|
-
"sx" => ["text/html",
|
27
|
-
# N::AutoLoginFilter.new(
|
28
|
-
N::PageHandler.new
|
29
|
-
# )
|
30
|
-
],
|
31
|
-
"si" => ["text/html",
|
32
|
-
N::PageHandler.new
|
33
|
-
],
|
34
|
-
"rx" => ["text/html",
|
35
|
-
# N::AutoLoginFilter.new(
|
36
|
-
N::CodeHandler.new
|
37
|
-
# )
|
38
|
-
]
|
39
|
-
}
|
40
|
-
|
41
|
-
# enable distributed sessions.
|
42
|
-
$drb_state = true
|
43
|
-
$drb_lm_server = "druby://:9000"
|
44
|
-
$drb_sessions_cluster = "druby://:8001"
|
45
|
-
|
46
|
-
module App
|
47
|
-
|
48
|
-
# Config
|
49
|
-
#
|
50
|
-
module Config
|
51
|
-
|
52
|
-
def initialize_sitemap
|
53
|
-
end
|
54
|
-
|
55
|
-
def initialize_shaders
|
56
|
-
$default_shader = N::Shader.new("simple", "#{$root_dir}/shader/shader.xsl")
|
57
|
-
end
|
58
|
-
|
59
|
-
def initialize_events
|
60
|
-
$events = $event_manager = N::EventManager.new($elog)
|
61
|
-
|
62
|
-
# Example event:
|
63
|
-
$events.add_handler(
|
64
|
-
"messages/add", "ranking", proc { |user|
|
65
|
-
# nop
|
66
|
-
}
|
67
|
-
)
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
71
|
-
|
72
|
-
end # module
|