apiaryio 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/.rspec +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +32 -0
- data/LICENSE +22 -0
- data/README.md +38 -8
- data/Rakefile +26 -0
- data/apiary.gemspec +26 -0
- data/bin/apiary +4 -12
- data/doc/Apiary.html +131 -0
- data/doc/Apiary/CLI.html +480 -0
- data/doc/Apiary/Command.html +117 -0
- data/doc/Apiary/Command/Help.html +331 -0
- data/doc/Apiary/Command/Preview.html +1102 -0
- data/doc/Apiary/Command/Runner.html +201 -0
- data/doc/Apiary/Command/Version.html +201 -0
- data/doc/_index.html +192 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.README.html +119 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +119 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +252 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/apiary.rb +6 -1
- data/lib/apiary/cli.rb +59 -9
- data/lib/apiary/command/help.rb +34 -0
- data/lib/apiary/command/preview.rb +103 -0
- data/lib/apiary/command/runner.rb +13 -0
- data/lib/apiary/command/version.rb +13 -0
- data/lib/apiary/version.rb +2 -2
- data/spec/cli_spec.rb +9 -0
- data/spec/spec_helper.rb +2 -0
- metadata +87 -18
- data/lib/apiary/cmd.rb +0 -63
- data/lib/apiary/commands/base.rb +0 -41
- data/lib/apiary/commands/preview.rb +0 -27
@@ -0,0 +1,117 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: Apiary::Command
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (C)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Apiary.html" title="Apiary (module)">Apiary</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Command</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Module: Apiary::Command
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/apiary/command/help.rb<span class="defines">,<br />
|
83
|
+
lib/apiary/command/runner.rb,<br /> lib/apiary/command/version.rb,<br /> lib/apiary/command/preview.rb</span>
|
84
|
+
</dd>
|
85
|
+
|
86
|
+
</dl>
|
87
|
+
<div class="clear"></div>
|
88
|
+
|
89
|
+
<h2>Defined Under Namespace</h2>
|
90
|
+
<p class="children">
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Command/Help.html" title="Apiary::Command::Help (class)">Help</a></span>, <span class='object_link'><a href="Command/Preview.html" title="Apiary::Command::Preview (class)">Preview</a></span>, <span class='object_link'><a href="Command/Runner.html" title="Apiary::Command::Runner (class)">Runner</a></span>, <span class='object_link'><a href="Command/Version.html" title="Apiary::Command::Version (class)">Version</a></span>
|
96
|
+
|
97
|
+
|
98
|
+
</p>
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
|
110
|
+
<div id="footer">
|
111
|
+
Generated on Tue Aug 7 17:58:18 2012 by
|
112
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
113
|
+
0.8.2.1 (ruby-1.9.2).
|
114
|
+
</div>
|
115
|
+
|
116
|
+
</body>
|
117
|
+
</html>
|
@@ -0,0 +1,331 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Apiary::Command::Help
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (H)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Apiary.html" title="Apiary (module)">Apiary</a></span></span> » <span class='title'><span class='object_link'><a href="../Command.html" title="Apiary::Command (module)">Command</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Help</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Apiary::Command::Help
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Apiary::Command::Help</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/apiary/command/help.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
<p>
|
105
|
+
Display help
|
106
|
+
</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<h2>
|
123
|
+
Class Method Summary
|
124
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
125
|
+
</h2>
|
126
|
+
|
127
|
+
<ul class="summary">
|
128
|
+
|
129
|
+
<li class="public ">
|
130
|
+
<span class="summary_signature">
|
131
|
+
|
132
|
+
<a href="#banner-class_method" title="banner (class method)">+ (Object) <strong>banner</strong> </a>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
147
|
+
|
148
|
+
</li>
|
149
|
+
|
150
|
+
|
151
|
+
<li class="public ">
|
152
|
+
<span class="summary_signature">
|
153
|
+
|
154
|
+
<a href="#commands-class_method" title="commands (class method)">+ (Object) <strong>commands</strong> </a>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
</span>
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
169
|
+
|
170
|
+
</li>
|
171
|
+
|
172
|
+
|
173
|
+
<li class="public ">
|
174
|
+
<span class="summary_signature">
|
175
|
+
|
176
|
+
<a href="#execute-class_method" title="execute (class method)">+ (Object) <strong>execute</strong>(options) </a>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
</span>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
191
|
+
|
192
|
+
</li>
|
193
|
+
|
194
|
+
|
195
|
+
</ul>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<div id="class_method_details" class="method_details_list">
|
201
|
+
<h2>Class Method Details</h2>
|
202
|
+
|
203
|
+
|
204
|
+
<div class="method_details first">
|
205
|
+
<h3 class="signature first" id="banner-class_method">
|
206
|
+
|
207
|
+
+ (<tt>Object</tt>) <strong>banner</strong>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
</h3><table class="source_code">
|
214
|
+
<tr>
|
215
|
+
<td>
|
216
|
+
<pre class="lines">
|
217
|
+
|
218
|
+
|
219
|
+
12
|
220
|
+
13
|
221
|
+
14
|
222
|
+
15</pre>
|
223
|
+
</td>
|
224
|
+
<td>
|
225
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/help.rb', line 12</span>
|
226
|
+
|
227
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_banner'>banner</span>
|
228
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\nUsage: apiary command [options]</span><span class='tstring_end'>"</span></span>
|
229
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Try 'apiary help' for more information.</span><span class='tstring_end'>"</span></span>
|
230
|
+
<span class='kw'>end</span></pre>
|
231
|
+
</td>
|
232
|
+
</tr>
|
233
|
+
</table>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
<div class="method_details ">
|
237
|
+
<h3 class="signature " id="commands-class_method">
|
238
|
+
|
239
|
+
+ (<tt>Object</tt>) <strong>commands</strong>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</h3><table class="source_code">
|
246
|
+
<tr>
|
247
|
+
<td>
|
248
|
+
<pre class="lines">
|
249
|
+
|
250
|
+
|
251
|
+
17
|
252
|
+
18
|
253
|
+
19
|
254
|
+
20
|
255
|
+
21
|
256
|
+
22
|
257
|
+
23
|
258
|
+
24
|
259
|
+
25
|
260
|
+
26
|
261
|
+
27
|
262
|
+
28
|
263
|
+
29
|
264
|
+
30</pre>
|
265
|
+
</td>
|
266
|
+
<td>
|
267
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/help.rb', line 17</span>
|
268
|
+
|
269
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_commands'>commands</span>
|
270
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\nCurrently available apiary commands are:\n\n</span><span class='tstring_end'>"</span></span>
|
271
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tpreview Show API documentation in default browser</span><span class='tstring_end'>"</span></span>
|
272
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tpreview --browser [chrome|safari|firefox] Show API documentation in specified browser</span><span class='tstring_end'>"</span></span>
|
273
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tpreview --path [PATH] Specify path to blueprint file</span><span class='tstring_end'>"</span></span>
|
274
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tpreview --api_host [HOST] Specify apiary host</span><span class='tstring_end'>"</span></span>
|
275
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tpreview --server Start standalone web server on port 8080</span><span class='tstring_end'>"</span></span>
|
276
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tpreview --server --port [PORT] Start standalone web server on specified port</span><span class='tstring_end'>"</span></span>
|
277
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
278
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\thelp Show help</span><span class='tstring_end'>"</span></span>
|
279
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
280
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tversion Show version</span><span class='tstring_end'>"</span></span>
|
281
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
282
|
+
<span class='kw'>end</span></pre>
|
283
|
+
</td>
|
284
|
+
</tr>
|
285
|
+
</table>
|
286
|
+
</div>
|
287
|
+
|
288
|
+
<div class="method_details ">
|
289
|
+
<h3 class="signature " id="execute-class_method">
|
290
|
+
|
291
|
+
+ (<tt>Object</tt>) <strong>execute</strong>(options)
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
</h3><table class="source_code">
|
298
|
+
<tr>
|
299
|
+
<td>
|
300
|
+
<pre class="lines">
|
301
|
+
|
302
|
+
|
303
|
+
7
|
304
|
+
8
|
305
|
+
9
|
306
|
+
10</pre>
|
307
|
+
</td>
|
308
|
+
<td>
|
309
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/help.rb', line 7</span>
|
310
|
+
|
311
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
312
|
+
<span class='id identifier rubyid_banner'>banner</span>
|
313
|
+
<span class='id identifier rubyid_commands'>commands</span>
|
314
|
+
<span class='kw'>end</span></pre>
|
315
|
+
</td>
|
316
|
+
</tr>
|
317
|
+
</table>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
</div>
|
323
|
+
|
324
|
+
<div id="footer">
|
325
|
+
Generated on Tue Aug 7 17:58:18 2012 by
|
326
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
327
|
+
0.8.2.1 (ruby-1.9.2).
|
328
|
+
</div>
|
329
|
+
|
330
|
+
</body>
|
331
|
+
</html>
|
@@ -0,0 +1,1102 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Apiary::Command::Preview
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (P)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Apiary.html" title="Apiary (module)">Apiary</a></span></span> » <span class='title'><span class='object_link'><a href="../Command.html" title="Apiary::Command (module)">Command</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Preview</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Apiary::Command::Preview
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Apiary::Command::Preview</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/apiary/command/preview.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
<p>
|
105
|
+
Display preview of local blueprint file
|
106
|
+
</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
119
|
+
<ul class="summary">
|
120
|
+
|
121
|
+
<li class="public ">
|
122
|
+
<span class="summary_signature">
|
123
|
+
|
124
|
+
<a href="#options-instance_method" title="#options (instance method)">- (Object) <strong>options</strong> </a>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
</span>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<span class="note title readonly">readonly</span>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<span class="summary_desc"><div class='inline'><p>
|
144
|
+
Returns the value of attribute options.
|
145
|
+
</p>
|
146
|
+
</div></span>
|
147
|
+
|
148
|
+
</li>
|
149
|
+
|
150
|
+
|
151
|
+
</ul>
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<h2>
|
158
|
+
Class Method Summary
|
159
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
160
|
+
</h2>
|
161
|
+
|
162
|
+
<ul class="summary">
|
163
|
+
|
164
|
+
<li class="public ">
|
165
|
+
<span class="summary_signature">
|
166
|
+
|
167
|
+
<a href="#execute-class_method" title="execute (class method)">+ (Object) <strong>execute</strong>(args) </a>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
</span>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
182
|
+
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
186
|
+
</ul>
|
187
|
+
|
188
|
+
<h2>
|
189
|
+
Instance Method Summary
|
190
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
191
|
+
</h2>
|
192
|
+
|
193
|
+
<ul class="summary">
|
194
|
+
|
195
|
+
<li class="public ">
|
196
|
+
<span class="summary_signature">
|
197
|
+
|
198
|
+
<a href="#api_host-instance_method" title="#api_host (instance method)">- (Object) <strong>api_host</strong> </a>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</span>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
<li class="public ">
|
218
|
+
<span class="summary_signature">
|
219
|
+
|
220
|
+
<a href="#apib_path-instance_method" title="#apib_path (instance method)">- (Object) <strong>apib_path</strong> </a>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
</span>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
235
|
+
|
236
|
+
</li>
|
237
|
+
|
238
|
+
|
239
|
+
<li class="public ">
|
240
|
+
<span class="summary_signature">
|
241
|
+
|
242
|
+
<a href="#browser-instance_method" title="#browser (instance method)">- (Object) <strong>browser</strong> </a>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
</span>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
257
|
+
|
258
|
+
</li>
|
259
|
+
|
260
|
+
|
261
|
+
<li class="public ">
|
262
|
+
<span class="summary_signature">
|
263
|
+
|
264
|
+
<a href="#generate_static-instance_method" title="#generate_static (instance method)">- (Object) <strong>generate_static</strong>(apib_path) </a>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
</span>
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
279
|
+
|
280
|
+
</li>
|
281
|
+
|
282
|
+
|
283
|
+
<li class="public ">
|
284
|
+
<span class="summary_signature">
|
285
|
+
|
286
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Preview) <strong>initialize</strong>(args) </a>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
</span>
|
291
|
+
|
292
|
+
|
293
|
+
<span class="note title constructor">constructor</span>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
<span class="summary_desc"><div class='inline'><p>
|
303
|
+
A new instance of Preview.
|
304
|
+
</p>
|
305
|
+
</div></span>
|
306
|
+
|
307
|
+
</li>
|
308
|
+
|
309
|
+
|
310
|
+
<li class="public ">
|
311
|
+
<span class="summary_signature">
|
312
|
+
|
313
|
+
<a href="#open_generated_page-instance_method" title="#open_generated_page (instance method)">- (Object) <strong>open_generated_page</strong>(path) </a>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
</span>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
<span class="summary_desc"><div class='inline'><p>
|
328
|
+
TODO: add linux and windows systems.
|
329
|
+
</p>
|
330
|
+
</div></span>
|
331
|
+
|
332
|
+
</li>
|
333
|
+
|
334
|
+
|
335
|
+
<li class="public ">
|
336
|
+
<span class="summary_signature">
|
337
|
+
|
338
|
+
<a href="#port-instance_method" title="#port (instance method)">- (Object) <strong>port</strong> </a>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
</span>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
353
|
+
|
354
|
+
</li>
|
355
|
+
|
356
|
+
|
357
|
+
<li class="public ">
|
358
|
+
<span class="summary_signature">
|
359
|
+
|
360
|
+
<a href="#preview_path-instance_method" title="#preview_path (instance method)">- (Object) <strong>preview_path</strong>(apib_path) </a>
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
</span>
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
375
|
+
|
376
|
+
</li>
|
377
|
+
|
378
|
+
|
379
|
+
<li class="public ">
|
380
|
+
<span class="summary_signature">
|
381
|
+
|
382
|
+
<a href="#query_apiary-instance_method" title="#query_apiary (instance method)">- (Object) <strong>query_apiary</strong>(host, apib_path) </a>
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
</span>
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
397
|
+
|
398
|
+
</li>
|
399
|
+
|
400
|
+
|
401
|
+
<li class="public ">
|
402
|
+
<span class="summary_signature">
|
403
|
+
|
404
|
+
<a href="#rack_app-instance_method" title="#rack_app (instance method)">- (Object) <strong>rack_app</strong>(&block) </a>
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
</span>
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
419
|
+
|
420
|
+
</li>
|
421
|
+
|
422
|
+
|
423
|
+
<li class="public ">
|
424
|
+
<span class="summary_signature">
|
425
|
+
|
426
|
+
<a href="#run_server-instance_method" title="#run_server (instance method)">- (Object) <strong>run_server</strong> </a>
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
</span>
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
441
|
+
|
442
|
+
</li>
|
443
|
+
|
444
|
+
|
445
|
+
<li class="public ">
|
446
|
+
<span class="summary_signature">
|
447
|
+
|
448
|
+
<a href="#server-instance_method" title="#server (instance method)">- (Object) <strong>server</strong> </a>
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
</span>
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
463
|
+
|
464
|
+
</li>
|
465
|
+
|
466
|
+
|
467
|
+
<li class="public ">
|
468
|
+
<span class="summary_signature">
|
469
|
+
|
470
|
+
<a href="#show-instance_method" title="#show (instance method)">- (Object) <strong>show</strong> </a>
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
</span>
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
485
|
+
|
486
|
+
</li>
|
487
|
+
|
488
|
+
|
489
|
+
<li class="public ">
|
490
|
+
<span class="summary_signature">
|
491
|
+
|
492
|
+
<a href="#validate_apib_file-instance_method" title="#validate_apib_file (instance method)">- (Object) <strong>validate_apib_file</strong>(apib_file) </a>
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
</span>
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
507
|
+
|
508
|
+
</li>
|
509
|
+
|
510
|
+
|
511
|
+
</ul>
|
512
|
+
|
513
|
+
|
514
|
+
<div id="constructor_details" class="method_details_list">
|
515
|
+
<h2>Constructor Details</h2>
|
516
|
+
|
517
|
+
<div class="method_details first">
|
518
|
+
<h3 class="signature first" id="initialize-instance_method">
|
519
|
+
|
520
|
+
- (<tt><span class='object_link'><a href="" title="Apiary::Command::Preview (class)">Preview</a></span></tt>) <strong>initialize</strong>(args)
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
</h3><div class="docstring">
|
527
|
+
<div class="discussion">
|
528
|
+
<p>
|
529
|
+
A new instance of Preview
|
530
|
+
</p>
|
531
|
+
|
532
|
+
|
533
|
+
</div>
|
534
|
+
</div>
|
535
|
+
<div class="tags">
|
536
|
+
|
537
|
+
|
538
|
+
</div><table class="source_code">
|
539
|
+
<tr>
|
540
|
+
<td>
|
541
|
+
<pre class="lines">
|
542
|
+
|
543
|
+
|
544
|
+
18
|
545
|
+
19
|
546
|
+
20
|
547
|
+
21
|
548
|
+
22
|
549
|
+
23
|
550
|
+
24
|
551
|
+
25</pre>
|
552
|
+
</td>
|
553
|
+
<td>
|
554
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 18</span>
|
555
|
+
|
556
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
557
|
+
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
558
|
+
<span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:apib_path</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>apiary.apib</span><span class='tstring_end'>"</span></span>
|
559
|
+
<span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:api_host</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>api.apiary.io</span><span class='tstring_end'>"</span></span>
|
560
|
+
<span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:headers</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='symbol'>:accept</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>text/html</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:content_type</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>text/plain</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span>
|
561
|
+
<span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:port</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='int'>8080</span>
|
562
|
+
<span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span> <span class='id identifier rubyid_args'>args</span>
|
563
|
+
<span class='kw'>end</span></pre>
|
564
|
+
</td>
|
565
|
+
</tr>
|
566
|
+
</table>
|
567
|
+
</div>
|
568
|
+
|
569
|
+
</div>
|
570
|
+
|
571
|
+
<div id="instance_attr_details" class="attr_details">
|
572
|
+
<h2>Instance Attribute Details</h2>
|
573
|
+
|
574
|
+
|
575
|
+
<span id=""></span>
|
576
|
+
<div class="method_details first">
|
577
|
+
<h3 class="signature first" id="options-instance_method">
|
578
|
+
|
579
|
+
- (<tt>Object</tt>) <strong>options</strong> <span class="extras">(readonly)</span>
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
</h3><div class="docstring">
|
586
|
+
<div class="discussion">
|
587
|
+
<p>
|
588
|
+
Returns the value of attribute options
|
589
|
+
</p>
|
590
|
+
|
591
|
+
|
592
|
+
</div>
|
593
|
+
</div>
|
594
|
+
<div class="tags">
|
595
|
+
|
596
|
+
|
597
|
+
</div><table class="source_code">
|
598
|
+
<tr>
|
599
|
+
<td>
|
600
|
+
<pre class="lines">
|
601
|
+
|
602
|
+
|
603
|
+
16
|
604
|
+
17
|
605
|
+
18</pre>
|
606
|
+
</td>
|
607
|
+
<td>
|
608
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 16</span>
|
609
|
+
|
610
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
|
611
|
+
<span class='ivar'>@options</span>
|
612
|
+
<span class='kw'>end</span></pre>
|
613
|
+
</td>
|
614
|
+
</tr>
|
615
|
+
</table>
|
616
|
+
</div>
|
617
|
+
|
618
|
+
</div>
|
619
|
+
|
620
|
+
|
621
|
+
<div id="class_method_details" class="method_details_list">
|
622
|
+
<h2>Class Method Details</h2>
|
623
|
+
|
624
|
+
|
625
|
+
<div class="method_details first">
|
626
|
+
<h3 class="signature first" id="execute-class_method">
|
627
|
+
|
628
|
+
+ (<tt>Object</tt>) <strong>execute</strong>(args)
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
</h3><table class="source_code">
|
635
|
+
<tr>
|
636
|
+
<td>
|
637
|
+
<pre class="lines">
|
638
|
+
|
639
|
+
|
640
|
+
27
|
641
|
+
28
|
642
|
+
29</pre>
|
643
|
+
</td>
|
644
|
+
<td>
|
645
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 27</span>
|
646
|
+
|
647
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
648
|
+
<span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:server</span><span class='rbracket'>]</span> <span class='op'>?</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_server'>server</span> <span class='op'>:</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_show'>show</span>
|
649
|
+
<span class='kw'>end</span></pre>
|
650
|
+
</td>
|
651
|
+
</tr>
|
652
|
+
</table>
|
653
|
+
</div>
|
654
|
+
|
655
|
+
</div>
|
656
|
+
|
657
|
+
<div id="instance_method_details" class="method_details_list">
|
658
|
+
<h2>Instance Method Details</h2>
|
659
|
+
|
660
|
+
|
661
|
+
<div class="method_details first">
|
662
|
+
<h3 class="signature first" id="api_host-instance_method">
|
663
|
+
|
664
|
+
- (<tt>Object</tt>) <strong>api_host</strong>
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
</h3><table class="source_code">
|
671
|
+
<tr>
|
672
|
+
<td>
|
673
|
+
<pre class="lines">
|
674
|
+
|
675
|
+
|
676
|
+
53
|
677
|
+
54
|
678
|
+
55</pre>
|
679
|
+
</td>
|
680
|
+
<td>
|
681
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 53</span>
|
682
|
+
|
683
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_api_host'>api_host</span>
|
684
|
+
<span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:api_host</span><span class='rbracket'>]</span>
|
685
|
+
<span class='kw'>end</span></pre>
|
686
|
+
</td>
|
687
|
+
</tr>
|
688
|
+
</table>
|
689
|
+
</div>
|
690
|
+
|
691
|
+
<div class="method_details ">
|
692
|
+
<h3 class="signature " id="apib_path-instance_method">
|
693
|
+
|
694
|
+
- (<tt>Object</tt>) <strong>apib_path</strong>
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
|
699
|
+
|
700
|
+
</h3><table class="source_code">
|
701
|
+
<tr>
|
702
|
+
<td>
|
703
|
+
<pre class="lines">
|
704
|
+
|
705
|
+
|
706
|
+
45
|
707
|
+
46
|
708
|
+
47</pre>
|
709
|
+
</td>
|
710
|
+
<td>
|
711
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 45</span>
|
712
|
+
|
713
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_apib_path'>apib_path</span>
|
714
|
+
<span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:apib_path</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>.apib</span><span class='tstring_end'>"</span></span>
|
715
|
+
<span class='kw'>end</span></pre>
|
716
|
+
</td>
|
717
|
+
</tr>
|
718
|
+
</table>
|
719
|
+
</div>
|
720
|
+
|
721
|
+
<div class="method_details ">
|
722
|
+
<h3 class="signature " id="browser-instance_method">
|
723
|
+
|
724
|
+
- (<tt>Object</tt>) <strong>browser</strong>
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
</h3><table class="source_code">
|
731
|
+
<tr>
|
732
|
+
<td>
|
733
|
+
<pre class="lines">
|
734
|
+
|
735
|
+
|
736
|
+
49
|
737
|
+
50
|
738
|
+
51</pre>
|
739
|
+
</td>
|
740
|
+
<td>
|
741
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 49</span>
|
742
|
+
|
743
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_browser'>browser</span>
|
744
|
+
<span class='const'>BROWSERS</span><span class='lbracket'>[</span><span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:browser</span><span class='rbracket'>]</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>nil</span>
|
745
|
+
<span class='kw'>end</span></pre>
|
746
|
+
</td>
|
747
|
+
</tr>
|
748
|
+
</table>
|
749
|
+
</div>
|
750
|
+
|
751
|
+
<div class="method_details ">
|
752
|
+
<h3 class="signature " id="generate_static-instance_method">
|
753
|
+
|
754
|
+
- (<tt>Object</tt>) <strong>generate_static</strong>(apib_path)
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
</h3><table class="source_code">
|
761
|
+
<tr>
|
762
|
+
<td>
|
763
|
+
<pre class="lines">
|
764
|
+
|
765
|
+
|
766
|
+
91
|
767
|
+
92
|
768
|
+
93
|
769
|
+
94
|
770
|
+
95
|
771
|
+
96</pre>
|
772
|
+
</td>
|
773
|
+
<td>
|
774
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 91</span>
|
775
|
+
|
776
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_generate_static'>generate_static</span><span class='lparen'>(</span><span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span>
|
777
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_preview_path'>preview_path</span><span class='lparen'>(</span><span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>w</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span>
|
778
|
+
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_query_apiary'>query_apiary</span><span class='lparen'>(</span><span class='id identifier rubyid_api_host'>api_host</span><span class='comma'>,</span> <span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
779
|
+
<span class='id identifier rubyid_open_generated_page'>open_generated_page</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
780
|
+
<span class='kw'>end</span>
|
781
|
+
<span class='kw'>end</span></pre>
|
782
|
+
</td>
|
783
|
+
</tr>
|
784
|
+
</table>
|
785
|
+
</div>
|
786
|
+
|
787
|
+
<div class="method_details ">
|
788
|
+
<h3 class="signature " id="open_generated_page-instance_method">
|
789
|
+
|
790
|
+
- (<tt>Object</tt>) <strong>open_generated_page</strong>(path)
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
</h3><div class="docstring">
|
797
|
+
<div class="discussion">
|
798
|
+
<p>
|
799
|
+
TODO: add linux and windows systems
|
800
|
+
</p>
|
801
|
+
|
802
|
+
|
803
|
+
</div>
|
804
|
+
</div>
|
805
|
+
<div class="tags">
|
806
|
+
|
807
|
+
|
808
|
+
</div><table class="source_code">
|
809
|
+
<tr>
|
810
|
+
<td>
|
811
|
+
<pre class="lines">
|
812
|
+
|
813
|
+
|
814
|
+
87
|
815
|
+
88
|
816
|
+
89</pre>
|
817
|
+
</td>
|
818
|
+
<td>
|
819
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 87</span>
|
820
|
+
|
821
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_open_generated_page'>open_generated_page</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
822
|
+
<span class='id identifier rubyid_exec'>exec</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>open </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_browser_options'>browser_options</span><span class='rbrace'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
823
|
+
<span class='kw'>end</span></pre>
|
824
|
+
</td>
|
825
|
+
</tr>
|
826
|
+
</table>
|
827
|
+
</div>
|
828
|
+
|
829
|
+
<div class="method_details ">
|
830
|
+
<h3 class="signature " id="port-instance_method">
|
831
|
+
|
832
|
+
- (<tt>Object</tt>) <strong>port</strong>
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
|
837
|
+
|
838
|
+
</h3><table class="source_code">
|
839
|
+
<tr>
|
840
|
+
<td>
|
841
|
+
<pre class="lines">
|
842
|
+
|
843
|
+
|
844
|
+
57
|
845
|
+
58
|
846
|
+
59</pre>
|
847
|
+
</td>
|
848
|
+
<td>
|
849
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 57</span>
|
850
|
+
|
851
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_port'>port</span>
|
852
|
+
<span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:port</span><span class='rbracket'>]</span>
|
853
|
+
<span class='kw'>end</span></pre>
|
854
|
+
</td>
|
855
|
+
</tr>
|
856
|
+
</table>
|
857
|
+
</div>
|
858
|
+
|
859
|
+
<div class="method_details ">
|
860
|
+
<h3 class="signature " id="preview_path-instance_method">
|
861
|
+
|
862
|
+
- (<tt>Object</tt>) <strong>preview_path</strong>(apib_path)
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
</h3><table class="source_code">
|
869
|
+
<tr>
|
870
|
+
<td>
|
871
|
+
<pre class="lines">
|
872
|
+
|
873
|
+
|
874
|
+
75
|
875
|
+
76
|
876
|
+
77
|
877
|
+
78</pre>
|
878
|
+
</td>
|
879
|
+
<td>
|
880
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 75</span>
|
881
|
+
|
882
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_preview_path'>preview_path</span><span class='lparen'>(</span><span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span>
|
883
|
+
<span class='id identifier rubyid_basename'>basename</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span>
|
884
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/tmp/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_basename'>basename</span><span class='rbrace'>}</span><span class='tstring_content'>-preview.html</span><span class='tstring_end'>"</span></span>
|
885
|
+
<span class='kw'>end</span></pre>
|
886
|
+
</td>
|
887
|
+
</tr>
|
888
|
+
</table>
|
889
|
+
</div>
|
890
|
+
|
891
|
+
<div class="method_details ">
|
892
|
+
<h3 class="signature " id="query_apiary-instance_method">
|
893
|
+
|
894
|
+
- (<tt>Object</tt>) <strong>query_apiary</strong>(host, apib_path)
|
895
|
+
|
896
|
+
|
897
|
+
|
898
|
+
|
899
|
+
|
900
|
+
</h3><table class="source_code">
|
901
|
+
<tr>
|
902
|
+
<td>
|
903
|
+
<pre class="lines">
|
904
|
+
|
905
|
+
|
906
|
+
80
|
907
|
+
81
|
908
|
+
82
|
909
|
+
83
|
910
|
+
84</pre>
|
911
|
+
</td>
|
912
|
+
<td>
|
913
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 80</span>
|
914
|
+
|
915
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_query_apiary'>query_apiary</span><span class='lparen'>(</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span>
|
916
|
+
<span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>https://</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_host'>host</span><span class='rbrace'>}</span><span class='tstring_content'>/blueprint/generate</span><span class='tstring_end'>"</span></span>
|
917
|
+
<span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span>
|
918
|
+
<span class='const'>RestClient</span><span class='period'>.</span><span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:headers</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
919
|
+
<span class='kw'>end</span></pre>
|
920
|
+
</td>
|
921
|
+
</tr>
|
922
|
+
</table>
|
923
|
+
</div>
|
924
|
+
|
925
|
+
<div class="method_details ">
|
926
|
+
<h3 class="signature " id="rack_app-instance_method">
|
927
|
+
|
928
|
+
- (<tt>Object</tt>) <strong>rack_app</strong>(&block)
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
</h3><table class="source_code">
|
935
|
+
<tr>
|
936
|
+
<td>
|
937
|
+
<pre class="lines">
|
938
|
+
|
939
|
+
|
940
|
+
61
|
941
|
+
62
|
942
|
+
63
|
943
|
+
64
|
944
|
+
65</pre>
|
945
|
+
</td>
|
946
|
+
<td>
|
947
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 61</span>
|
948
|
+
|
949
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rack_app'>rack_app</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
950
|
+
<span class='const'>Rack</span><span class='op'>::</span><span class='const'>Builder</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
|
951
|
+
<span class='id identifier rubyid_run'>run</span> <span class='id identifier rubyid_lambda'>lambda</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_env'>env</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='rbracket'>]</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
952
|
+
<span class='kw'>end</span>
|
953
|
+
<span class='kw'>end</span></pre>
|
954
|
+
</td>
|
955
|
+
</tr>
|
956
|
+
</table>
|
957
|
+
</div>
|
958
|
+
|
959
|
+
<div class="method_details ">
|
960
|
+
<h3 class="signature " id="run_server-instance_method">
|
961
|
+
|
962
|
+
- (<tt>Object</tt>) <strong>run_server</strong>
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
|
967
|
+
|
968
|
+
</h3><table class="source_code">
|
969
|
+
<tr>
|
970
|
+
<td>
|
971
|
+
<pre class="lines">
|
972
|
+
|
973
|
+
|
974
|
+
67
|
975
|
+
68
|
976
|
+
69
|
977
|
+
70
|
978
|
+
71
|
979
|
+
72
|
980
|
+
73</pre>
|
981
|
+
</td>
|
982
|
+
<td>
|
983
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 67</span>
|
984
|
+
|
985
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_run_server'>run_server</span>
|
986
|
+
<span class='id identifier rubyid_app'>app</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_rack_app'>rack_app</span> <span class='kw'>do</span>
|
987
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_query_apiary'>query_apiary</span><span class='lparen'>(</span><span class='id identifier rubyid_api_host'>api_host</span><span class='comma'>,</span> <span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span>
|
988
|
+
<span class='kw'>end</span>
|
989
|
+
|
990
|
+
<span class='const'>Rack</span><span class='op'>::</span><span class='const'>Server</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='symbol'>:Port</span> <span class='op'>=></span> <span class='id identifier rubyid_port'>port</span><span class='comma'>,</span> <span class='symbol'>:app</span> <span class='op'>=></span> <span class='id identifier rubyid_app'>app</span><span class='rparen'>)</span>
|
991
|
+
<span class='kw'>end</span></pre>
|
992
|
+
</td>
|
993
|
+
</tr>
|
994
|
+
</table>
|
995
|
+
</div>
|
996
|
+
|
997
|
+
<div class="method_details ">
|
998
|
+
<h3 class="signature " id="server-instance_method">
|
999
|
+
|
1000
|
+
- (<tt>Object</tt>) <strong>server</strong>
|
1001
|
+
|
1002
|
+
|
1003
|
+
|
1004
|
+
|
1005
|
+
|
1006
|
+
</h3><table class="source_code">
|
1007
|
+
<tr>
|
1008
|
+
<td>
|
1009
|
+
<pre class="lines">
|
1010
|
+
|
1011
|
+
|
1012
|
+
31
|
1013
|
+
32
|
1014
|
+
33</pre>
|
1015
|
+
</td>
|
1016
|
+
<td>
|
1017
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 31</span>
|
1018
|
+
|
1019
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_server'>server</span>
|
1020
|
+
<span class='id identifier rubyid_run_server'>run_server</span>
|
1021
|
+
<span class='kw'>end</span></pre>
|
1022
|
+
</td>
|
1023
|
+
</tr>
|
1024
|
+
</table>
|
1025
|
+
</div>
|
1026
|
+
|
1027
|
+
<div class="method_details ">
|
1028
|
+
<h3 class="signature " id="show-instance_method">
|
1029
|
+
|
1030
|
+
- (<tt>Object</tt>) <strong>show</strong>
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
</h3><table class="source_code">
|
1037
|
+
<tr>
|
1038
|
+
<td>
|
1039
|
+
<pre class="lines">
|
1040
|
+
|
1041
|
+
|
1042
|
+
35
|
1043
|
+
36
|
1044
|
+
37</pre>
|
1045
|
+
</td>
|
1046
|
+
<td>
|
1047
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 35</span>
|
1048
|
+
|
1049
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_show'>show</span>
|
1050
|
+
<span class='id identifier rubyid_generate_static'>generate_static</span><span class='lparen'>(</span><span class='id identifier rubyid_apib_path'>apib_path</span><span class='rparen'>)</span>
|
1051
|
+
<span class='kw'>end</span></pre>
|
1052
|
+
</td>
|
1053
|
+
</tr>
|
1054
|
+
</table>
|
1055
|
+
</div>
|
1056
|
+
|
1057
|
+
<div class="method_details ">
|
1058
|
+
<h3 class="signature " id="validate_apib_file-instance_method">
|
1059
|
+
|
1060
|
+
- (<tt>Object</tt>) <strong>validate_apib_file</strong>(apib_file)
|
1061
|
+
|
1062
|
+
|
1063
|
+
|
1064
|
+
|
1065
|
+
|
1066
|
+
</h3><table class="source_code">
|
1067
|
+
<tr>
|
1068
|
+
<td>
|
1069
|
+
<pre class="lines">
|
1070
|
+
|
1071
|
+
|
1072
|
+
39
|
1073
|
+
40
|
1074
|
+
41
|
1075
|
+
42
|
1076
|
+
43</pre>
|
1077
|
+
</td>
|
1078
|
+
<td>
|
1079
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 39</span>
|
1080
|
+
|
1081
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_apib_file'>validate_apib_file</span><span class='lparen'>(</span><span class='id identifier rubyid_apib_file'>apib_file</span><span class='rparen'>)</span>
|
1082
|
+
<span class='kw'>unless</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_apib_file'>apib_file</span><span class='rparen'>)</span>
|
1083
|
+
<span class='id identifier rubyid_abort'>abort</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Apiary definition file hasn't been found: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_apib_file'>apib_file</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
1084
|
+
<span class='kw'>end</span>
|
1085
|
+
<span class='kw'>end</span></pre>
|
1086
|
+
</td>
|
1087
|
+
</tr>
|
1088
|
+
</table>
|
1089
|
+
</div>
|
1090
|
+
|
1091
|
+
</div>
|
1092
|
+
|
1093
|
+
</div>
|
1094
|
+
|
1095
|
+
<div id="footer">
|
1096
|
+
Generated on Tue Aug 7 17:58:18 2012 by
|
1097
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1098
|
+
0.8.2.1 (ruby-1.9.2).
|
1099
|
+
</div>
|
1100
|
+
|
1101
|
+
</body>
|
1102
|
+
</html>
|