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.
Files changed (148) hide show
  1. data/ChangeLog +284 -0
  2. data/{LICENCE → LICENSE} +1 -1
  3. data/README +13 -17
  4. data/RELEASES +13 -1
  5. data/Rakefile +1 -9
  6. data/bin/cluster.rb +5 -5
  7. data/examples/blog/README +45 -0
  8. data/examples/blog/apache.conf +0 -0
  9. data/examples/blog/app.rb +21 -0
  10. data/examples/blog/config.rb +88 -0
  11. data/examples/blog/lib/blog.rb +104 -0
  12. data/examples/blog/log/app.log +117 -0
  13. data/examples/blog/root/comments.xhtml +38 -0
  14. data/examples/blog/root/entry_form.xhtml +18 -0
  15. data/examples/blog/root/index.xhtml +43 -0
  16. data/examples/blog/root/login.xhtml +24 -0
  17. data/examples/blog/root/m/bubbles.gif +0 -0
  18. data/examples/blog/root/m/comments_curve.gif +0 -0
  19. data/examples/blog/root/m/down.gif +0 -0
  20. data/examples/blog/root/m/footer_bg.gif +0 -0
  21. data/examples/blog/root/m/garrow.gif +0 -0
  22. data/examples/blog/root/m/gbull.gif +0 -0
  23. data/examples/blog/root/m/grbull.gif +0 -0
  24. data/examples/blog/root/m/h1_bg.gif +0 -0
  25. data/examples/blog/root/m/header_bg.gif +0 -0
  26. data/examples/blog/root/m/obull.gif +0 -0
  27. data/examples/blog/root/m/page_bg.gif +0 -0
  28. data/examples/blog/root/m/side_title_bg.gif +0 -0
  29. data/examples/blog/root/m/sidebar_bg.gif +0 -0
  30. data/examples/blog/root/recent_posts.xhtml +14 -0
  31. data/examples/blog/root/style.css +201 -0
  32. data/examples/blog/root/style.xsl +118 -0
  33. data/examples/blog/root/view_entry.xhtml +29 -0
  34. data/examples/og/run.rb +27 -29
  35. data/examples/tiny/README +3 -4
  36. data/examples/tiny/app.rb +6 -16
  37. data/examples/tiny/config.rb +30 -0
  38. data/examples/tiny/log/app.log +23 -0
  39. data/examples/tiny/root/{index.sx → index.xhtml} +3 -6
  40. data/lib/{n/std.rb → nitro.rb} +9 -4
  41. data/lib/{n → nitro}/application.rb +13 -7
  42. data/lib/{n → nitro}/config.rb +38 -8
  43. data/lib/{n → nitro}/events.rb +1 -1
  44. data/lib/{n → nitro}/l10n.rb +1 -1
  45. data/lib/{n → nitro}/logger.rb +8 -8
  46. data/lib/{n → nitro}/macros.rb +3 -3
  47. data/lib/{n → nitro}/mixins.rb +1 -1
  48. data/lib/nitro/properties.rb +301 -0
  49. data/lib/{n → nitro}/server.rb +2 -2
  50. data/lib/{n → nitro}/server/appserver.rb +14 -5
  51. data/lib/{n → nitro}/server/cluster.rb +5 -5
  52. data/lib/{n → nitro}/server/cookie.rb +1 -1
  53. data/lib/nitro/server/dispatcher.rb +66 -0
  54. data/lib/{n → nitro}/server/filters.rb +7 -7
  55. data/lib/{n → nitro}/server/filters/autologin.rb +3 -3
  56. data/lib/{n → nitro}/server/fragment.rb +3 -3
  57. data/lib/{n → nitro}/server/handlers.rb +3 -3
  58. data/lib/nitro/server/render.rb +200 -0
  59. data/lib/{n → nitro}/server/request.rb +6 -6
  60. data/lib/{n → nitro}/server/requestpart.rb +5 -5
  61. data/lib/{n → nitro}/server/script.rb +3 -3
  62. data/lib/{n → nitro}/server/server.rb +4 -4
  63. data/lib/{n → nitro}/server/session.rb +3 -3
  64. data/lib/nitro/server/shaders.rb +165 -0
  65. data/lib/{n → nitro}/server/user.rb +1 -1
  66. data/lib/nitro/server/webrick.rb +175 -0
  67. data/lib/nitro/service.rb +25 -0
  68. data/lib/{n → nitro}/sitemap.rb +2 -2
  69. data/lib/{n → nitro}/ui/date-select.rb +0 -0
  70. data/lib/{n → nitro}/ui/pager.rb +1 -1
  71. data/lib/{n → nitro}/ui/popup.rb +1 -1
  72. data/lib/{n → nitro}/ui/select.rb +1 -1
  73. data/lib/{n → nitro}/ui/tabs.rb +1 -1
  74. data/lib/{n → nitro}/utils/array.rb +1 -1
  75. data/lib/{n → nitro}/utils/cache.rb +1 -1
  76. data/lib/{n → nitro}/utils/gfx.rb +1 -1
  77. data/lib/{n → nitro}/utils/hash.rb +1 -1
  78. data/lib/{n → nitro}/utils/html.rb +1 -1
  79. data/lib/{n → nitro}/utils/http.rb +1 -1
  80. data/lib/{n → nitro}/utils/mail.rb +1 -1
  81. data/lib/{n → nitro}/utils/number.rb +1 -1
  82. data/lib/{n → nitro}/utils/pool.rb +1 -1
  83. data/lib/{n → nitro}/utils/string.rb +19 -95
  84. data/lib/{n → nitro}/utils/template.rb +0 -0
  85. data/lib/{n → nitro}/utils/time.rb +1 -1
  86. data/lib/{n → nitro}/utils/uri.rb +3 -3
  87. data/lib/nitro/version.rb +11 -0
  88. data/lib/{n/og.rb → og.rb} +61 -31
  89. data/lib/{n/og → og}/backend.rb +13 -7
  90. data/lib/{n/og → og}/backends/mysql.rb +43 -39
  91. data/lib/{n/og → og}/backends/psql.rb +42 -38
  92. data/lib/{n/og → og}/connection.rb +21 -9
  93. data/lib/{n/og → og}/meta.rb +18 -12
  94. data/lib/xsl/base.xsl +11 -88
  95. data/test/n/server/tc_cookie.rb +1 -1
  96. data/test/n/server/tc_filters.rb +1 -1
  97. data/test/n/server/tc_request.rb +3 -3
  98. data/test/n/server/tc_requestpart.rb +2 -2
  99. data/test/n/server/tc_session.rb +1 -1
  100. data/test/n/tc_events.rb +1 -1
  101. data/test/n/tc_og.rb +16 -18
  102. data/test/n/tc_properties.rb +22 -18
  103. data/test/n/tc_sitemap.rb +2 -2
  104. data/test/n/ui/tc_pager.rb +4 -4
  105. data/test/n/utils/tc_cache.rb +1 -1
  106. data/test/n/utils/tc_hash.rb +1 -1
  107. data/test/n/utils/tc_html.rb +1 -1
  108. data/test/n/utils/tc_http.rb +1 -1
  109. data/test/n/utils/tc_number.rb +1 -1
  110. data/test/n/utils/tc_strings.rb +1 -46
  111. data/test/n/utils/tc_uri.rb +1 -1
  112. metadata +101 -108
  113. data/examples/simple/README +0 -42
  114. data/examples/simple/app.rb +0 -31
  115. data/examples/simple/conf/apache.conf +0 -100
  116. data/examples/simple/conf/config.rb +0 -72
  117. data/examples/simple/conf/debug-config.rb +0 -26
  118. data/examples/simple/conf/live-config.rb +0 -26
  119. data/examples/simple/conf/requires.rb +0 -43
  120. data/examples/simple/ctl +0 -32
  121. data/examples/simple/env.rb +0 -32
  122. data/examples/simple/install.rb +0 -12
  123. data/examples/simple/lib/articles/entities.rb +0 -37
  124. data/examples/simple/lib/articles/lc-en.rb +0 -36
  125. data/examples/simple/lib/articles/methods.rb +0 -55
  126. data/examples/simple/lib/articles/part.rb +0 -57
  127. data/examples/simple/root/add-article.sx +0 -15
  128. data/examples/simple/root/article-form.ss +0 -20
  129. data/examples/simple/root/comments-form.ss +0 -16
  130. data/examples/simple/root/comments.si +0 -30
  131. data/examples/simple/root/index.sx +0 -44
  132. data/examples/simple/root/shader/shader.xsl +0 -100
  133. data/examples/simple/root/shader/style.css +0 -9
  134. data/examples/simple/root/view-article.sx +0 -29
  135. data/examples/tiny/conf/config.rb +0 -62
  136. data/examples/tiny/conf/requires.rb +0 -33
  137. data/examples/tiny/ctl +0 -16
  138. data/lib/n/parts.rb +0 -157
  139. data/lib/n/properties.rb +0 -199
  140. data/lib/n/server/dispatcher.rb +0 -55
  141. data/lib/n/server/handlers/code-handler.rb +0 -182
  142. data/lib/n/server/handlers/page-handler.rb +0 -612
  143. data/lib/n/server/webrick.rb +0 -283
  144. data/lib/n/shaders.rb +0 -166
  145. data/lib/n/sync/clc.rb +0 -110
  146. data/lib/n/sync/handler.rb +0 -229
  147. data/lib/n/sync/server.rb +0 -176
  148. data/lib/p/README +0 -1
