hobix 0.4 → 0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. data/COPYING +18 -0
  2. data/README +18 -0
  3. data/Rakefile +96 -0
  4. data/bin/hobix +7 -3
  5. data/contrib/blosxom-to-hobix.rb +253 -0
  6. data/contrib/txp-to-hobix.rb +56 -0
  7. data/contrib/webrick-all-mine.rb +20 -0
  8. data/doc/CHANGELOG +285 -0
  9. data/doc/rdoc/classes/Hobix/API.html +382 -0
  10. data/doc/rdoc/classes/Hobix/Article.html +111 -0
  11. data/doc/rdoc/classes/Hobix/BaseContent.html +692 -0
  12. data/doc/rdoc/classes/Hobix/BaseEntry.html +218 -0
  13. data/doc/rdoc/classes/Hobix/BaseFacet.html +205 -0
  14. data/doc/rdoc/classes/Hobix/BaseOutput.html +122 -0
  15. data/doc/rdoc/classes/Hobix/BasePlugin.html +201 -0
  16. data/doc/rdoc/classes/Hobix/BaseProperties/ClassMethods.html +243 -0
  17. data/doc/rdoc/classes/Hobix/BaseProperties.html +218 -0
  18. data/doc/rdoc/classes/Hobix/BasePublish.html +157 -0
  19. data/doc/rdoc/classes/Hobix/BaseStorage.html +417 -0
  20. data/doc/rdoc/classes/Hobix/BixWik/Entry.html +196 -0
  21. data/doc/rdoc/classes/Hobix/BixWik/IndexEntry.html +170 -0
  22. data/doc/rdoc/classes/Hobix/BixWik/WikiRedCloth.html +111 -0
  23. data/doc/rdoc/classes/Hobix/BixWik.html +418 -0
  24. data/doc/rdoc/classes/Hobix/BixWikPlugin.html +158 -0
  25. data/doc/rdoc/classes/Hobix/CommandLine.html +1970 -0
  26. data/doc/rdoc/classes/Hobix/Comment.html +113 -0
  27. data/doc/rdoc/classes/Hobix/Config.html +212 -0
  28. data/doc/rdoc/classes/Hobix/DataMarsh.html +667 -0
  29. data/doc/rdoc/classes/Hobix/Entry.html +178 -0
  30. data/doc/rdoc/classes/Hobix/EntryEnum.html +162 -0
  31. data/doc/rdoc/classes/Hobix/Enumerable.html +170 -0
  32. data/doc/rdoc/classes/Hobix/Facets/WikiEdit.html +180 -0
  33. data/doc/rdoc/classes/Hobix/Facets.html +111 -0
  34. data/doc/rdoc/classes/Hobix/LinkList.html +182 -0
  35. data/doc/rdoc/classes/Hobix/Out/Quick.html +412 -0
  36. data/doc/rdoc/classes/Hobix/Out.html +119 -0
  37. data/doc/rdoc/classes/Hobix/Page.html +381 -0
  38. data/doc/rdoc/classes/Hobix/Trackback.html +113 -0
  39. data/doc/rdoc/classes/Hobix/UriStr.html +198 -0
  40. data/doc/rdoc/classes/Hobix/WebApp/QueryString.html +207 -0
  41. data/doc/rdoc/classes/Hobix/WebApp/QueryValidationFailure.html +111 -0
  42. data/doc/rdoc/classes/Hobix/WebApp.html +1383 -0
  43. data/doc/rdoc/classes/Hobix/Weblog/AuthorNotFound.html +111 -0
  44. data/doc/rdoc/classes/Hobix/Weblog.html +2082 -0
  45. data/doc/rdoc/classes/Hobix.html +399 -0
  46. data/doc/rdoc/classes/Kernel.html +139 -0
  47. data/doc/rdoc/classes/Regexp.html +154 -0
  48. data/doc/rdoc/classes/YAML/Omap.html +144 -0
  49. data/doc/rdoc/classes/YAML.html +111 -0
  50. data/doc/rdoc/created.rid +1 -0
  51. data/doc/rdoc/files/COPYING.html +129 -0
  52. data/doc/rdoc/files/README.html +131 -0
  53. data/doc/rdoc/files/doc/CHANGELOG.html +101 -0
  54. data/doc/rdoc/files/lib/hobix/api_rb.html +119 -0
  55. data/doc/rdoc/files/lib/hobix/article_rb.html +126 -0
  56. data/doc/rdoc/files/lib/hobix/base_rb.html +128 -0
  57. data/doc/rdoc/files/lib/hobix/bixwik_rb.html +126 -0
  58. data/doc/rdoc/files/lib/hobix/commandline_rb.html +140 -0
  59. data/doc/rdoc/files/lib/hobix/comments_rb.html +126 -0
  60. data/doc/rdoc/files/lib/hobix/config_rb.html +125 -0
  61. data/doc/rdoc/files/lib/hobix/datamarsh_rb.html +108 -0
  62. data/doc/rdoc/files/lib/hobix/entry_rb.html +118 -0
  63. data/doc/rdoc/files/lib/hobix/linklist_rb.html +127 -0
  64. data/doc/rdoc/files/lib/hobix/publisher_rb.html +126 -0
  65. data/doc/rdoc/files/lib/hobix/trackbacks_rb.html +128 -0
  66. data/doc/rdoc/files/lib/hobix/webapp_rb.html +127 -0
  67. data/doc/rdoc/files/lib/hobix/weblog_rb.html +135 -0
  68. data/doc/rdoc/files/lib/hobix_rb.html +127 -0
  69. data/doc/rdoc/fr_class_index.html +67 -0
  70. data/doc/rdoc/fr_file_index.html +44 -0
  71. data/doc/rdoc/fr_method_index.html +307 -0
  72. data/doc/rdoc/index.html +24 -0
  73. data/doc/rdoc/rdoc-style.css +208 -0
  74. data/git_hobix_update.php +13 -0
  75. data/lib/hobix/base.rb +6 -3
  76. data/lib/hobix/bixwik.rb +12 -12
  77. data/lib/hobix/commandline.rb +18 -2
  78. data/lib/hobix/comments.rb +4 -5
  79. data/lib/hobix/entry.rb +2 -1
  80. data/lib/hobix/facets/comments.rb +31 -6
  81. data/lib/hobix/linklist.rb +6 -1
  82. data/lib/hobix/out/atom.rb +29 -20
  83. data/lib/hobix/out/quick.rb +8 -6
  84. data/lib/hobix/out/rss.rb +16 -3
  85. data/lib/hobix/plugin/akismet.rb +196 -0
  86. data/lib/hobix/plugin/calendar.rb +6 -14
  87. data/lib/hobix/plugin/recent_comments.rb +4 -2
  88. data/lib/hobix/plugin/tags.rb +1 -1
  89. data/lib/hobix/storage/filesys.rb +41 -31
  90. data/lib/hobix/trackbacks.rb +1 -2
  91. data/lib/hobix/weblog.rb +73 -40
  92. data/lib/hobix.rb +9 -2
  93. data/share/default-blog/hobix.yaml +16 -0
  94. data/share/default-blog/htdocs/site.css +174 -0
  95. data/share/default-blog/skel/entry.html.quick +0 -0
  96. data/share/default-blog/skel/index.atom.atom +0 -0
  97. data/share/default-blog/skel/index.html.quick-summary +0 -0
  98. data/share/default-blog/skel/index.xml.rss +0 -0
  99. data/share/default-blog/skel/index.yaml.okaynews +0 -0
  100. data/share/default-blog/skel/monthly.html.quick-archive +0 -0
  101. data/share/default-blog/skel/section.html.quick-archive +0 -0
  102. data/share/default-blog/skel/yearly.html.quick-archive +0 -0
  103. data/share/default-blog-modes.yaml +7 -0
  104. data/share/default-blog.apache-cgi.patch +8 -0
  105. data/share/default-blog.apache-ssi.patch +38 -0
  106. data/share/default-blog.apache2-ssi.patch +3 -0
  107. data/share/default-blog.cgi.patch +8 -0
  108. data/share/default-blog.comments.patch +5 -0
  109. data/share/default-blog.prototype.patch +766 -0
  110. data/share/default-blog.publisher.patch +5 -0
  111. data/share/default-blog.wiki.patch +29 -0
  112. data/share/publisher/css/control.css +90 -0
  113. data/share/publisher/css/form.css +238 -0
  114. data/share/publisher/css/form.import.css +72 -0
  115. data/share/publisher/css/main-menu.css +134 -0
  116. data/share/publisher/i/hobix-emblazen-1.png +0 -0
  117. data/share/publisher/i/hobix-emblazen-2.png +0 -0
  118. data/share/publisher/i/hobix-emblazen-3.png +0 -0
  119. data/share/publisher/i/hobix-emblazen-4.png +0 -0
  120. data/share/publisher/i/hobix-emblazen-5.png +0 -0
  121. data/share/publisher/i/hobix-emblazen-6.png +0 -0
  122. data/share/publisher/i/hobix-emblazen-7.png +0 -0
  123. data/share/publisher/index.erb +66 -0
  124. data/share/publisher/js/controls.js +261 -0
  125. data/share/publisher/js/dragdrop.js +476 -0
  126. data/share/publisher/js/effects.js +570 -0
  127. data/share/publisher/js/prototype.js +1011 -0
  128. metadata +196 -53
  129. checksums.yaml +0 -7
