RuGPost 0.1.0.beta.3 → 0.1.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,212 @@
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: RuGPost::Project</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">RuGPost::Project</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/rugpost/project_rb.html">
59
+ lib/rugpost/project.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
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000016">add_repo</a>&nbsp;&nbsp;
90
+ <a href="#M000017">config</a>&nbsp;&nbsp;
91
+ <a href="#M000015">create</a>&nbsp;&nbsp;
92
+ </div>
93
+ </div>
94
+
95
+ </div>
96
+
97
+
98
+ <!-- if includes -->
99
+
100
+ <div id="section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <!-- if method_list -->
110
+ <div id="methods">
111
+ <h3 class="section-bar">Public Class methods</h3>
112
+
113
+ <div id="method-M000016" class="method-detail">
114
+ <a name="M000016"></a>
115
+
116
+ <div class="method-heading">
117
+ <a href="#M000016" class="method-signature">
118
+ <span class="method-name">add_repo</span><span class="method-args">(args=[],ops={})</span>
119
+ </a>
120
+ </div>
121
+
122
+ <div class="method-description">
123
+ <p><a class="source-toggle" href="#"
124
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000016-source">
126
+ <pre>
127
+ <span class="ruby-comment cmt"># File lib/rugpost/project.rb, line 12</span>
128
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Project</span>.<span class="ruby-identifier">add_repo</span>(<span class="ruby-identifier">args</span>=[],<span class="ruby-identifier">ops</span>={})
129
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Must supply repo name&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
130
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Site repo already exists&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>])
131
+ <span class="ruby-comment cmt"># create repository structure</span>
132
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
133
+ <span class="ruby-identifier">repo</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
134
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">repo</span>)
135
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">repo</span><span class="ruby-operator">/</span><span class="ruby-value str">'drafts'</span>)
136
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">repo</span><span class="ruby-operator">/</span><span class="ruby-value str">'published'</span>)
137
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">repo</span><span class="ruby-operator">/</span><span class="ruby-value str">'published/source'</span>)
138
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">repo</span><span class="ruby-operator">/</span><span class="ruby-value str">'published/output'</span>)
139
+ <span class="ruby-comment cmt"># display respositories collections</span>
140
+ <span class="ruby-keyword kw">end</span>
141
+ </pre>
142
+ </div>
143
+ </div>
144
+ </div>
145
+
146
+ <div id="method-M000017" class="method-detail">
147
+ <a name="M000017"></a>
148
+
149
+ <div class="method-heading">
150
+ <a href="#M000017" class="method-signature">
151
+ <span class="method-name">config</span><span class="method-args">(args=[],ops={})</span>
152
+ </a>
153
+ </div>
154
+
155
+ <div class="method-description">
156
+ <p><a class="source-toggle" href="#"
157
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
158
+ <div class="method-source-code" id="M000017-source">
159
+ <pre>
160
+ <span class="ruby-comment cmt"># File lib/rugpost/project.rb, line 26</span>
161
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Project</span>.<span class="ruby-identifier">config</span>(<span class="ruby-identifier">args</span>=[],<span class="ruby-identifier">ops</span>={})
162
+ <span class="ruby-comment cmt"># load configuration as hash</span>
163
+ <span class="ruby-identifier">config</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_file</span>( <span class="ruby-constant">CONFIG</span> )
164
+ <span class="ruby-comment cmt"># set key</span>
165
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">ops</span>)
166
+ <span class="ruby-comment cmt"># hash to config</span>
167
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-constant">CONFIG</span>,<span class="ruby-value str">'w'</span> ) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>( <span class="ruby-identifier">config</span>.<span class="ruby-identifier">to_yaml</span> )}
168
+ <span class="ruby-keyword kw">end</span>
169
+ </pre>
170
+ </div>
171
+ </div>
172
+ </div>
173
+
174
+ <div id="method-M000015" class="method-detail">
175
+ <a name="M000015"></a>
176
+
177
+ <div class="method-heading">
178
+ <a href="#M000015" class="method-signature">
179
+ <span class="method-name">create</span><span class="method-args">(args=[],ops={})</span>
180
+ </a>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+ <p><a class="source-toggle" href="#"
185
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
186
+ <div class="method-source-code" id="M000015-source">
187
+ <pre>
188
+ <span class="ruby-comment cmt"># File lib/rugpost/project.rb, line 5</span>
189
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Project</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">args</span>=[],<span class="ruby-identifier">ops</span>={})
190
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Must supply poject name&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">==</span><span class="ruby-value">1</span>
191
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>( <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>] )
192
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]<span class="ruby-operator">/</span><span class="ruby-constant">CONFIG</span>, <span class="ruby-value str">'w'</span> ) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">&quot;---\n:gmail: e.141592&quot;</span>) }
193
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]<span class="ruby-operator">/</span><span class="ruby-constant">TEMPLATE</span>, <span class="ruby-value str">'w'</span> ) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">template_meta</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;---\n&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">template_body</span>)}
194
+ <span class="ruby-keyword kw">end</span>
195
+ </pre>
196
+ </div>
197
+ </div>
198
+ </div>
199
+
200
+
201
+ </div>
202
+
203
+
204
+ </div>
205
+
206
+
207
+ <div id="validator-badges">
208
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
209
+ </div>
210
+
211
+ </body>
212
+ </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: RuGPost::Site</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">RuGPost::Site</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/rugpost/site_rb.html">
59
+ lib/rugpost/site.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>
@@ -0,0 +1,169 @@
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: RuGPost::Utilis</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">RuGPost::Utilis</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/rugpost/utilis_rb.html">
59
+ lib/rugpost/utilis.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">template_body</a>&nbsp;&nbsp;
84
+ <a href="#M000001">template_meta</a>&nbsp;&nbsp;
85
+ </div>
86
+ </div>
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <!-- if method_list -->
103
+ <div id="methods">
104
+ <h3 class="section-bar">Public Instance methods</h3>
105
+
106
+ <div id="method-M000002" class="method-detail">
107
+ <a name="M000002"></a>
108
+
109
+ <div class="method-heading">
110
+ <a href="#M000002" class="method-signature">
111
+ <span class="method-name">template_body</span><span class="method-args">()</span>
112
+ </a>
113
+ </div>
114
+
115
+ <div class="method-description">
116
+ <p><a class="source-toggle" href="#"
117
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
118
+ <div class="method-source-code" id="M000002-source">
119
+ <pre>
120
+ <span class="ruby-comment cmt"># File lib/rugpost/utilis.rb, line 14</span>
121
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">template_body</span>
122
+ <span class="ruby-value str">&quot;Hello from new *RuGPost* test!&quot;</span>
123
+ <span class="ruby-keyword kw">end</span>
124
+ </pre>
125
+ </div>
126
+ </div>
127
+ </div>
128
+
129
+ <div id="method-M000001" class="method-detail">
130
+ <a name="M000001"></a>
131
+
132
+ <div class="method-heading">
133
+ <a href="#M000001" class="method-signature">
134
+ <span class="method-name">template_meta</span><span class="method-args">()</span>
135
+ </a>
136
+ </div>
137
+
138
+ <div class="method-description">
139
+ <p><a class="source-toggle" href="#"
140
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
141
+ <div class="method-source-code" id="M000001-source">
142
+ <pre>
143
+ <span class="ruby-comment cmt"># File lib/rugpost/utilis.rb, line 5</span>
144
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">template_meta</span>
145
+ <span class="ruby-identifier">metahash</span> = {
146
+ <span class="ruby-identifier">:title</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;Hello World&quot;</span>,
147
+ <span class="ruby-identifier">:tags</span> =<span class="ruby-operator">&gt;</span> [<span class="ruby-value str">&quot;Hello World&quot;</span>, <span class="ruby-value str">&quot;Sample test&quot;</span>],
148
+ <span class="ruby-identifier">:delay</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;now&quot;</span>
149
+ }
150
+ <span class="ruby-identifier">metahash</span>.<span class="ruby-identifier">to_yaml</span>
151
+ <span class="ruby-keyword kw">end</span>
152
+ </pre>
153
+ </div>
154
+ </div>
155
+ </div>
156
+
157
+
158
+ </div>
159
+
160
+
161
+ </div>
162
+
163
+
164
+ <div id="validator-badges">
165
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
166
+ </div>
167
+
168
+ </body>
169
+ </html>