nitro 0.17.0 → 0.18.0

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 (161) hide show
  1. data/CHANGELOG +124 -0
  2. data/README +2 -2
  3. data/Rakefile +4 -12
  4. data/bin/nitro +1 -1
  5. data/bin/nitrogen +47 -31
  6. data/doc/AUTHORS +3 -3
  7. data/doc/RELEASES +50 -1
  8. data/examples/README +7 -0
  9. data/lib/nitro.rb +5 -4
  10. data/lib/nitro/{adapters → adapter}/cgi.rb +2 -4
  11. data/lib/nitro/{adapters → adapter}/fastcgi.rb +1 -1
  12. data/lib/nitro/{adapters → adapter}/webrick.rb +5 -10
  13. data/lib/nitro/buffering.rb +6 -0
  14. data/lib/nitro/{builders → builder}/atom.rb +1 -5
  15. data/lib/nitro/{builders → builder}/form.rb +1 -5
  16. data/lib/nitro/{builders → builder}/rss.rb +3 -1
  17. data/lib/nitro/{builders → builder}/table.rb +2 -4
  18. data/lib/nitro/{builders → builder}/xhtml.rb +3 -5
  19. data/lib/nitro/{builders → builder}/xml.rb +2 -4
  20. data/lib/nitro/caching.rb +6 -4
  21. data/lib/nitro/caching/output.rb +18 -11
  22. data/lib/nitro/context.rb +3 -1
  23. data/lib/nitro/controller.rb +29 -18
  24. data/lib/nitro/dispatcher.rb +2 -4
  25. data/lib/nitro/element.rb +2 -0
  26. data/lib/nitro/environment.rb +2 -4
  27. data/lib/nitro/errors.rb +69 -0
  28. data/lib/nitro/mail.rb +2 -4
  29. data/lib/nitro/markup.rb +20 -3
  30. data/lib/nitro/output.rb +5 -9
  31. data/lib/nitro/part.rb +2 -3
  32. data/lib/nitro/render.rb +49 -30
  33. data/lib/nitro/request.rb +2 -1
  34. data/lib/nitro/runner.rb +23 -12
  35. data/lib/nitro/scaffold.rb +5 -3
  36. data/lib/nitro/service.rb +22 -0
  37. data/lib/nitro/service/xmlrpc.rb +42 -0
  38. data/lib/nitro/session.rb +2 -4
  39. data/lib/nitro/template.rb +8 -10
  40. data/lib/nitro/testing.rb +0 -4
  41. data/proto/public/error.xhtml +27 -2
  42. data/test/nitro/{adapters → adapter}/raw_post1.bin +0 -0
  43. data/test/nitro/{adapters → adapter}/tc_cgi.rb +1 -1
  44. data/test/nitro/{adapters → adapter}/tc_webrick.rb +1 -1
  45. data/test/nitro/{builders → builder}/tc_atom.rb +1 -1
  46. data/test/nitro/{builders → builder}/tc_rss.rb +1 -1
  47. data/test/nitro/{builders → builder}/tc_table.rb +1 -1
  48. data/test/nitro/{builders → builder}/tc_xhtml.rb +1 -1
  49. data/test/nitro/{builders → builder}/tc_xml.rb +1 -1
  50. data/test/nitro/tc_caching.rb +18 -0
  51. data/test/nitro/tc_controller.rb +1 -1
  52. data/test/nitro/tc_mail.rb +3 -1
  53. metadata +33 -168
  54. data/examples/README.windows +0 -9
  55. data/examples/ajax/controller.rb +0 -21
  56. data/examples/ajax/public/index.xhtml +0 -72
  57. data/examples/ajax/public/js/ajax.js +0 -64
  58. data/examples/ajax/run.rb +0 -14
  59. data/examples/blog/README +0 -70
  60. data/examples/blog/conf/apache.conf +0 -30
  61. data/examples/blog/conf/apache.conf.new +0 -53
  62. data/examples/blog/conf/lhttpd.conf +0 -79
  63. data/examples/blog/conf/locales/de.yml +0 -4
  64. data/examples/blog/conf/locales/en.yml +0 -4
  65. data/examples/blog/log/README +0 -3
  66. data/examples/blog/log/apache.error_log +0 -6647
  67. data/examples/blog/log/rewrite_log +0 -161
  68. data/examples/blog/public/base.xsl +0 -153
  69. data/examples/blog/public/fcgi.rb +0 -5
  70. data/examples/blog/public/m/bubbles.gif +0 -0
  71. data/examples/blog/public/m/comments_curve.gif +0 -0
  72. data/examples/blog/public/m/down.gif +0 -0
  73. data/examples/blog/public/m/footer_bg.gif +0 -0
  74. data/examples/blog/public/m/garrow.gif +0 -0
  75. data/examples/blog/public/m/gbull.gif +0 -0
  76. data/examples/blog/public/m/grbull.gif +0 -0
  77. data/examples/blog/public/m/h1_bg.gif +0 -0
  78. data/examples/blog/public/m/header_bg.gif +0 -0
  79. data/examples/blog/public/m/nitro.gif +0 -0
  80. data/examples/blog/public/m/obull.gif +0 -0
  81. data/examples/blog/public/m/page_bg.gif +0 -0
  82. data/examples/blog/public/m/rss.gif +0 -0
  83. data/examples/blog/public/m/side_title_bg.gif +0 -0
  84. data/examples/blog/public/m/sidebar_bg.gif +0 -0
  85. data/examples/blog/public/style.css +0 -305
  86. data/examples/blog/run.rb +0 -43
  87. data/examples/blog/src/blog.rb +0 -21
  88. data/examples/blog/src/controller.rb +0 -151
  89. data/examples/blog/src/mailer.rb +0 -23
  90. data/examples/blog/src/models/blog.rb +0 -33
  91. data/examples/blog/src/models/content.rb +0 -18
  92. data/examples/blog/src/views/blog_entry_email.xhtml +0 -16
  93. data/examples/blog/src/views/comments.xhtml +0 -36
  94. data/examples/blog/src/views/entry_form.xhtml +0 -22
  95. data/examples/blog/src/views/error.xhtml +0 -56
  96. data/examples/blog/src/views/index.xhtml +0 -49
  97. data/examples/blog/src/views/login.xhtml +0 -26
  98. data/examples/blog/src/views/recent_posts.xhtml +0 -14
  99. data/examples/blog/src/views/view_entry.xhtml +0 -37
  100. data/examples/blog/src/views/view_entry.xml +0 -12
  101. data/examples/blog/src/xsl/base.xsl +0 -160
  102. data/examples/blog/src/xsl/style.xsl +0 -143
  103. data/examples/blog/test/tc_blog.rb +0 -43
  104. data/examples/flash/log/README +0 -3
  105. data/examples/flash/root/index.xhtml +0 -16
  106. data/examples/flash/root/show_inline_text.xhtml +0 -17
  107. data/examples/flash/run.rb +0 -7
  108. data/examples/no_xsl_blog/README +0 -24
  109. data/examples/no_xsl_blog/conf/apache.conf +0 -30
  110. data/examples/no_xsl_blog/conf/lhttpd.conf +0 -79
  111. data/examples/no_xsl_blog/conf/locales/de.yml +0 -4
  112. data/examples/no_xsl_blog/conf/locales/en.yml +0 -4
  113. data/examples/no_xsl_blog/lib/blog.rb +0 -16
  114. data/examples/no_xsl_blog/lib/blog/controller.rb +0 -116
  115. data/examples/no_xsl_blog/lib/blog/model.rb +0 -35
  116. data/examples/no_xsl_blog/lib/blog/template.rb +0 -138
  117. data/examples/no_xsl_blog/lib/content.rb +0 -47
  118. data/examples/no_xsl_blog/log/README +0 -3
  119. data/examples/no_xsl_blog/log/apache.error_log +0 -473
  120. data/examples/no_xsl_blog/public/comments.xhtml +0 -36
  121. data/examples/no_xsl_blog/public/entry_form.xhtml +0 -22
  122. data/examples/no_xsl_blog/public/fcgi.rb +0 -5
  123. data/examples/no_xsl_blog/public/index.xhtml +0 -39
  124. data/examples/no_xsl_blog/public/login.xhtml +0 -21
  125. data/examples/no_xsl_blog/public/m/bubbles.gif +0 -0
  126. data/examples/no_xsl_blog/public/m/comments_curve.gif +0 -0
  127. data/examples/no_xsl_blog/public/m/down.gif +0 -0
  128. data/examples/no_xsl_blog/public/m/footer_bg.gif +0 -0
  129. data/examples/no_xsl_blog/public/m/garrow.gif +0 -0
  130. data/examples/no_xsl_blog/public/m/gbull.gif +0 -0
  131. data/examples/no_xsl_blog/public/m/grbull.gif +0 -0
  132. data/examples/no_xsl_blog/public/m/h1_bg.gif +0 -0
  133. data/examples/no_xsl_blog/public/m/header_bg.gif +0 -0
  134. data/examples/no_xsl_blog/public/m/nitro.gif +0 -0
  135. data/examples/no_xsl_blog/public/m/obull.gif +0 -0
  136. data/examples/no_xsl_blog/public/m/page_bg.gif +0 -0
  137. data/examples/no_xsl_blog/public/m/rss.gif +0 -0
  138. data/examples/no_xsl_blog/public/m/side_title_bg.gif +0 -0
  139. data/examples/no_xsl_blog/public/m/sidebar_bg.gif +0 -0
  140. data/examples/no_xsl_blog/public/recent_posts.xhtml +0 -14
  141. data/examples/no_xsl_blog/public/style.css +0 -299
  142. data/examples/no_xsl_blog/public/view_entry.xhtml +0 -25
  143. data/examples/no_xsl_blog/public/view_entry.xml +0 -12
  144. data/examples/no_xsl_blog/run.rb +0 -35
  145. data/examples/tiny/README +0 -14
  146. data/examples/tiny/conf/apache.conf +0 -30
  147. data/examples/tiny/conf/lhttpd.conf +0 -79
  148. data/examples/tiny/log/README +0 -3
  149. data/examples/tiny/log/apache.error_log +0 -154
  150. data/examples/tiny/public/deep/dir/hello.xhtml +0 -3
  151. data/examples/tiny/public/fcgi.rb +0 -5
  152. data/examples/tiny/public/include.xhtml +0 -3
  153. data/examples/tiny/public/index.xhtml +0 -55
  154. data/examples/tiny/public/nitro.png +0 -0
  155. data/examples/tiny/public/upload.xhtml +0 -21
  156. data/examples/tiny/run.rb +0 -7
  157. data/examples/wee_style/README +0 -10
  158. data/examples/wee_style/run.rb +0 -50
  159. data/examples/why_wiki/README +0 -5
  160. data/examples/why_wiki/run.rb +0 -59
  161. data/proto/public/js/ajax.js +0 -63
