hobix 0.4 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +18 -0
- data/README +18 -0
- data/Rakefile +96 -0
- data/bin/hobix +7 -3
- data/contrib/blosxom-to-hobix.rb +253 -0
- data/contrib/txp-to-hobix.rb +56 -0
- data/contrib/webrick-all-mine.rb +20 -0
- data/doc/CHANGELOG +285 -0
- data/doc/rdoc/classes/Hobix/API.html +382 -0
- data/doc/rdoc/classes/Hobix/Article.html +111 -0
- data/doc/rdoc/classes/Hobix/BaseContent.html +692 -0
- data/doc/rdoc/classes/Hobix/BaseEntry.html +218 -0
- data/doc/rdoc/classes/Hobix/BaseFacet.html +205 -0
- data/doc/rdoc/classes/Hobix/BaseOutput.html +122 -0
- data/doc/rdoc/classes/Hobix/BasePlugin.html +201 -0
- data/doc/rdoc/classes/Hobix/BaseProperties/ClassMethods.html +243 -0
- data/doc/rdoc/classes/Hobix/BaseProperties.html +218 -0
- data/doc/rdoc/classes/Hobix/BasePublish.html +157 -0
- data/doc/rdoc/classes/Hobix/BaseStorage.html +417 -0
- data/doc/rdoc/classes/Hobix/BixWik/Entry.html +196 -0
- data/doc/rdoc/classes/Hobix/BixWik/IndexEntry.html +170 -0
- data/doc/rdoc/classes/Hobix/BixWik/WikiRedCloth.html +111 -0
- data/doc/rdoc/classes/Hobix/BixWik.html +418 -0
- data/doc/rdoc/classes/Hobix/BixWikPlugin.html +158 -0
- data/doc/rdoc/classes/Hobix/CommandLine.html +1970 -0
- data/doc/rdoc/classes/Hobix/Comment.html +113 -0
- data/doc/rdoc/classes/Hobix/Config.html +212 -0
- data/doc/rdoc/classes/Hobix/DataMarsh.html +667 -0
- data/doc/rdoc/classes/Hobix/Entry.html +178 -0
- data/doc/rdoc/classes/Hobix/EntryEnum.html +162 -0
- data/doc/rdoc/classes/Hobix/Enumerable.html +170 -0
- data/doc/rdoc/classes/Hobix/Facets/WikiEdit.html +180 -0
- data/doc/rdoc/classes/Hobix/Facets.html +111 -0
- data/doc/rdoc/classes/Hobix/LinkList.html +182 -0
- data/doc/rdoc/classes/Hobix/Out/Quick.html +412 -0
- data/doc/rdoc/classes/Hobix/Out.html +119 -0
- data/doc/rdoc/classes/Hobix/Page.html +381 -0
- data/doc/rdoc/classes/Hobix/Trackback.html +113 -0
- data/doc/rdoc/classes/Hobix/UriStr.html +198 -0
- data/doc/rdoc/classes/Hobix/WebApp/QueryString.html +207 -0
- data/doc/rdoc/classes/Hobix/WebApp/QueryValidationFailure.html +111 -0
- data/doc/rdoc/classes/Hobix/WebApp.html +1383 -0
- data/doc/rdoc/classes/Hobix/Weblog/AuthorNotFound.html +111 -0
- data/doc/rdoc/classes/Hobix/Weblog.html +2082 -0
- data/doc/rdoc/classes/Hobix.html +399 -0
- data/doc/rdoc/classes/Kernel.html +139 -0
- data/doc/rdoc/classes/Regexp.html +154 -0
- data/doc/rdoc/classes/YAML/Omap.html +144 -0
- data/doc/rdoc/classes/YAML.html +111 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/COPYING.html +129 -0
- data/doc/rdoc/files/README.html +131 -0
- data/doc/rdoc/files/doc/CHANGELOG.html +101 -0
- data/doc/rdoc/files/lib/hobix/api_rb.html +119 -0
- data/doc/rdoc/files/lib/hobix/article_rb.html +126 -0
- data/doc/rdoc/files/lib/hobix/base_rb.html +128 -0
- data/doc/rdoc/files/lib/hobix/bixwik_rb.html +126 -0
- data/doc/rdoc/files/lib/hobix/commandline_rb.html +140 -0
- data/doc/rdoc/files/lib/hobix/comments_rb.html +126 -0
- data/doc/rdoc/files/lib/hobix/config_rb.html +125 -0
- data/doc/rdoc/files/lib/hobix/datamarsh_rb.html +108 -0
- data/doc/rdoc/files/lib/hobix/entry_rb.html +118 -0
- data/doc/rdoc/files/lib/hobix/linklist_rb.html +127 -0
- data/doc/rdoc/files/lib/hobix/publisher_rb.html +126 -0
- data/doc/rdoc/files/lib/hobix/trackbacks_rb.html +128 -0
- data/doc/rdoc/files/lib/hobix/webapp_rb.html +127 -0
- data/doc/rdoc/files/lib/hobix/weblog_rb.html +135 -0
- data/doc/rdoc/files/lib/hobix_rb.html +127 -0
- data/doc/rdoc/fr_class_index.html +67 -0
- data/doc/rdoc/fr_file_index.html +44 -0
- data/doc/rdoc/fr_method_index.html +307 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/git_hobix_update.php +13 -0
- data/lib/hobix/base.rb +6 -3
- data/lib/hobix/bixwik.rb +12 -12
- data/lib/hobix/commandline.rb +18 -2
- data/lib/hobix/comments.rb +4 -5
- data/lib/hobix/entry.rb +2 -1
- data/lib/hobix/facets/comments.rb +31 -6
- data/lib/hobix/linklist.rb +6 -1
- data/lib/hobix/out/atom.rb +29 -20
- data/lib/hobix/out/quick.rb +8 -6
- data/lib/hobix/out/rss.rb +16 -3
- data/lib/hobix/plugin/akismet.rb +196 -0
- data/lib/hobix/plugin/calendar.rb +6 -14
- data/lib/hobix/plugin/recent_comments.rb +4 -2
- data/lib/hobix/plugin/tags.rb +1 -1
- data/lib/hobix/storage/filesys.rb +41 -31
- data/lib/hobix/trackbacks.rb +1 -2
- data/lib/hobix/weblog.rb +73 -40
- data/lib/hobix.rb +9 -2
- data/share/default-blog/hobix.yaml +16 -0
- data/share/default-blog/htdocs/site.css +174 -0
- data/share/default-blog/skel/entry.html.quick +0 -0
- data/share/default-blog/skel/index.atom.atom +0 -0
- data/share/default-blog/skel/index.html.quick-summary +0 -0
- data/share/default-blog/skel/index.xml.rss +0 -0
- data/share/default-blog/skel/index.yaml.okaynews +0 -0
- data/share/default-blog/skel/monthly.html.quick-archive +0 -0
- data/share/default-blog/skel/section.html.quick-archive +0 -0
- data/share/default-blog/skel/yearly.html.quick-archive +0 -0
- data/share/default-blog-modes.yaml +7 -0
- data/share/default-blog.apache-cgi.patch +8 -0
- data/share/default-blog.apache-ssi.patch +38 -0
- data/share/default-blog.apache2-ssi.patch +3 -0
- data/share/default-blog.cgi.patch +8 -0
- data/share/default-blog.comments.patch +5 -0
- data/share/default-blog.prototype.patch +766 -0
- data/share/default-blog.publisher.patch +5 -0
- data/share/default-blog.wiki.patch +29 -0
- data/share/publisher/css/control.css +90 -0
- data/share/publisher/css/form.css +238 -0
- data/share/publisher/css/form.import.css +72 -0
- data/share/publisher/css/main-menu.css +134 -0
- data/share/publisher/i/hobix-emblazen-1.png +0 -0
- data/share/publisher/i/hobix-emblazen-2.png +0 -0
- data/share/publisher/i/hobix-emblazen-3.png +0 -0
- data/share/publisher/i/hobix-emblazen-4.png +0 -0
- data/share/publisher/i/hobix-emblazen-5.png +0 -0
- data/share/publisher/i/hobix-emblazen-6.png +0 -0
- data/share/publisher/i/hobix-emblazen-7.png +0 -0
- data/share/publisher/index.erb +66 -0
- data/share/publisher/js/controls.js +261 -0
- data/share/publisher/js/dragdrop.js +476 -0
- data/share/publisher/js/effects.js +570 -0
- data/share/publisher/js/prototype.js +1011 -0
- metadata +196 -53
- checksums.yaml +0 -7
@@ -0,0 +1,382 @@
|
|
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>Class: Hobix::API</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>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Hobix::API</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/hobix/api_rb.html">
|
59
|
+
lib/hobix/api.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="BaseFacet.html">
|
69
|
+
BaseFacet
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
The <a href="API.html">API</a> facet
|
86
|
+
</p>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div id="method-list">
|
94
|
+
<h3 class="section-bar">Methods</h3>
|
95
|
+
|
96
|
+
<div class="name-list">
|
97
|
+
<a href="#M000137">edit_action</a>
|
98
|
+
<a href="#M000130">get</a>
|
99
|
+
<a href="#M000134">list_action</a>
|
100
|
+
<a href="#M000129">new</a>
|
101
|
+
<a href="#M000133">new_action</a>
|
102
|
+
<a href="#M000136">post_action</a>
|
103
|
+
<a href="#M000132">regen_action</a>
|
104
|
+
<a href="#M000135">search_action</a>
|
105
|
+
<a href="#M000131">upgen_action</a>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
<!-- if includes -->
|
113
|
+
|
114
|
+
<div id="section">
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<!-- if method_list -->
|
124
|
+
<div id="methods">
|
125
|
+
<h3 class="section-bar">Public Class methods</h3>
|
126
|
+
|
127
|
+
<div id="method-M000129" class="method-detail">
|
128
|
+
<a name="M000129"></a>
|
129
|
+
|
130
|
+
<div class="method-heading">
|
131
|
+
<a href="#M000129" class="method-signature">
|
132
|
+
<span class="method-name">new</span><span class="method-args">( weblog, defaults = {} )</span>
|
133
|
+
</a>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<div class="method-description">
|
137
|
+
<p><a class="source-toggle" href="#"
|
138
|
+
onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
|
139
|
+
<div class="method-source-code" id="M000129-source">
|
140
|
+
<pre>
|
141
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 21</span>
|
142
|
+
21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">weblog</span>, <span class="ruby-identifier">defaults</span> = {} )
|
143
|
+
22: <span class="ruby-ivar">@weblog</span> = <span class="ruby-identifier">weblog</span>
|
144
|
+
23: <span class="ruby-keyword kw">end</span>
|
145
|
+
</pre>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
151
|
+
|
152
|
+
<div id="method-M000137" class="method-detail">
|
153
|
+
<a name="M000137"></a>
|
154
|
+
|
155
|
+
<div class="method-heading">
|
156
|
+
<a href="#M000137" class="method-signature">
|
157
|
+
<span class="method-name">edit_action</span><span class="method-args">()</span>
|
158
|
+
</a>
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<div class="method-description">
|
162
|
+
<p><a class="source-toggle" href="#"
|
163
|
+
onclick="toggleCode('M000137-source');return false;">[Source]</a></p>
|
164
|
+
<div class="method-source-code" id="M000137-source">
|
165
|
+
<pre>
|
166
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 79</span>
|
167
|
+
79: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">edit_action</span>
|
168
|
+
80: <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">request_method</span>
|
169
|
+
81: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"GET"</span>
|
170
|
+
82: <span class="ruby-ivar">@weblog</span>
|
171
|
+
83: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"POST"</span>
|
172
|
+
84: <span class="ruby-identifier">config</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>( <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">request_body</span> )
|
173
|
+
85: <span class="ruby-identifier">config</span>.<span class="ruby-identifier">save</span> <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">hobix_yaml</span>
|
174
|
+
86: <span class="ruby-value str">"Weblog configuration saved."</span>
|
175
|
+
87: <span class="ruby-keyword kw">end</span>
|
176
|
+
88: <span class="ruby-keyword kw">end</span>
|
177
|
+
</pre>
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
</div>
|
181
|
+
|
182
|
+
<div id="method-M000130" class="method-detail">
|
183
|
+
<a name="M000130"></a>
|
184
|
+
|
185
|
+
<div class="method-heading">
|
186
|
+
<a href="#M000130" class="method-signature">
|
187
|
+
<span class="method-name">get</span><span class="method-args">(app)</span>
|
188
|
+
</a>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
<div class="method-description">
|
192
|
+
<p><a class="source-toggle" href="#"
|
193
|
+
onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
|
194
|
+
<div class="method-source-code" id="M000130-source">
|
195
|
+
<pre>
|
196
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 24</span>
|
197
|
+
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span> <span class="ruby-identifier">app</span>
|
198
|
+
25: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:action_uri</span>
|
199
|
+
26: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">protect</span> <span class="ruby-identifier">app</span>, <span class="ruby-ivar">@weblog</span>
|
200
|
+
27: <span class="ruby-ivar">@app</span> = <span class="ruby-identifier">app</span>
|
201
|
+
28: <span class="ruby-identifier">prefix</span>, <span class="ruby-identifier">action</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> = <span class="ruby-identifier">app</span>.<span class="ruby-identifier">action_uri</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">'/'</span> )
|
202
|
+
29: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">prefix</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"remote"</span>
|
203
|
+
30: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-node">"#{ action }_action"</span>
|
204
|
+
31: <span class="ruby-keyword kw">begin</span>
|
205
|
+
32: <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">method</span>( <span class="ruby-node">"#{ action }_action"</span> ).<span class="ruby-identifier">call</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> ).<span class="ruby-identifier">to_yaml</span>
|
206
|
+
33: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
207
|
+
34: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">StandardError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
208
|
+
35: <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_yaml</span>
|
209
|
+
36: <span class="ruby-keyword kw">end</span>
|
210
|
+
37: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
211
|
+
38: <span class="ruby-keyword kw">end</span>
|
212
|
+
39: <span class="ruby-keyword kw">end</span>
|
213
|
+
40: <span class="ruby-keyword kw">end</span>
|
214
|
+
41: <span class="ruby-keyword kw">end</span>
|
215
|
+
</pre>
|
216
|
+
</div>
|
217
|
+
</div>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div id="method-M000134" class="method-detail">
|
221
|
+
<a name="M000134"></a>
|
222
|
+
|
223
|
+
<div class="method-heading">
|
224
|
+
<a href="#M000134" class="method-signature">
|
225
|
+
<span class="method-name">list_action</span><span class="method-args">( *inpath )</span>
|
226
|
+
</a>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
<div class="method-description">
|
230
|
+
<p><a class="source-toggle" href="#"
|
231
|
+
onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
|
232
|
+
<div class="method-source-code" id="M000134-source">
|
233
|
+
<pre>
|
234
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 57</span>
|
235
|
+
57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">list_action</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">inpath</span> )
|
236
|
+
58: <span class="ruby-identifier">inpath</span> = <span class="ruby-identifier">inpath</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'/'</span>
|
237
|
+
59: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">storage</span>.<span class="ruby-identifier">find</span>( <span class="ruby-identifier">:all</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">:inpath</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">inpath</span> )
|
238
|
+
60: <span class="ruby-keyword kw">end</span>
|
239
|
+
</pre>
|
240
|
+
</div>
|
241
|
+
</div>
|
242
|
+
</div>
|
243
|
+
|
244
|
+
<div id="method-M000133" class="method-detail">
|
245
|
+
<a name="M000133"></a>
|
246
|
+
|
247
|
+
<div class="method-heading">
|
248
|
+
<a href="#M000133" class="method-signature">
|
249
|
+
<span class="method-name">new_action</span><span class="method-args">()</span>
|
250
|
+
</a>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
<div class="method-description">
|
254
|
+
<p><a class="source-toggle" href="#"
|
255
|
+
onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
|
256
|
+
<div class="method-source-code" id="M000133-source">
|
257
|
+
<pre>
|
258
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 53</span>
|
259
|
+
53: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_action</span>
|
260
|
+
54: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">entry_class</span>.<span class="ruby-identifier">new</span>
|
261
|
+
55: <span class="ruby-keyword kw">end</span>
|
262
|
+
</pre>
|
263
|
+
</div>
|
264
|
+
</div>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div id="method-M000136" class="method-detail">
|
268
|
+
<a name="M000136"></a>
|
269
|
+
|
270
|
+
<div class="method-heading">
|
271
|
+
<a href="#M000136" class="method-signature">
|
272
|
+
<span class="method-name">post_action</span><span class="method-args">( *id )</span>
|
273
|
+
</a>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
<div class="method-description">
|
277
|
+
<p><a class="source-toggle" href="#"
|
278
|
+
onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
|
279
|
+
<div class="method-source-code" id="M000136-source">
|
280
|
+
<pre>
|
281
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 67</span>
|
282
|
+
67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_action</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">id</span> )
|
283
|
+
68: <span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'/'</span>
|
284
|
+
69: <span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">request_method</span>
|
285
|
+
70: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"GET"</span>
|
286
|
+
71: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">storage</span>.<span class="ruby-identifier">load_entry</span> <span class="ruby-identifier">id</span>
|
287
|
+
72: <span class="ruby-keyword kw">when</span> <span class="ruby-value str">"POST"</span>
|
288
|
+
73: <span class="ruby-identifier">entry</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>( <span class="ruby-ivar">@app</span>.<span class="ruby-identifier">request_body</span> )
|
289
|
+
74: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">storage</span>.<span class="ruby-identifier">save_entry</span> <span class="ruby-identifier">id</span>, <span class="ruby-identifier">entry</span>
|
290
|
+
75: <span class="ruby-value str">"Entry successfully saved."</span>
|
291
|
+
76: <span class="ruby-keyword kw">end</span>
|
292
|
+
77: <span class="ruby-keyword kw">end</span>
|
293
|
+
</pre>
|
294
|
+
</div>
|
295
|
+
</div>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
<div id="method-M000132" class="method-detail">
|
299
|
+
<a name="M000132"></a>
|
300
|
+
|
301
|
+
<div class="method-heading">
|
302
|
+
<a href="#M000132" class="method-signature">
|
303
|
+
<span class="method-name">regen_action</span><span class="method-args">()</span>
|
304
|
+
</a>
|
305
|
+
</div>
|
306
|
+
|
307
|
+
<div class="method-description">
|
308
|
+
<p><a class="source-toggle" href="#"
|
309
|
+
onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
|
310
|
+
<div class="method-source-code" id="M000132-source">
|
311
|
+
<pre>
|
312
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 48</span>
|
313
|
+
48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">regen_action</span>
|
314
|
+
49: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">regenerate</span>
|
315
|
+
50: <span class="ruby-value str">"Regeneration complete"</span>
|
316
|
+
51: <span class="ruby-keyword kw">end</span>
|
317
|
+
</pre>
|
318
|
+
</div>
|
319
|
+
</div>
|
320
|
+
</div>
|
321
|
+
|
322
|
+
<div id="method-M000135" class="method-detail">
|
323
|
+
<a name="M000135"></a>
|
324
|
+
|
325
|
+
<div class="method-heading">
|
326
|
+
<a href="#M000135" class="method-signature">
|
327
|
+
<span class="method-name">search_action</span><span class="method-args">( words, *inpath )</span>
|
328
|
+
</a>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
<div class="method-description">
|
332
|
+
<p><a class="source-toggle" href="#"
|
333
|
+
onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
|
334
|
+
<div class="method-source-code" id="M000135-source">
|
335
|
+
<pre>
|
336
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 62</span>
|
337
|
+
62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_action</span>( <span class="ruby-identifier">words</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">inpath</span> )
|
338
|
+
63: <span class="ruby-identifier">inpath</span> = <span class="ruby-identifier">inpath</span>.<span class="ruby-identifier">join</span> <span class="ruby-value str">'/'</span>
|
339
|
+
64: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">storage</span>.<span class="ruby-identifier">find</span>( <span class="ruby-identifier">:all</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">:inpath</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">inpath</span>, <span class="ruby-identifier">:search</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">words</span>.<span class="ruby-identifier">split</span>( <span class="ruby-value str">','</span> ) )
|
340
|
+
65: <span class="ruby-keyword kw">end</span>
|
341
|
+
</pre>
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
</div>
|
345
|
+
|
346
|
+
<div id="method-M000131" class="method-detail">
|
347
|
+
<a name="M000131"></a>
|
348
|
+
|
349
|
+
<div class="method-heading">
|
350
|
+
<a href="#M000131" class="method-signature">
|
351
|
+
<span class="method-name">upgen_action</span><span class="method-args">()</span>
|
352
|
+
</a>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
<div class="method-description">
|
356
|
+
<p><a class="source-toggle" href="#"
|
357
|
+
onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
|
358
|
+
<div class="method-source-code" id="M000131-source">
|
359
|
+
<pre>
|
360
|
+
<span class="ruby-comment cmt"># File lib/hobix/api.rb, line 43</span>
|
361
|
+
43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">upgen_action</span>
|
362
|
+
44: <span class="ruby-ivar">@weblog</span>.<span class="ruby-identifier">regenerate</span>( <span class="ruby-identifier">:update</span> )
|
363
|
+
45: <span class="ruby-value str">"Regeneration complete"</span>
|
364
|
+
46: <span class="ruby-keyword kw">end</span>
|
365
|
+
</pre>
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
</div>
|
369
|
+
|
370
|
+
|
371
|
+
</div>
|
372
|
+
|
373
|
+
|
374
|
+
</div>
|
375
|
+
|
376
|
+
|
377
|
+
<div id="validator-badges">
|
378
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
379
|
+
</div>
|
380
|
+
|
381
|
+
</body>
|
382
|
+
</html>
|
@@ -0,0 +1,111 @@
|
|
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>Class: Hobix::Article</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>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Hobix::Article</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/hobix/article_rb.html">
|
59
|
+
lib/hobix/article.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
<!-- if includes -->
|
90
|
+
|
91
|
+
<div id="section">
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<!-- if method_list -->
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<div id="validator-badges">
|
107
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</body>
|
111
|
+
</html>
|