@@ -0,0 +1,399 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Hobix</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Hobix</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/hobix_rb.html">
59
+ lib/hobix.rb
60
+ </a>
61
+ <br />
62
+ <a href="../files/lib/hobix/base_rb.html">
63
+ lib/hobix/base.rb
64
+ </a>
65
+ <br />
66
+ <a href="../files/lib/hobix/article_rb.html">
67
+ lib/hobix/article.rb
68
+ </a>
69
+ <br />
70
+ <a href="../files/lib/hobix/bixwik_rb.html">
71
+ lib/hobix/bixwik.rb
72
+ </a>
73
+ <br />
74
+ <a href="../files/lib/hobix/comments_rb.html">
75
+ lib/hobix/comments.rb
76
+ </a>
77
+ <br />
78
+ <a href="../files/lib/hobix/weblog_rb.html">
79
+ lib/hobix/weblog.rb
80
+ </a>
81
+ <br />
82
+ <a href="../files/lib/hobix/entry_rb.html">
83
+ lib/hobix/entry.rb
84
+ </a>
85
+ <br />
86
+ <a href="../files/lib/hobix/api_rb.html">
87
+ lib/hobix/api.rb
88
+ </a>
89
+ <br />
90
+ <a href="../files/lib/hobix/trackbacks_rb.html">
91
+ lib/hobix/trackbacks.rb
92
+ </a>
93
+ <br />
94
+ <a href="../files/lib/hobix/datamarsh_rb.html">
95
+ lib/hobix/datamarsh.rb
96
+ </a>
97
+ <br />
98
+ <a href="../files/lib/hobix/commandline_rb.html">
99
+ lib/hobix/commandline.rb
100
+ </a>
101
+ <br />
102
+ <a href="../files/lib/hobix/webapp_rb.html">
103
+ lib/hobix/webapp.rb
104
+ </a>
105
+ <br />
106
+ <a href="../files/lib/hobix/config_rb.html">
107
+ lib/hobix/config.rb
108
+ </a>
109
+ <br />
110
+ <a href="../files/lib/hobix/linklist_rb.html">
111
+ lib/hobix/linklist.rb
112
+ </a>
113
+ <br />
114
+ </td>
115
+ </tr>
116
+
117
+ </table>
118
+ </div>
119
+ <!-- banner header -->
120
+
121
+ <div id="bodyContent">
122
+
123
+
124
+
125
+ <div id="contextContent">
126
+
127
+ <div id="description">
128
+ <p>
129
+ The <a href="Hobix/LinkList.html">LinkList</a> class is an entry type for
130
+ storing links. It&#8216;s also a good example of how to subclass the <a
131
+ href="Hobix/Entry.html">Entry</a> class so you can store your own kinds of
132
+ entries.
133
+ </p>
134
+ <h2>Properties</h2>
135
+ <p>
136
+ The <a href="Hobix/LinkList.html">LinkList</a> responds to many of the same
137
+ properties listed in the +<a href="Hobix/Entry.html">Hobix::Entry</a>+
138
+ class. The primary difference is that, instead of having a <tt>content</tt>
139
+ property, there is a <tt>links</tt> property.
140
+ </p>
141
+ <table>
142
+ <tr><td valign="top">links:</td><td>Internally, this class stores a +<a href="YAML/Omap.html">YAML::Omap</a>+,
143
+ an Array of pairs. The links are kept in the order shown in the <a
144
+ href="YAML.html">YAML</a> file. They consist of a link title, paired with a
145
+ URL.
146
+
147
+ </td></tr>
148
+ </table>
149
+ <h2>Sample <a href="Hobix/LinkList.html">LinkList</a></h2>
150
+ <pre>
151
+ --- %YAML:1.0 !hobix.com,2004/linklist
152
+ title: Hobix Links
153
+ author: why
154
+ created: 2004-05-30 18:53:00 -06:00
155
+ links:
156
+ - Hobix: http://hobix.com/
157
+ - Learn Hobix: http://hobix.com/learn/
158
+ - Textile Reference: http://hobix.com/textile/
159
+ </pre>
160
+
161
+ </div>
162
+
163
+
164
+ </div>
165
+
166
+ <div id="method-list">
167
+ <h3 class="section-bar">Methods</h3>
168
+
169
+ <div class="name-list">
170
+ <a href="#M000005">WebApp</a>&nbsp;&nbsp;
171
+ <a href="#M000004">const_find</a>&nbsp;&nbsp;
172
+ </div>
173
+ </div>
174
+
175
+ </div>
176
+
177
+
178
+ <!-- if includes -->
179
+
180
+ <div id="section">
181
+
182
+ <div id="class-list">
183
+ <h3 class="section-bar">Classes and Modules</h3>
184
+
185
+ Module <a href="Hobix/BaseProperties.html" class="link">Hobix::BaseProperties</a><br />
186
+ Module <a href="Hobix/BixWik.html" class="link">Hobix::BixWik</a><br />
187
+ Module <a href="Hobix/CommandLine.html" class="link">Hobix::CommandLine</a><br />
188
+ Module <a href="Hobix/EntryEnum.html" class="link">Hobix::EntryEnum</a><br />
189
+ Module <a href="Hobix/Enumerable.html" class="link">Hobix::Enumerable</a><br />
190
+ Module <a href="Hobix/Facets.html" class="link">Hobix::Facets</a><br />
191
+ Module <a href="Hobix/Out.html" class="link">Hobix::Out</a><br />
192
+ Module <a href="Hobix/UriStr.html" class="link">Hobix::UriStr</a><br />
193
+ Class <a href="Hobix/API.html" class="link">Hobix::API</a><br />
194
+ Class <a href="Hobix/Article.html" class="link">Hobix::Article</a><br />
195
+ Class <a href="Hobix/BaseContent.html" class="link">Hobix::BaseContent</a><br />
196
+ Class <a href="Hobix/BaseEntry.html" class="link">Hobix::BaseEntry</a><br />
197
+ Class <a href="Hobix/BaseFacet.html" class="link">Hobix::BaseFacet</a><br />
198
+ Class <a href="Hobix/BaseOutput.html" class="link">Hobix::BaseOutput</a><br />
199
+ Class <a href="Hobix/BasePlugin.html" class="link">Hobix::BasePlugin</a><br />
200
+ Class <a href="Hobix/BasePublish.html" class="link">Hobix::BasePublish</a><br />
201
+ Class <a href="Hobix/BaseStorage.html" class="link">Hobix::BaseStorage</a><br />
202
+ Class <a href="Hobix/BixWikPlugin.html" class="link">Hobix::BixWikPlugin</a><br />
203
+ Class <a href="Hobix/Comment.html" class="link">Hobix::Comment</a><br />
204
+ Class <a href="Hobix/Config.html" class="link">Hobix::Config</a><br />
205
+ Class <a href="Hobix/DataMarsh.html" class="link">Hobix::DataMarsh</a><br />
206
+ Class <a href="Hobix/Entry.html" class="link">Hobix::Entry</a><br />
207
+ Class <a href="Hobix/LinkList.html" class="link">Hobix::LinkList</a><br />
208
+ Class <a href="Hobix/Page.html" class="link">Hobix::Page</a><br />
209
+ Class <a href="Hobix/Trackback.html" class="link">Hobix::Trackback</a><br />
210
+ Class <a href="Hobix/WebApp.html" class="link">Hobix::WebApp</a><br />
211
+ Class <a href="Hobix/Weblog.html" class="link">Hobix::Weblog</a><br />
212
+
213
+ </div>
214
+
215
+ <div id="constants-list">
216
+ <h3 class="section-bar">Constants</h3>
217
+
218
+ <div class="name-list">
219
+ <table summary="Constants">
220
+ <tr class="top-aligned-row context-row">
221
+ <td class="context-item-name">VERSION</td>
222
+ <td>=</td>
223
+ <td class="context-item-value">'0.5'</td>
224
+ <td width="3em">&nbsp;</td>
225
+ <td class="context-item-desc">
226
+ Version used to compare installations
227
+
228
+ </td>
229
+ </tr>
230
+ <tr class="top-aligned-row context-row">
231
+ <td class="context-item-name">CVS_ID</td>
232
+ <td>=</td>
233
+ <td class="context-item-value">&quot;$Id$&quot;</td>
234
+ <td width="3em">&nbsp;</td>
235
+ <td class="context-item-desc">
236
+ CVS information
237
+
238
+ </td>
239
+ </tr>
240
+ <tr class="top-aligned-row context-row">
241
+ <td class="context-item-name">CVS_REV</td>
242
+ <td>=</td>
243
+ <td class="context-item-value">&quot;$Revision$&quot;[11..-3]</td>
244
+ </tr>
245
+ <tr class="top-aligned-row context-row">
246
+ <td class="context-item-name">SHARE_PATH</td>
247
+ <td>=</td>
248
+ <td class="context-item-value">share_path</td>
249
+ </tr>
250
+ <tr class="top-aligned-row context-row">
251
+ <td class="context-item-name">SHARE_PATH</td>
252
+ <td>=</td>
253
+ <td class="context-item-value">&quot;#{ ::Config::CONFIG['datadir'] }/hobix/&quot;</td>
254
+ </tr>
255
+ </table>
256
+ </div>
257
+ </div>
258
+
259
+
260
+
261
+
262
+
263
+
264
+ <!-- if method_list -->
265
+ <div id="methods">
266
+ <h3 class="section-bar">Public Class methods</h3>
267
+
268
+ <div id="method-M000005" class="method-detail">
269
+ <a name="M000005"></a>
270
+
271
+ <div class="method-heading">
272
+ <a href="#M000005" class="method-signature">
273
+ <span class="method-name">WebApp</span><span class="method-args">() {|webapp| ...}</span>
274
+ </a>
275
+ </div>
276
+
277
+ <div class="method-description">
278
+ <p>
279
+ <a href="Hobix.html#M000005">WebApp</a> is a main routine of web
280
+ application. It should be called from a toplevel of a
281
+ CGI/FastCGI/mod_ruby/WEBrick script.
282
+ </p>
283
+ <p>
284
+ <a href="Hobix.html#M000005">WebApp</a> is used as follows.
285
+ </p>
286
+ <pre>
287
+ #!/usr/bin/env ruby
288
+
289
+ require 'webapp'
290
+
291
+ ... class/method definitions ... # run once per process.
292
+
293
+ WebApp {|webapp| # This block runs once per request.
294
+ ... process a request ...
295
+ }
296
+ </pre>
297
+ <p>
298
+ <a href="Hobix.html#M000005">WebApp</a> yields with an object of the class
299
+ <a href="Hobix.html#M000005">WebApp</a>. The object contains request and
300
+ response.
301
+ </p>
302
+ <p>
303
+ <a href="Hobix.html#M000005">WebApp</a> rise $SAFE to 1.
304
+ </p>
305
+ <p>
306
+ <a href="Hobix.html#M000005">WebApp</a> catches all kind of exception
307
+ raised in the block. If HTTP connection is made from localhost or a
308
+ developper host, the backtrace is sent back to the browser. Otherwise, the
309
+ backtrace is sent to stderr usually which is redirected to error.log. The
310
+ developper hosts are specified by the environment variable
311
+ WEBAPP_DEVELOP_HOST. It may be an IP address such as
312
+ &quot;111.222.333.444&quot; or an network address such as
313
+ &quot;111.222.333.0/24&quot;. (An environment variable for CGI can be set
314
+ by SetEnv directive in Apache.)
315
+ </p>
316
+ <p><a class="source-toggle" href="#"
317
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
318
+ <div class="method-source-code" id="M000005-source">
319
+ <pre>
320
+ <span class="ruby-comment cmt"># File lib/hobix/webapp.rb, line 693</span>
321
+ 693: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-constant">WebApp</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-comment cmt"># :yields: webapp</span>
322
+ 694: <span class="ruby-identifier">$SAFE</span> = <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$SAFE</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">1</span>
323
+ 695: <span class="ruby-identifier">manager</span> = <span class="ruby-constant">WebApp</span><span class="ruby-operator">::</span><span class="ruby-constant">Manager</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">block</span>)
324
+ 696: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">Apache</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">Apache</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Apache</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>)
325
+ 697: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_rbx</span> }
326
+ 698: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:webrick_load_servlet</span>]
327
+ 699: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_webrick</span> }
328
+ 700: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">STDIN</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:stat</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">STDIN</span>.<span class="ruby-identifier">stat</span>.<span class="ruby-identifier">socket?</span> <span class="ruby-operator">&amp;&amp;</span>
329
+ 701: <span class="ruby-keyword kw">begin</span>
330
+ 702: <span class="ruby-comment cmt"># getpeername(FCGI_LISTENSOCK_FILENO) causes ENOTCONN on FastCGI</span>
331
+ 703: <span class="ruby-comment cmt"># cf. http://www.fastcgi.com/devkit/doc/fcgi-spec.html</span>
332
+ 704: <span class="ruby-identifier">require</span> <span class="ruby-value str">'socket'</span>
333
+ 705: <span class="ruby-identifier">sock</span> = <span class="ruby-constant">Socket</span>.<span class="ruby-identifier">for_fd</span>(<span class="ruby-value">0</span>)
334
+ 706: <span class="ruby-identifier">sock</span>.<span class="ruby-identifier">getpeername</span>
335
+ 707: <span class="ruby-keyword kw">false</span>
336
+ 708: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOTCONN</span>
337
+ 709: <span class="ruby-keyword kw">true</span>
338
+ 710: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SystemCallError</span>
339
+ 711: <span class="ruby-keyword kw">false</span>
340
+ 712: <span class="ruby-keyword kw">end</span>
341
+ 713: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_fcgi</span> }
342
+ 714: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'REQUEST_METHOD'</span>)
343
+ 715: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_cgi</span> }
344
+ 716: <span class="ruby-keyword kw">else</span>
345
+ 717: <span class="ruby-identifier">require</span> <span class="ruby-value str">'hobix/webapp/cli'</span>
346
+ 718: <span class="ruby-identifier">run</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-identifier">manager</span>.<span class="ruby-identifier">run_cli</span> }
347
+ 719: <span class="ruby-keyword kw">end</span>
348
+ 720: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:webapp_delay</span>]
349
+ 721: <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:webapp_proc</span>] = <span class="ruby-identifier">run</span>
350
+ 722: <span class="ruby-keyword kw">else</span>
351
+ 723: <span class="ruby-identifier">run</span>.<span class="ruby-identifier">call</span>
352
+ 724: <span class="ruby-keyword kw">end</span>
353
+ 725: <span class="ruby-keyword kw">end</span>
354
+ </pre>
355
+ </div>
356
+ </div>
357
+ </div>
358
+
359
+ <div id="method-M000004" class="method-detail">
360
+ <a name="M000004"></a>
361
+
362
+ <div class="method-heading">
363
+ <a href="#M000004" class="method-signature">
364
+ <span class="method-name">const_find</span><span class="method-args">( tclass )</span>
365
+ </a>
366
+ </div>
367
+
368
+ <div class="method-description">
369
+ <p>
370
+ Get a top-level constant from a string
371
+ </p>
372
+ <p><a class="source-toggle" href="#"
373
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
374
+ <div class="method-source-code" id="M000004-source">
375
+ <pre>
376
+ <span class="ruby-comment cmt"># File lib/hobix.rb, line 224</span>
377
+ 224: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">const_find</span>( <span class="ruby-identifier">tclass</span> )
378
+ 225: <span class="ruby-identifier">obj_class</span> = <span class="ruby-constant">Object</span>
379
+ 226: <span class="ruby-identifier">tclass</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">&quot;::&quot;</span> ).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">obj_class</span> = <span class="ruby-identifier">obj_class</span>.<span class="ruby-identifier">const_get</span>( <span class="ruby-identifier">c</span> ) }
380
+ 227: <span class="ruby-identifier">obj_class</span>
381
+ 228: <span class="ruby-keyword kw">end</span>
382
+ </pre>
383
+ </div>
384
+ </div>
385
+ </div>
386
+
387
+
388
+ </div>
389
+
390
+
391
+ </div>
392
+
393
+
394
+ <div id="validator-badges">
395
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
396
+ </div>
397
+
398
+ </body>
399
+ </html>
@@ -0,0 +1,139 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Kernel</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Kernel</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/hobix/webapp_rb.html">
59
+ lib/hobix/webapp.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000002">puts</a>&nbsp;&nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+ <div id="methods">
103
+ <h3 class="section-bar">Public Instance methods</h3>
104
+
105
+ <div id="method-M000002" class="method-detail">
106
+ <a name="M000002"></a>
107
+
108
+ <div class="method-heading">
109
+ <a href="#M000002" class="method-signature">
110
+ <span class="method-name">puts</span><span class="method-args">( *args )</span>
111
+ </a>
112
+ </div>
113
+
114
+ <div class="method-description">
115
+ <p><a class="source-toggle" href="#"
116
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
117
+ <div class="method-source-code" id="M000002-source">
118
+ <pre>
119
+ <span class="ruby-comment cmt"># File lib/hobix/webapp.rb, line 30</span>
120
+ 30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">puts</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
121
+ 31: <span class="ruby-keyword kw">end</span>
122
+ </pre>
123
+ </div>
124
+ </div>
125
+ </div>
126
+
127
+
128
+ </div>
129
+
130
+
131
+ </div>
132
+
133
+
134
+ <div id="validator-badges">
135
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
136
+ </div>
137
+
138
+ </body>
139
+ </html>