nitro 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
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,26 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <x:page xmlns:x="http://www.navel.gr/xml/shader.xsd">
4
-
5
- <x:cell id="main">
6
-
7
- <p>
8
- Please login as an author by entering the blog password.
9
- <br />
10
- The password is: <b>#{Blog.password}</b>.
11
- </p>
12
-
13
- <div class="error">#@error</div>
14
-
15
- <form action="login" method="post">
16
- <p>
17
- <b>Password:</b><br />
18
- <input type="password" name="password" value="#{Blog.password}" />
19
- </p>
20
- <input type="submit" value="Login" />
21
- </form>
22
-
23
- </x:cell>
24
-
25
- </x:page>
26
-
@@ -1,14 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <span>
4
- <h2>Recent posts</h2>
5
- <?r if @entries ?>
6
- <ul>
7
- <?r for entry in @entries ?>
8
- <li><a href="#{entry.to_href}">#{entry.title}</a></li>
9
- <?r end ?>
10
- </ul>
11
- <?r else ?>
12
- no entries
13
- <?r end ?>
14
- </span>
@@ -1,37 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <x:page xmlns:x="http://www.navel.gr/xml/shader.xsd">
4
-
5
- <x:cell id="main">
6
-
7
- <div class="full-@entry">
8
- <h2 class="date">#{@entry.create_time.strftime('%B %e, %G')}</h2>
9
- <div class="post">
10
- <h3 class="title">#{@entry.title}</h3>
11
- #{@entry.body}
12
- <div class="footer">
13
- posted by gmosx at #{@entry.create_time.strftime('%R %p')}
14
- <a href="#" onclick="document.getElementById('msg_entry').style.display='block'; return false">mail</a>
15
- <div id="msg_entry">
16
- <form action="mail_entry">
17
- <input type="hidden" name="oid" value="#{@entry.oid}" />
18
- <strong>Mail to:</strong>%nbsp;<input type="text" name="to" />%nbsp;
19
- <input type="submit" value="Send" />
20
- </form>
21
- </div>
22
- <?r if session[:owner] ?>
23
- [<a href="del_entry?oid=#{@entry.oid}">del</a>]
24
- <?r end ?>
25
- </div>
26
- </div>
27
- </div>
28
-
29
- <div id="comments">
30
- <render href="comments" />
31
- </div>
32
-
33
- <p><a href="/">Home</a></p>
34
- </x:cell>
35
-
36
- </x:page>
37
-
@@ -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,160 +0,0 @@
1
- <?xml version='1.0' ?>
2
-
3
- <!--
4
- author: gmosx
5
- -->
6
-
7
- <!DOCTYPE shader
8
- [
9
- <!ENTITY nbsp "<![CDATA[&nbsp;]]>">
10
- <!ENTITY copy "<![CDATA[&copy;]]>">
11
- <!ENTITY euro "<![CDATA[&euro;]]>">
12
- <!ENTITY laquo "<![CDATA[&laquo;]]>">
13
- <!ENTITY raquo "<![CDATA[&raquo;]]>">
14
- ]>
15
-
16
- <xsl:stylesheet
17
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
18
- xmlns:x="http://www.navel.gr/xml/shader.xsd"
19
- exclude-result-prefixes="x"
20
- version="1.0">
21
-
22
- <!-- strip comments -->
23
- <xsl:template match="comment()">
24
- <!-- strip -->
25
- </xsl:template>
26
-
27
- <!-- only copy ruby/r processing instructions -->
28
-
29
- <xsl:template match='processing-instruction("ruby")'>
30
- <xsl:copy/>
31
- </xsl:template>
32
- <xsl:template match='processing-instruction("r")'>
33
- <xsl:copy/>
34
- </xsl:template>
35
- <xsl:template match='processing-instruction("include")'>
36
- <xsl:copy/>
37
- </xsl:template>
38
-
39
- <!-- copy other tags -->
40
- <xsl:template match="@* | * | text()">
41
- <xsl:copy>
42
- <xsl:apply-templates select="@* | * | text() | processing-instruction()"/>
43
- </xsl:copy>
44
- </xsl:template>
45
-
46
- <!-- root element -->
47
- <xsl:template match="root">
48
- <xsl:apply-templates/>
49
- </xsl:template>
50
-
51
- <!-- rendering errors -->
52
- <xsl:template name='x:rendering-errors' match='x:rendering-errors'>
53
- <ruby>unless @rendering_errors.empty?</ruby>
54
- <div id="rendering-errors">
55
- <h3>RENDERING ERRORS:</h3>
56
- #{@rendering_errors.join('<br />')}
57
- </div>
58
- <ruby>end</ruby>
59
- </xsl:template>
60
-
61
- <!-- form errors temlate -->
62
- <xsl:template name='x:form-errors' match='x:form-errors'>
63
- <ruby>if errors = request.errors_to_a()</ruby>
64
- <div class="errors"><b>ERRORS:</b><br />#{errors.join("<br />")}</div>
65
- <ruby>end</ruby>
66
- </xsl:template>
67
-
68
- <xsl:template match='x:cell'>
69
- <xsl:apply-templates/>
70
- </xsl:template>
71
-
72
- <xsl:template match="x:clear" name="x:clear">
73
- <div class="clear">.</div>
74
- </xsl:template>
75
-
76
- <!-- admin ui -->
77
- <xsl:template name='x:admin-ui' match='x:admin-ui'>
78
- <ruby>if admin</ruby>
79
- <span class="admin">
80
- <xsl:apply-templates />
81
- </span>
82
- <ruby>end</ruby>
83
- </xsl:template>
84
-
85
- <!-- transaction form -->
86
- <xsl:template name='x:form-pass-txid' match='x:form-pass-txid'>
87
- <input type="hidden" name="txid">
88
- <!-- gmosx: keep in one line! -->
89
- <xsl:attribute name="value"><![CDATA[#{request['txid']}]]></xsl:attribute>
90
- </input>
91
- </xsl:template>
92
-
93
- <xsl:template name="x:pager-first" match="x:pager-first">
94
- <ruby>unless @pager.page == @pager.first_page</ruby>
95
- <a>
96
- <xsl:attribute name="href">#{@pager.target_uri(@pager.first_page)}</xsl:attribute>
97
- <xsl:apply-templates />
98
- </a>
99
- <ruby>end</ruby>
100
- </xsl:template>
101
-
102
- <xsl:template name="x:pager-prev" match="x:pager-prev">
103
- <ruby>unless @pager.page == @pager.first_page</ruby>
104
- <a>
105
- <xsl:attribute name="href">#{@pager.target_uri(@pager.previous_page)}</xsl:attribute>
106
- <xsl:apply-templates />
107
- </a>
108
- <ruby>end</ruby>
109
- </xsl:template>
110
-
111
- <xsl:template name="x:pager-next" match="x:pager-next">
112
- <ruby>unless @pager.page == @pager.last_page</ruby>
113
- <a>
114
- <xsl:attribute name="href">#{@pager.target_uri(@pager.next_page)}</xsl:attribute>
115
- <xsl:apply-templates />
116
- </a>
117
- <ruby>end</ruby>
118
- </xsl:template>
119
-
120
- <xsl:template name="x:pager-last" match="x:pager-last">
121
- <ruby>unless @pager.page == @pager.last_page</ruby>
122
- <a>
123
- <xsl:attribute name="href">#{@pager.target_uri(@pager.last_page)}</xsl:attribute>
124
- <xsl:apply-templates />
125
- </a>
126
- <ruby>end</ruby>
127
- </xsl:template>
128
-
129
- <xsl:template name="x:pager-pages" match="x:pager-pages">
130
- <ruby>
131
- for i in @pager.nav_range()
132
- if i == @pager.page
133
- @out += %|<xsl:apply-templates select="x:pager-selected" />|
134
- else
135
- @out += %|<xsl:apply-templates select="x:pager-page" />|
136
- end
137
- end
138
- </ruby>
139
- </xsl:template>
140
-
141
- <xsl:template name="x:pager-selected" match="x:pager-selected">
142
- <xsl:apply-templates />
143
- </xsl:template>
144
-
145
- <xsl:template name="x:pager-page" match="x:pager-page">
146
- <xsl:param name="index"><xsl:value-of select="@index"/></xsl:param>
147
- <a>
148
- <xsl:attribute name="href">#{@pager.target_uri(i)}</xsl:attribute>
149
- <xsl:apply-templates />
150
- </a>
151
- </xsl:template>
152
-
153
- <!-- caching -->
154
-
155
- <xsl:template name='cache' match='cache'>
156
- <ruby>cache do</ruby>
157
- <xsl:apply-templates />
158
- <ruby>end</ruby>
159
- </xsl:template>
160
- </xsl:stylesheet>
@@ -1,143 +0,0 @@
1
- <?xml version="1.0"?>
2
-
3
- <!--
4
- A Simple Shader
5
-
6
- * George Moschovitis <gm@navel.gr>
7
- (c) 2004-2005 Navel, all rights reserved.
8
- $Id: style.xsl 1 2005-04-11 11:04:30Z gmosx $
9
- -->
10
-
11
- <!DOCTYPE shader
12
- [
13
- <!ENTITY nbsp "<![CDATA[&nbsp;]]>">
14
- <!ENTITY copy "<![CDATA[&copy;]]>">
15
- <!ENTITY euro "<![CDATA[&euro;]]>">
16
- <!ENTITY laquo "<![CDATA[&laquo;]]>">
17
- <!ENTITY raquo "<![CDATA[&raquo;]]>">
18
- ]>
19
-
20
- <xsl:stylesheet
21
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22
- xmlns:xl="http://www.w3.org/1999/xlink"
23
- xmlns:x="http://www.navel.gr/xml/shader.xsd" version="1.0"
24
- exclude-result-prefixes="x xl">
25
-
26
- <xsl:include href="src/xsl/base.xsl" />
27
-
28
- <xsl:output method="xml" indent="yes" encoding="iso-8859-1" />
29
-
30
- <xsl:template name="x:head">
31
- <head>
32
- <title>#(@context.conf.name)</title>
33
- <meta name="title" content="Blog" />
34
- <meta name="description" content="Example" />
35
- <meta name="keywords" content="nitro, example, blog" />
36
- <meta name="category" content="example" />
37
- <meta name="robots" content="index, follow" />
38
- <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
39
-
40
- <xsl:apply-templates select="x:block[@id='meta']"/>
41
-
42
- <base href="#(@context.host_url)/" />
43
- <link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
44
- <link rel="alternate" type="application/rss+xml" title="Latest Entries" href="#{@context.host_url}/xml/list_entry" />
45
- <link rel="alternate" type="application/rss+xml" title="Latest Comments" href="#{@context.host_url}/xml/list_comment" />
46
- <xsl:apply-templates select="x:cell[@id='head']"/>
47
- </head>
48
- </xsl:template>
49
-
50
- <xsl:template name="x:header">
51
- <div id="header">
52
- <h1><a href="/">#{@context.conf.name}</a></h1>
53
- </div>
54
- </xsl:template>
55
-
56
- <xsl:template name="x:footer">
57
- <div id="footer">
58
- </div>
59
- </xsl:template>
60
-
61
- <xsl:template name="x:error" match="x:error">
62
- <ruby>if @errors and __err__ = @errors[:<xsl:value-of select="@attr" />]</ruby>
63
- <xsl:apply-templates />
64
- <span class="error">#{__err__}</span>
65
- <ruby>end</ruby>
66
- </xsl:template>
67
-
68
- <!--
69
- can only include x:blocks, all other templates are ignored
70
- -->
71
- <xsl:template match="x:page">
72
- <html>
73
- <xsl:call-template name="x:head" />
74
- <body>
75
-
76
- <div id="page">
77
-
78
- <xsl:call-template name="x:header" />
79
-
80
- <xsl:apply-templates select="x:cell[@id='top']" />
81
-
82
- <div class="block main">
83
- <xsl:apply-templates select="x:cell[@id='main']" />
84
- </div>
85
-
86
- <div class="block side">
87
- <h2>About</h2>
88
- This is a simple blog powered by <a href="http://www.navel.gr/nitro">
89
- Nitro</a> Web Engine. Have a look at the source code and enjoy the
90
- power of Ruby.
91
-
92
- <ruby>unless session[:owner]</ruby>
93
- <p><a href="login">Login</a> as owner.</p>
94
- <ruby>else</ruby>
95
- <p><a href="logout">Logout</a>.</p>
96
- <ruby>end</ruby>
97
-
98
- <p>
99
- <b>[[Language]]</b>: #{session[:LOCALE] || :en} (<a href="toggle_locale">change</a>)
100
- </p>
101
-
102
- <xsl:apply-templates select="x:cell[@id='side']" />
103
-
104
- <h2>Linkage</h2>
105
- <ul>
106
- <li><a target="_new" href="http://www.navel.gr">Navel Ltd</a></li>
107
- <li><a target="_new" href="http://www.navel.gr/nitro">Nitro Web Engine</a></li>
108
- <li><a target="_new" href="http://www.ruby-lang.org">Ruby</a></li>
109
- <li><a target="_new" href="http://www.blogger.com">Blogger</a></li>
110
- <li><a target="_new" href="http://www.w3c.org">W3 Consortium</a></li>
111
- </ul>
112
-
113
- <br />
114
- <ul class="rss">
115
- <li><a href="xml/list_entry">Latest entries</a></li>
116
- <li><a href="xml/list_comment">Latest comments</a></li>
117
- </ul>
118
-
119
- <br />
120
- <p>
121
- powered by:<br />
122
- <div style="padding: 5px; background: #fff; text-align: center; border: 1px solid #ccc">
123
- <a href="http://www.navel.gr/nitro"><img src="m/nitro.gif" style="border: none" /></a>
124
- </div>
125
- <br />
126
- skin from <a href="http://www.blogger.com">Blogger.com</a>
127
- </p>
128
- </div>
129
-
130
- <div class="clear">.</div>
131
-
132
- <xsl:apply-templates select="x:cell[@id='bottom']" />
133
-
134
- <xsl:call-template name="x:footer" />
135
- </div>
136
-
137
- <xsl:call-template name="x:rendering-errors" />
138
-
139
- </body>
140
- </html>
141
- </xsl:template>
142
-
143
- </xsl:stylesheet>
@@ -1,43 +0,0 @@
1
- $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
- $:.unshift File.join(File.dirname(__FILE__), '..', 'src')
3
-
4
- require 'test/unit'
5
- require 'ostruct'
6
-
7
- require 'og'
8
- require 'glue/validation'
9
- require 'nitro/testing'
10
-
11
- require 'blog'
12
-
13
- class TC_Blog < Test::Unit::TestCase # :nodoc: all
14
- include Nitro
15
-
16
- def setup
17
- @conf = Conf.new(
18
- :dispatcher => Dispatcher.new(BlogController, :xml => 'text/xml')
19
- )
20
- end
21
-
22
- def test_context
23
- handle(
24
- '/login',
25
- request = { 'password' => Blog.password }
26
- )
27
- assert_redirect
28
- assert_session_has(:owner)
29
- assert_session_equal(:username, 'George Moschovitis')
30
- assert_has_cookie('nauth')
31
- assert_has_no_cookie('wow')
32
- assert_cookie_equal('nauth', 'just an example, not used :)')
33
-
34
- ctx = handle(
35
- '/login',
36
- request = { 'password' => 'dunno' }
37
- )
38
- assert_no_redirect
39
- assert_output_contains('Invalid password')
40
- assert_status_ok
41
- end
42
-
43
- end
@@ -1,3 +0,0 @@
1
- = Logs
2
-
3
- Various logs come here.