@@ -1,25 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- #{s_page}
4
-
5
- <div class="full-@entry">
6
- <h2 class="date">#{@entry.create_time.strftime('%B %e, %G')}</h2>
7
- <div class="post">
8
- <h3 class="title">#{@entry.title}</h3>
9
- #{@entry.body}
10
- <div class="footer">
11
- posted by gmosx at #{@entry.create_time.strftime('%R %p')}
12
- <?r if session[:owner] ?>
13
- [<a href="del_entry?oid=#{@entry.oid}">del</a>]
14
- <?r end ?>
15
- </div>
16
- </div>
17
- </div>
18
-
19
- <div id="comments">
20
- <render href="comments" />
21
- </div>
22
-
23
- <p><a href="/">Home</a></p>
24
-
25
- #{e_page}
@@ -1,12 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <entry>
4
- <title>#{@entry.title}</title>
5
- <date>#{@entry.create_time.strftime('%B %e, %G')}</date>
6
- <body>#{@entry.body}</body>
7
- <comments>
8
- <?r for comment in @entry.comments ?>
9
- <comment>#{comment.body}</comment>
10
- <?r end ?>
11
- </comments>
12
- </entry>
@@ -1,35 +0,0 @@
1
- require 'nitro'
2
- require 'og'
3
-
4
- require 'nitro/localization'
5
- require 'lib/blog'
6
-
7
- include Nitro
8
-
9
- Nitro.run do |conf|
10
- Localization.add(
11
- :en => 'conf/locales/en.yml',
12
- :de => 'conf/locales/de.yml'
13
- )
14
-
15
- Og.connect(
16
- # :address => 'localhost',
17
- :store => 'mysql',
18
- :name => 'blog',
19
- :user => 'root',
20
- :password => 'navelrulez'
21
- )
22
-
23
- conf.dispatcher = Dispatcher.new(
24
- :root => BlogController,
25
- 'xml' => XmlController
26
- )
27
-
28
- Rendering.shader = LocalizationShader.new(RubyShader.new(CompressShader.new))
29
-
30
- conf = Conf.new(
31
- :name => 'Blog sans XSLT',
32
- :host => '127.0.0.1',
33
- :port => 9999
34
- )
35
- end
data/examples/tiny/README DELETED
@@ -1,14 +0,0 @@
1
- = A Tiny web application
2
-
3
- An example to test Nitro.
4
-
5
-
6
- === Run the example
7
-
8
- $ cd examples/tiny
9
-
10
- $ ruby ctl
11
-
12
- browse http://127.0.0.1:8069
13
-
14
- to stop the example press Ctrl+C
@@ -1,30 +0,0 @@
1
- # Apache configuration file.
2
- # Change as appropriate for your apache configuration.
3
- # $Id$
4
-
5
- Listen 9999
6
-
7
- PidFile /var/tmp/httpd.pid
8
- TypesConfig /etc/mime.types
9
- DocumentRoot /home/gmosx/navel/nitro/examples/tiny/public
10
-
11
- # The error log.
12
- ErrorLog log/apache.error_log
13
- CustomLog log/access_log combined
14
-
15
- # Load dynamic modules.
16
- LoadModule fastcgi_module /usr/local/apache2/modules/mod_fastcgi.so
17
- # LoadModule rewrite_module /usr/local/apache2/modules/mod_rewrite.so
18
-
19
- FastCgiIpcDir /var/tmp/fcgi
20
- # gmosx: if you have installed the distribution the -I is not needed.
21
- FastCgiConfig -initial-env 'RUBYOPT=-rubygems -I/home/gmosx/navel/nitro/lib -I/home/gmosx/navel/og/lib -I/home/gmosx/navel/glue/lib'
22
- AddHandler fastcgi-script fcgi rb
23
- Options +FollowSymLinks +ExecCGI
24
-
25
- RewriteEngine On
26
- RewriteRule ^/([\/\-_a-zA-Z0-9]+)?$ /fcgi.rb [QSA,L]
27
- RewriteRule ^/([\/\-_a-zA-Z0-9]+)?\?([\-_a-zA-Z0-9=;&%]*)$ /fcgi.rb?$2 [QSA,L]
28
-
29
- # You can also point these error messages to a controller/action
30
- # ErrorDocument 500 /500.html
@@ -1,79 +0,0 @@
1
- # Lighttpd configuration file
2
- # $Id$
3
-
4
- server.port = 9999
5
- server.bind = "127.0.0.1"
6
- # server.event-handler = "freebsd-kqueue" # needed on OS X
7
-
8
- server.modules = ( "mod_rewrite", "mod_fastcgi", "mod_access", "mod_accesslog" )
9
-
10
- server.document-root = "/home/gmosx/navel/nitro/examples/tiny/public/"
11
- server.errorlog = "/home/gmosx/navel/nitro/examples/tiny/log/lighttpd.error.log"
12
- accesslog.filename = "/home/gmosx/navel/nitro/examples/tiny/log/access.log"
13
-
14
- server.indexfiles = ( "index.html" )
15
- url.access-deny = ( "~", ".inc" )
16
-
17
- url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
18
- server.error-handler-404 = "/fcgi.rb"
19
-
20
- fastcgi.server = ( ".rb" =>
21
- ( "localhost" =>
22
- (
23
- "min-procs" => 1,
24
- "max-procs" => 1,
25
- "socket" => "/tmp/tiny.fcgi.socket",
26
- "bin-path" => "/home/gmosx/navel/nitro/examples/tiny/public/fcgi.rb",
27
- "bin-environment" => ( "NITRO_ENV" => "development" )
28
- )
29
- )
30
- )
31
-
32
- mimetype.assign = (
33
- ".pdf" => "application/pdf",
34
- ".sig" => "application/pgp-signature",
35
- ".spl" => "application/futuresplash",
36
- ".class" => "application/octet-stream",
37
- ".ps" => "application/postscript",
38
- ".torrent" => "application/x-bittorrent",
39
- ".dvi" => "application/x-dvi",
40
- ".gz" => "application/x-gzip",
41
- ".pac" => "application/x-ns-proxy-autoconfig",
42
- ".swf" => "application/x-shockwave-flash",
43
- ".tar.gz" => "application/x-tgz",
44
- ".tgz" => "application/x-tgz",
45
- ".tar" => "application/x-tar",
46
- ".zip" => "application/zip",
47
- ".mp3" => "audio/mpeg",
48
- ".m3u" => "audio/x-mpegurl",
49
- ".wma" => "audio/x-ms-wma",
50
- ".wax" => "audio/x-ms-wax",
51
- ".ogg" => "audio/x-wav",
52
- ".wav" => "audio/x-wav",
53
- ".gif" => "image/gif",
54
- ".jpg" => "image/jpeg",
55
- ".jpeg" => "image/jpeg",
56
- ".png" => "image/png",
57
- ".xbm" => "image/x-xbitmap",
58
- ".xpm" => "image/x-xpixmap",
59
- ".xwd" => "image/x-xwindowdump",
60
- ".css" => "text/css",
61
- ".html" => "text/html",
62
- ".htm" => "text/html",
63
- ".js" => "text/javascript",
64
- ".asc" => "text/plain",
65
- ".c" => "text/plain",
66
- ".conf" => "text/plain",
67
- ".text" => "text/plain",
68
- ".txt" => "text/plain",
69
- ".dtd" => "text/xml",
70
- ".xml" => "text/xml",
71
- ".mpeg" => "video/mpeg",
72
- ".mpg" => "video/mpeg",
73
- ".mov" => "video/quicktime",
74
- ".qt" => "video/quicktime",
75
- ".avi" => "video/x-msvideo",
76
- ".asf" => "video/x-ms-asf",
77
- ".asx" => "video/x-ms-asf",
78
- ".wmv" => "video/x-ms-wmv"
79
- )
@@ -1,3 +0,0 @@
1
- = Logs
2
-
3
- Various logs come here.
@@ -1,154 +0,0 @@
1
- [Sun Feb 27 14:59:50 2005] [notice] Digest: generating secret for digest authentication ...
2
- [Sun Feb 27 14:59:50 2005] [notice] Digest: done
3
- [Sun Feb 27 14:59:51 2005] [notice] FastCGI: process manager initialized (pid 4783)
4
- [Sun Feb 27 14:59:51 2005] [notice] Apache/2.0.53 (Unix) DAV/2 mod_fastcgi/2.4.2 configured -- resuming normal operations
5
- [Sun Feb 27 14:59:52 2005] [warn] FastCGI: (dynamic) server "/home/gmosx/navel/nitro/examples/tiny/root/fcgi.rb" started (pid 4789)
6
- DEBUG: Rendering '/'.
7
- DEBUG: Compiling action 'root/index'
8
- DEBUG: Transforming 'root/index.xhtml'
9
- DEBUG: Rendering '/include'.
10
- DEBUG: Compiling action 'root/include'
11
- DEBUG: Transforming 'root/include.xhtml'
12
- DEBUG: Rendering '/'.
13
- DEBUG: Rendering '/include'.
14
- DEBUG: Rendering '/'.
15
- DEBUG: Rendering '/include'.
16
- DEBUG: Rendering '/'.
17
- DEBUG: Rendering '/include'.
18
- DEBUG: Rendering '/'.
19
- DEBUG: Rendering '/include'.
20
- DEBUG: Rendering '/'.
21
- DEBUG: Rendering '/include'.
22
- DEBUG: Rendering '/'.
23
- DEBUG: Rendering '/include'.
24
- DEBUG: Rendering '/'.
25
- DEBUG: Rendering '/include'.
26
- DEBUG: Rendering '/'.
27
- DEBUG: Rendering '/include'.
28
- DEBUG: Rendering '/'.
29
- DEBUG: Rendering '/include'.
30
- [Sun Feb 27 15:00:15 2005] [notice] caught SIGTERM, shutting down
31
- [Thu Mar 17 12:31:03 2005] [notice] Digest: generating secret for digest authentication ...
32
- [Thu Mar 17 12:31:03 2005] [notice] Digest: done
33
- [Thu Mar 17 12:31:04 2005] [notice] FastCGI: process manager initialized (pid 4964)
34
- [Thu Mar 17 12:31:04 2005] [notice] Apache/2.0.53 (Unix) DAV/2 mod_fastcgi/2.4.2 configured -- resuming normal operations
35
- [Thu Mar 17 12:31:06 2005] [warn] FastCGI: (dynamic) server "/home/gmosx/navel/nitro/examples/tiny/public/fcgi.rb" started (pid 4970)
36
- DEBUG: Rendering '/view_entry/3'.
37
- ERROR: Error while handling '/view_entry/3'.
38
- ERROR: No controller for action
39
- BACKTRACE:
40
- /home/gmosx/navel/nitro/lib/nitro/render.rb:231:in `render'
41
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:39:in `start'
42
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:26:in `each'
43
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:26:in `start'
44
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:217:in `invoke_fcgi_proc'
45
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:188:in `run'
46
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:276:in `run'
47
- /home/gmosx/navel/nitro/examples/tiny/public/../run.rb:9
48
- /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
49
- /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
50
- /home/gmosx/navel/nitro/examples/tiny/public/fcgi.rb:4
51
- LOGGED FROM:
52
- /home/gmosx/navel/nitro/lib/nitro/render.rb:281:in `log_error'
53
- DEBUG: Rendering '/error'.
54
- DEBUG: Compiling action 'public/error'
55
- ERROR: Error while handling '/error'.
56
- ERROR: undefined method `__xhtml__error' for #<SimpleController:0xf6d142a4>
57
- BACKTRACE:
58
- /home/gmosx/navel/nitro/lib/nitro/controller.rb:94:in `method_missing'
59
- /home/gmosx/navel/nitro/lib/nitro/render.rb:236:in `send'
60
- /home/gmosx/navel/nitro/lib/nitro/render.rb:236:in `render'
61
- /home/gmosx/navel/nitro/lib/nitro/context.rb:67:in `out'
62
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:44:in `start'
63
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:26:in `each'
64
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:26:in `start'
65
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:217:in `invoke_fcgi_proc'
66
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:188:in `run'
67
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:276:in `run'
68
- /home/gmosx/navel/nitro/examples/tiny/public/../run.rb:9
69
- /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
70
- /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
71
- /home/gmosx/navel/nitro/examples/tiny/public/fcgi.rb:4
72
- LOGGED FROM:
73
- /home/gmosx/navel/nitro/lib/nitro/render.rb:281:in `log_error'
74
- [Thu Mar 17 12:31:21 2005] [notice] caught SIGTERM, shutting down
75
- [Thu Mar 17 12:31:34 2005] [notice] Digest: generating secret for digest authentication ...
76
- [Thu Mar 17 12:31:34 2005] [notice] Digest: done
77
- [Thu Mar 17 12:31:35 2005] [notice] FastCGI: process manager initialized (pid 4980)
78
- [Thu Mar 17 12:31:35 2005] [notice] Apache/2.0.53 (Unix) DAV/2 mod_fastcgi/2.4.2 configured -- resuming normal operations
79
- [Thu Mar 17 12:31:39 2005] [warn] FastCGI: (dynamic) server "/home/gmosx/navel/nitro/examples/tiny/public/fcgi.rb" started (pid 4986)
80
- DEBUG: Rendering '/view_entry/3'.
81
- ERROR: Error while handling '/view_entry/3'.
82
- ERROR: No controller for action
83
- BACKTRACE:
84
- /home/gmosx/navel/nitro/lib/nitro/render.rb:231:in `render'
85
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:39:in `start'
86
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:26:in `each'
87
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:26:in `start'
88
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:217:in `invoke_fcgi_proc'
89
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:188:in `run'
90
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:276:in `run'
91
- /home/gmosx/navel/nitro/examples/tiny/public/../run.rb:9
92
- /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
93
- /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
94
- /home/gmosx/navel/nitro/examples/tiny/public/fcgi.rb:4
95
- LOGGED FROM:
96
- /home/gmosx/navel/nitro/lib/nitro/render.rb:281:in `log_error'
97
- DEBUG: Rendering '/error'.
98
- DEBUG: Compiling action 'public/error'
99
- ERROR: Error while handling '/error'.
100
- ERROR: undefined method `__xhtml__error' for #<SimpleController:0xf6d14268>
101
- BACKTRACE:
102
- /home/gmosx/navel/nitro/lib/nitro/controller.rb:94:in `method_missing'
103
- /home/gmosx/navel/nitro/lib/nitro/render.rb:236:in `send'
104
- /home/gmosx/navel/nitro/lib/nitro/render.rb:236:in `render'
105
- /home/gmosx/navel/nitro/lib/nitro/context.rb:67:in `out'
106
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:44:in `start'
107
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:26:in `each'
108
- /home/gmosx/navel/nitro/lib/nitro/adapters/fastcgi.rb:26:in `start'
109
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:217:in `invoke_fcgi_proc'
110
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:188:in `run'
111
- /home/gmosx/navel/nitro/lib/nitro/runner.rb:276:in `run'
112
- /home/gmosx/navel/nitro/examples/tiny/public/../run.rb:9
113
- /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'
114
- /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'
115
- /home/gmosx/navel/nitro/examples/tiny/public/fcgi.rb:4
116
- LOGGED FROM:
117
- /home/gmosx/navel/nitro/lib/nitro/render.rb:281:in `log_error'
118
- DEBUG: Rendering '/'.
119
- DEBUG: Compiling action 'public/index'
120
- DEBUG: Transforming 'public/index.xhtml'
121
- DEBUG: Rendering '/include'.
122
- DEBUG: Compiling action 'public/include'
123
- DEBUG: Transforming 'public/include.xhtml'
124
- DEBUG: Rendering '/'.
125
- DEBUG: Compiling action 'public/index'
126
- DEBUG: Transforming 'public/index.xhtml'
127
- DEBUG: Rendering '/include'.
128
- DEBUG: Compiling action 'public/include'
129
- DEBUG: Transforming 'public/include.xhtml'
130
- [Thu Mar 17 12:34:48 2005] [notice] caught SIGTERM, shutting down
131
- [Fri Mar 25 12:23:00 2005] [notice] Digest: generating secret for digest authentication ...
132
- [Fri Mar 25 12:23:00 2005] [notice] Digest: done
133
- [Fri Mar 25 12:23:01 2005] [notice] FastCGI: process manager initialized (pid 4731)
134
- [Fri Mar 25 12:23:01 2005] [notice] Apache/2.0.53 (Unix) DAV/2 mod_fastcgi/2.4.2 configured -- resuming normal operations
135
- [Fri Mar 25 12:23:05 2005] [warn] FastCGI: (dynamic) server "/home/gmosx/navel/nitro/examples/tiny/public/fcgi.rb" started (pid 4737)
136
- DEBUG: Rendering '/'.
137
- DEBUG: Compiling action 'public/index'
138
- DEBUG: Transforming 'public/index.xhtml'
139
- DEBUG: Rendering '/include'.
140
- DEBUG: Compiling action 'public/include'
141
- DEBUG: Transforming 'public/include.xhtml'
142
- DEBUG: Rendering '/'.
143
- DEBUG: Compiling action 'public/index'
144
- DEBUG: Transforming 'public/index.xhtml'
145
- DEBUG: Rendering '/include'.
146
- DEBUG: Compiling action 'public/include'
147
- DEBUG: Transforming 'public/include.xhtml'
148
- DEBUG: Rendering '/'.
149
- DEBUG: Compiling action 'public/index'
150
- DEBUG: Transforming 'public/index.xhtml'
151
- DEBUG: Rendering '/include'.
152
- DEBUG: Compiling action 'public/include'
153
- DEBUG: Transforming 'public/include.xhtml'
154
- [Fri Mar 25 12:24:03 2005] [notice] caught SIGTERM, shutting down
@@ -1,3 +0,0 @@
1
- <b>This is another include (deep).</b>
2
- <br />
3
- Included from #{@parent_action_name}
@@ -1,5 +0,0 @@
1
- #!/usr/local/bin/ruby
2
-
3
- ENV['NITRO_INVOKE'] = 'fcgi_proc'
4
- $0 = File.join(File.dirname(__FILE__), '..', 'run.rb')
5
- require $0
@@ -1,3 +0,0 @@
1
- <p>
2
- this is a <b>statically</b> included file.
3
- </p>
@@ -1,55 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <html>
4
-
5
- <?r
6
- # the code that populates the template comes here
7
-
8
- unless name = request['name']
9
- name = 'World'
10
- end
11
-
12
- session[:counter] ||= 0
13
- session[:counter] += 1
14
- ?>
15
-
16
- <!-- the template comes here -->
17
-
18
- <p>
19
- <img src="nitro.png" />
20
- </p>
21
-
22
-
23
- <strong>Hello #{name}</strong>
24
- <p>
25
- <form id="my_form">
26
- <strong>Enter your name:</strong>
27
- <input type="text" name="name" />
28
- <br />
29
- <input type="submit" />
30
- </form>
31
- </p>
32
- <p>
33
- Counter: #{session[:counter]}
34
- </p>
35
- <render href="include" />
36
- <p>
37
- </p>
38
- <render href="deep/dir/hello" />
39
- <p>
40
- <h3>Upload a picture</h3>
41
-
42
- <form action="upload" method="post" enctype="multipart/form-data">
43
- <p>
44
- <b>Title:</b><br />
45
- <input type="text" name="title" />
46
- </p>
47
- <p>
48
- <b>File:</b><br />
49
- <input type="file" name="file" />
50
- </p>
51
- <input type="submit" value="Upload" />
52
- </form>
53
- </p>
54
-
55
- </html>
Binary file
@@ -1,21 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <html>
4
-
5
- <?r
6
- file = context['file'].read
7
- File.open('public/image.png', 'wb') do |f|
8
- f << file
9
- end
10
- ?>
11
-
12
- <h1>#{request['title']}</h1>
13
-
14
- <p><img src="image.png" /></p>
15
-
16
- <p>
17
- <strong>original:</strong> #{request['file'].original_filename}<br />
18
- <strong>content type:</strong>#{request['file'].content_type}<br />
19
- </p>
20
-
21
- </html>