@@ -1,5 +1,5 @@
1
1
  require "test/unit"
2
- require "n/utils/uri"
2
+ require "nitro/utils/uri"
3
3
 
4
4
  include N
5
5
 
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.3.0
7
- date: 2004-11-01
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/simple
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/ctl
46
- - examples/tiny/conf/requires.rb
47
- - examples/tiny/conf/config.rb
48
- - examples/tiny/root/index.sx
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/n
82
+ - lib/nitro
83
83
  - lib/xsl
84
- - lib/p
85
- - lib/n/sitemap.rb
86
- - lib/n/properties.rb
87
- - lib/n/parts.rb
88
- - lib/n/utils
89
- - lib/n/macros.rb
90
- - lib/n/shaders.rb
91
- - lib/n/og
92
- - lib/n/sync
93
- - lib/n/server.rb
94
- - lib/n/server
95
- - lib/n/events.rb
96
- - lib/n/mixins.rb
97
- - lib/n/l10n.rb
98
- - lib/n/ui
99
- - lib/n/application.rb
100
- - lib/n/og.rb
101
- - lib/n/config.rb
102
- - lib/n/logger.rb
103
- - lib/n/std.rb
104
- - lib/n/utils/pool.rb
105
- - lib/n/utils/time.rb
106
- - lib/n/utils/mail.rb
107
- - lib/n/utils/array.rb
108
- - lib/n/utils/number.rb
109
- - lib/n/utils/uri.rb
110
- - lib/n/utils/gfx.rb
111
- - lib/n/utils/cache.rb
112
- - lib/n/utils/html.rb
113
- - lib/n/utils/template.rb
114
- - lib/n/utils/string.rb
115
- - lib/n/utils/http.rb
116
- - lib/n/utils/hash.rb
117
- - lib/n/og/backends
118
- - lib/n/og/connection.rb
119
- - lib/n/og/backend.rb
120
- - lib/n/og/meta.rb
121
- - lib/n/og/backends/psql.rb
122
- - lib/n/og/backends/mysql.rb
123
- - lib/n/sync/handler.rb
124
- - lib/n/sync/server.rb
125
- - lib/n/sync/clc.rb
126
- - lib/n/server/filters
127
- - lib/n/server/session.rb
128
- - lib/n/server/handlers
129
- - lib/n/server/request.rb
130
- - lib/n/server/requestpart.rb
131
- - lib/n/server/appserver.rb
132
- - lib/n/server/fragment.rb
133
- - lib/n/server/dispatcher.rb
134
- - lib/n/server/script.rb
135
- - lib/n/server/filters.rb
136
- - lib/n/server/server.rb
137
- - lib/n/server/cluster.rb
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/p/README
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
@@ -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
@@ -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