apiaryio 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +3 -4
- data/Gemfile +5 -0
- data/README.md +6 -2
- data/apiary.gemspec +4 -3
- data/doc/Apiary.html +7 -7
- data/doc/Apiary/CLI.html +44 -32
- data/doc/Apiary/Command.html +7 -7
- data/doc/Apiary/Command/Fetch.html +572 -0
- data/doc/Apiary/Command/Help.html +16 -11
- data/doc/Apiary/Command/Preview.html +175 -216
- data/doc/Apiary/Command/Publish.html +634 -0
- data/doc/Apiary/Command/Runner.html +8 -9
- data/doc/Apiary/Command/Version.html +7 -8
- data/doc/_index.html +28 -6
- data/doc/class_list.html +3 -2
- data/doc/css/style.css +11 -1
- data/doc/file.README.html +37 -22
- data/doc/file_list.html +2 -1
- data/doc/frames.html +5 -7
- data/doc/index.html +37 -22
- data/doc/js/app.js +7 -2
- data/doc/js/full_list.js +7 -2
- data/doc/method_list.html +112 -89
- data/doc/top-level-namespace.html +5 -5
- data/lib/apiary/command/fetch.rb +79 -0
- data/lib/apiary/command/help.rb +1 -0
- data/lib/apiary/version.rb +1 -1
- data/spec/command/fetch_spec.rb +87 -0
- data/spec/spec_helper.rb +1 -0
- metadata +121 -85
@@ -6,13 +6,13 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Apiary::Command::Help
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.7.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
@@ -101,9 +101,8 @@
|
|
101
101
|
|
102
102
|
<h2>Overview</h2><div class="docstring">
|
103
103
|
<div class="discussion">
|
104
|
-
|
105
|
-
Display help
|
106
|
-
</p>
|
104
|
+
|
105
|
+
<p>Display help</p>
|
107
106
|
|
108
107
|
|
109
108
|
</div>
|
@@ -226,7 +225,7 @@ Display help
|
|
226
225
|
|
227
226
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_banner'>banner</span>
|
228
227
|
<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
|
228
|
+
<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
229
|
<span class='kw'>end</span></pre>
|
231
230
|
</td>
|
232
231
|
</tr>
|
@@ -261,7 +260,10 @@ Display help
|
|
261
260
|
27
|
262
261
|
28
|
263
262
|
29
|
264
|
-
30
|
263
|
+
30
|
264
|
+
31
|
265
|
+
32
|
266
|
+
33</pre>
|
265
267
|
</td>
|
266
268
|
<td>
|
267
269
|
<pre class="code"><span class="info file"># File 'lib/apiary/command/help.rb', line 17</span>
|
@@ -270,12 +272,15 @@ Display help
|
|
270
272
|
<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
273
|
<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
274
|
<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>
|
275
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tpreview --output [FILE] Write generated HTML into specified file</span><span class='tstring_end'>"</span></span>
|
273
276
|
<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
277
|
<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
278
|
<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
279
|
<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>
|
280
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\tpublish --api-name [API_NAME] Publish apiary.apib on docs.API_NAME.apiary.io</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'>\tfetch --api-name [API_NAME] Fetch apiary.apib from API_NAME.apiary.io</span><span class='tstring_end'>"</span></span>
|
277
282
|
<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>
|
283
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\thelp Show this help</span><span class='tstring_end'>"</span></span>
|
279
284
|
<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
285
|
<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
286
|
<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>
|
@@ -322,9 +327,9 @@ Display help
|
|
322
327
|
</div>
|
323
328
|
|
324
329
|
<div id="footer">
|
325
|
-
Generated on
|
330
|
+
Generated on Sat Jan 25 12:41:41 2014 by
|
326
331
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
327
|
-
0.8.
|
332
|
+
0.8.7.3 (ruby-2.1.0).
|
328
333
|
</div>
|
329
334
|
|
330
335
|
</body>
|
@@ -6,13 +6,13 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Apiary::Command::Preview
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.7.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
@@ -101,9 +101,8 @@
|
|
101
101
|
|
102
102
|
<h2>Overview</h2><div class="docstring">
|
103
103
|
<div class="discussion">
|
104
|
-
|
105
|
-
Display preview of local blueprint file
|
106
|
-
</p>
|
104
|
+
|
105
|
+
<p>Display preview of local blueprint file</p>
|
107
106
|
|
108
107
|
|
109
108
|
</div>
|
@@ -112,6 +111,22 @@ Display preview of local blueprint file
|
|
112
111
|
|
113
112
|
|
114
113
|
</div>
|
114
|
+
<h2>Constant Summary</h2>
|
115
|
+
|
116
|
+
<dl class="constants">
|
117
|
+
|
118
|
+
<dt id="BROWSERS-constant" class="">BROWSERS =
|
119
|
+
|
120
|
+
</dt>
|
121
|
+
<dd><pre class="code"><span class='lbrace'>{</span>
|
122
|
+
<span class='symbol'>:safari</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Safari</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
123
|
+
<span class='symbol'>:chrome</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Google Chrome</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
124
|
+
<span class='symbol'>:firefox</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Firefox</span><span class='tstring_end'>"</span></span>
|
125
|
+
<span class='rbrace'>}</span></pre></dd>
|
126
|
+
|
127
|
+
</dl>
|
128
|
+
|
129
|
+
|
115
130
|
|
116
131
|
|
117
132
|
|
@@ -140,9 +155,8 @@ Display preview of local blueprint file
|
|
140
155
|
|
141
156
|
|
142
157
|
|
143
|
-
<span class="summary_desc"><div class='inline'
|
144
|
-
Returns the value of attribute options
|
145
|
-
</p>
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>Returns the value of attribute options.</p>
|
146
160
|
</div></span>
|
147
161
|
|
148
162
|
</li>
|
@@ -195,7 +209,7 @@ Returns the value of attribute options.
|
|
195
209
|
<li class="public ">
|
196
210
|
<span class="summary_signature">
|
197
211
|
|
198
|
-
<a href="#
|
212
|
+
<a href="#browser-instance_method" title="#browser (instance method)">- (Object) <strong>browser</strong> </a>
|
199
213
|
|
200
214
|
|
201
215
|
|
@@ -217,7 +231,7 @@ Returns the value of attribute options.
|
|
217
231
|
<li class="public ">
|
218
232
|
<span class="summary_signature">
|
219
233
|
|
220
|
-
<a href="#
|
234
|
+
<a href="#generate_static-instance_method" title="#generate_static (instance method)">- (Object) <strong>generate_static</strong>(path) </a>
|
221
235
|
|
222
236
|
|
223
237
|
|
@@ -239,34 +253,14 @@ Returns the value of attribute options.
|
|
239
253
|
<li class="public ">
|
240
254
|
<span class="summary_signature">
|
241
255
|
|
242
|
-
<a href="#
|
256
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Preview) <strong>initialize</strong>(opts) </a>
|
243
257
|
|
244
258
|
|
245
259
|
|
246
260
|
</span>
|
247
261
|
|
248
262
|
|
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
|
-
|
263
|
+
<span class="note title constructor">constructor</span>
|
270
264
|
|
271
265
|
|
272
266
|
|
@@ -275,7 +269,9 @@ Returns the value of attribute options.
|
|
275
269
|
|
276
270
|
|
277
271
|
|
278
|
-
<span class="summary_desc"><div class='inline'
|
272
|
+
<span class="summary_desc"><div class='inline'>
|
273
|
+
<p>TODO: use OpenStruct to store @options.</p>
|
274
|
+
</div></span>
|
279
275
|
|
280
276
|
</li>
|
281
277
|
|
@@ -283,15 +279,13 @@ Returns the value of attribute options.
|
|
283
279
|
<li class="public ">
|
284
280
|
<span class="summary_signature">
|
285
281
|
|
286
|
-
<a href="#
|
282
|
+
<a href="#open_generated_page-instance_method" title="#open_generated_page (instance method)">- (Object) <strong>open_generated_page</strong>(path) </a>
|
287
283
|
|
288
284
|
|
289
285
|
|
290
286
|
</span>
|
291
287
|
|
292
288
|
|
293
|
-
<span class="note title constructor">constructor</span>
|
294
|
-
|
295
289
|
|
296
290
|
|
297
291
|
|
@@ -299,9 +293,8 @@ Returns the value of attribute options.
|
|
299
293
|
|
300
294
|
|
301
295
|
|
302
|
-
<span class="summary_desc"><div class='inline'
|
303
|
-
|
304
|
-
</p>
|
296
|
+
<span class="summary_desc"><div class='inline'>
|
297
|
+
<p>TODO: add linux and windows systems.</p>
|
305
298
|
</div></span>
|
306
299
|
|
307
300
|
</li>
|
@@ -310,7 +303,7 @@ A new instance of Preview.
|
|
310
303
|
<li class="public ">
|
311
304
|
<span class="summary_signature">
|
312
305
|
|
313
|
-
<a href="#
|
306
|
+
<a href="#path-instance_method" title="#path (instance method)">- (Object) <strong>path</strong> </a>
|
314
307
|
|
315
308
|
|
316
309
|
|
@@ -324,10 +317,7 @@ A new instance of Preview.
|
|
324
317
|
|
325
318
|
|
326
319
|
|
327
|
-
<span class="summary_desc"><div class='inline'
|
328
|
-
TODO: add linux and windows systems.
|
329
|
-
</p>
|
330
|
-
</div></span>
|
320
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
331
321
|
|
332
322
|
</li>
|
333
323
|
|
@@ -335,7 +325,7 @@ TODO: add linux and windows systems.
|
|
335
325
|
<li class="public ">
|
336
326
|
<span class="summary_signature">
|
337
327
|
|
338
|
-
<a href="#
|
328
|
+
<a href="#preview_path-instance_method" title="#preview_path (instance method)">- (Object) <strong>preview_path</strong>(path) </a>
|
339
329
|
|
340
330
|
|
341
331
|
|
@@ -357,7 +347,7 @@ TODO: add linux and windows systems.
|
|
357
347
|
<li class="public ">
|
358
348
|
<span class="summary_signature">
|
359
349
|
|
360
|
-
<a href="#
|
350
|
+
<a href="#query_apiary-instance_method" title="#query_apiary (instance method)">- (Object) <strong>query_apiary</strong>(host, path) </a>
|
361
351
|
|
362
352
|
|
363
353
|
|
@@ -379,7 +369,7 @@ TODO: add linux and windows systems.
|
|
379
369
|
<li class="public ">
|
380
370
|
<span class="summary_signature">
|
381
371
|
|
382
|
-
<a href="#
|
372
|
+
<a href="#rack_app-instance_method" title="#rack_app (instance method)">- (Object) <strong>rack_app</strong>(&block) </a>
|
383
373
|
|
384
374
|
|
385
375
|
|
@@ -401,7 +391,7 @@ TODO: add linux and windows systems.
|
|
401
391
|
<li class="public ">
|
402
392
|
<span class="summary_signature">
|
403
393
|
|
404
|
-
<a href="#
|
394
|
+
<a href="#run_server-instance_method" title="#run_server (instance method)">- (Object) <strong>run_server</strong> </a>
|
405
395
|
|
406
396
|
|
407
397
|
|
@@ -423,7 +413,7 @@ TODO: add linux and windows systems.
|
|
423
413
|
<li class="public ">
|
424
414
|
<span class="summary_signature">
|
425
415
|
|
426
|
-
<a href="#
|
416
|
+
<a href="#server-instance_method" title="#server (instance method)">- (Object) <strong>server</strong> </a>
|
427
417
|
|
428
418
|
|
429
419
|
|
@@ -445,7 +435,7 @@ TODO: add linux and windows systems.
|
|
445
435
|
<li class="public ">
|
446
436
|
<span class="summary_signature">
|
447
437
|
|
448
|
-
<a href="#
|
438
|
+
<a href="#show-instance_method" title="#show (instance method)">- (Object) <strong>show</strong> </a>
|
449
439
|
|
450
440
|
|
451
441
|
|
@@ -467,7 +457,7 @@ TODO: add linux and windows systems.
|
|
467
457
|
<li class="public ">
|
468
458
|
<span class="summary_signature">
|
469
459
|
|
470
|
-
<a href="#
|
460
|
+
<a href="#validate_apib_file-instance_method" title="#validate_apib_file (instance method)">- (Object) <strong>validate_apib_file</strong>(apib_file) </a>
|
471
461
|
|
472
462
|
|
473
463
|
|
@@ -489,7 +479,7 @@ TODO: add linux and windows systems.
|
|
489
479
|
<li class="public ">
|
490
480
|
<span class="summary_signature">
|
491
481
|
|
492
|
-
<a href="#
|
482
|
+
<a href="#write_generated_path-instance_method" title="#write_generated_path (instance method)">- (Object) <strong>write_generated_path</strong>(path, outfile) </a>
|
493
483
|
|
494
484
|
|
495
485
|
|
@@ -517,7 +507,7 @@ TODO: add linux and windows systems.
|
|
517
507
|
<div class="method_details first">
|
518
508
|
<h3 class="signature first" id="initialize-instance_method">
|
519
509
|
|
520
|
-
- (<tt><span class='object_link'><a href="" title="Apiary::Command::Preview (class)">Preview</a></span></tt>) <strong>initialize</strong>(
|
510
|
+
- (<tt><span class='object_link'><a href="" title="Apiary::Command::Preview (class)">Preview</a></span></tt>) <strong>initialize</strong>(opts)
|
521
511
|
|
522
512
|
|
523
513
|
|
@@ -525,9 +515,8 @@ TODO: add linux and windows systems.
|
|
525
515
|
|
526
516
|
</h3><div class="docstring">
|
527
517
|
<div class="discussion">
|
528
|
-
|
529
|
-
|
530
|
-
</p>
|
518
|
+
|
519
|
+
<p>TODO: use OpenStruct to store @options</p>
|
531
520
|
|
532
521
|
|
533
522
|
</div>
|
@@ -541,25 +530,23 @@ A new instance of Preview
|
|
541
530
|
<pre class="lines">
|
542
531
|
|
543
532
|
|
544
|
-
18
|
545
|
-
19
|
546
533
|
20
|
547
534
|
21
|
548
535
|
22
|
549
536
|
23
|
550
537
|
24
|
551
|
-
25
|
538
|
+
25
|
539
|
+
26</pre>
|
552
540
|
</td>
|
553
541
|
<td>
|
554
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
555
|
-
|
556
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier
|
557
|
-
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='
|
558
|
-
<span class='ivar'>@options</span><span class='
|
559
|
-
<span class='ivar'>@options</span><span class='
|
560
|
-
<span class='ivar'>@options</span><span class='
|
561
|
-
<span class='ivar'>@options</span><span class='
|
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>
|
542
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 20</span>
|
543
|
+
|
544
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
545
|
+
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
546
|
+
<span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</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>
|
547
|
+
<span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_api_host'>api_host</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>
|
548
|
+
<span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</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>
|
549
|
+
<span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span> <span class='op'>||=</span> <span class='int'>8080</span>
|
563
550
|
<span class='kw'>end</span></pre>
|
564
551
|
</td>
|
565
552
|
</tr>
|
@@ -584,9 +571,8 @@ A new instance of Preview
|
|
584
571
|
|
585
572
|
</h3><div class="docstring">
|
586
573
|
<div class="discussion">
|
587
|
-
|
588
|
-
Returns the value of attribute options
|
589
|
-
</p>
|
574
|
+
|
575
|
+
<p>Returns the value of attribute options</p>
|
590
576
|
|
591
577
|
|
592
578
|
</div>
|
@@ -600,12 +586,12 @@ Returns the value of attribute options
|
|
600
586
|
<pre class="lines">
|
601
587
|
|
602
588
|
|
603
|
-
16
|
604
589
|
17
|
605
|
-
18
|
590
|
+
18
|
591
|
+
19</pre>
|
606
592
|
</td>
|
607
593
|
<td>
|
608
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
594
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 17</span>
|
609
595
|
|
610
596
|
<span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
|
611
597
|
<span class='ivar'>@options</span>
|
@@ -637,12 +623,12 @@ Returns the value of attribute options
|
|
637
623
|
<pre class="lines">
|
638
624
|
|
639
625
|
|
640
|
-
27
|
641
626
|
28
|
642
|
-
29
|
627
|
+
29
|
628
|
+
30</pre>
|
643
629
|
</td>
|
644
630
|
<td>
|
645
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
631
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 28</span>
|
646
632
|
|
647
633
|
<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
634
|
<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>
|
@@ -659,67 +645,7 @@ Returns the value of attribute options
|
|
659
645
|
|
660
646
|
|
661
647
|
<div class="method_details first">
|
662
|
-
<h3 class="signature first" id="
|
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">
|
648
|
+
<h3 class="signature first" id="browser-instance_method">
|
723
649
|
|
724
650
|
- (<tt>Object</tt>) <strong>browser</strong>
|
725
651
|
|
@@ -733,15 +659,15 @@ Returns the value of attribute options
|
|
733
659
|
<pre class="lines">
|
734
660
|
|
735
661
|
|
736
|
-
49
|
737
662
|
50
|
738
|
-
51
|
663
|
+
51
|
664
|
+
52</pre>
|
739
665
|
</td>
|
740
666
|
<td>
|
741
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
667
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 50</span>
|
742
668
|
|
743
669
|
<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='
|
670
|
+
<span class='const'>BROWSERS</span><span class='lbracket'>[</span><span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_browser'>browser</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>nil</span>
|
745
671
|
<span class='kw'>end</span></pre>
|
746
672
|
</td>
|
747
673
|
</tr>
|
@@ -751,7 +677,7 @@ Returns the value of attribute options
|
|
751
677
|
<div class="method_details ">
|
752
678
|
<h3 class="signature " id="generate_static-instance_method">
|
753
679
|
|
754
|
-
- (<tt>Object</tt>) <strong>generate_static</strong>(
|
680
|
+
- (<tt>Object</tt>) <strong>generate_static</strong>(path)
|
755
681
|
|
756
682
|
|
757
683
|
|
@@ -763,20 +689,20 @@ Returns the value of attribute options
|
|
763
689
|
<pre class="lines">
|
764
690
|
|
765
691
|
|
692
|
+
90
|
766
693
|
91
|
767
694
|
92
|
768
695
|
93
|
769
696
|
94
|
770
|
-
95
|
771
|
-
96</pre>
|
697
|
+
95</pre>
|
772
698
|
</td>
|
773
699
|
<td>
|
774
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
700
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 90</span>
|
775
701
|
|
776
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_generate_static'>generate_static</span><span class='lparen'>(</span><span class='id identifier
|
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
|
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
|
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>
|
702
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_generate_static'>generate_static</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
703
|
+
<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_path'>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>
|
704
|
+
<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='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_api_host'>api_host</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
705
|
+
<span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_output'>output</span> <span class='op'>?</span> <span class='id identifier rubyid_write_generated_path'>write_generated_path</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='comma'>,</span> <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_output'>output</span><span class='rparen'>)</span> <span class='op'>:</span> <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
706
|
<span class='kw'>end</span>
|
781
707
|
<span class='kw'>end</span></pre>
|
782
708
|
</td>
|
@@ -795,9 +721,8 @@ Returns the value of attribute options
|
|
795
721
|
|
796
722
|
</h3><div class="docstring">
|
797
723
|
<div class="discussion">
|
798
|
-
|
799
|
-
TODO: add linux and windows systems
|
800
|
-
</p>
|
724
|
+
|
725
|
+
<p>TODO: add linux and windows systems</p>
|
801
726
|
|
802
727
|
|
803
728
|
</div>
|
@@ -811,15 +736,15 @@ TODO: add linux and windows systems
|
|
811
736
|
<pre class="lines">
|
812
737
|
|
813
738
|
|
814
|
-
|
815
|
-
|
816
|
-
|
739
|
+
80
|
740
|
+
81
|
741
|
+
82</pre>
|
817
742
|
</td>
|
818
743
|
<td>
|
819
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
744
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 80</span>
|
820
745
|
|
821
746
|
<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='
|
747
|
+
<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='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
823
748
|
<span class='kw'>end</span></pre>
|
824
749
|
</td>
|
825
750
|
</tr>
|
@@ -827,9 +752,9 @@ TODO: add linux and windows systems
|
|
827
752
|
</div>
|
828
753
|
|
829
754
|
<div class="method_details ">
|
830
|
-
<h3 class="signature " id="
|
755
|
+
<h3 class="signature " id="path-instance_method">
|
831
756
|
|
832
|
-
- (<tt>Object</tt>) <strong>
|
757
|
+
- (<tt>Object</tt>) <strong>path</strong>
|
833
758
|
|
834
759
|
|
835
760
|
|
@@ -841,15 +766,15 @@ TODO: add linux and windows systems
|
|
841
766
|
<pre class="lines">
|
842
767
|
|
843
768
|
|
844
|
-
|
845
|
-
|
846
|
-
|
769
|
+
46
|
770
|
+
47
|
771
|
+
48</pre>
|
847
772
|
</td>
|
848
773
|
<td>
|
849
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
774
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 46</span>
|
850
775
|
|
851
|
-
<span class='kw'>def</span> <span class='id identifier
|
852
|
-
<span class='ivar'>@options</span><span class='
|
776
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
|
777
|
+
<span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</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='embexpr_end'>}</span><span class='tstring_content'>.apib</span><span class='tstring_end'>"</span></span>
|
853
778
|
<span class='kw'>end</span></pre>
|
854
779
|
</td>
|
855
780
|
</tr>
|
@@ -859,7 +784,7 @@ TODO: add linux and windows systems
|
|
859
784
|
<div class="method_details ">
|
860
785
|
<h3 class="signature " id="preview_path-instance_method">
|
861
786
|
|
862
|
-
- (<tt>Object</tt>) <strong>preview_path</strong>(
|
787
|
+
- (<tt>Object</tt>) <strong>preview_path</strong>(path)
|
863
788
|
|
864
789
|
|
865
790
|
|
@@ -871,17 +796,17 @@ TODO: add linux and windows systems
|
|
871
796
|
<pre class="lines">
|
872
797
|
|
873
798
|
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
799
|
+
68
|
800
|
+
69
|
801
|
+
70
|
802
|
+
71</pre>
|
878
803
|
</td>
|
879
804
|
<td>
|
880
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
805
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 68</span>
|
881
806
|
|
882
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_preview_path'>preview_path</span><span class='lparen'>(</span><span class='id identifier
|
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
|
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='
|
807
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_preview_path'>preview_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
808
|
+
<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='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
809
|
+
<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='embexpr_end'>}</span><span class='tstring_content'>-preview.html</span><span class='tstring_end'>"</span></span>
|
885
810
|
<span class='kw'>end</span></pre>
|
886
811
|
</td>
|
887
812
|
</tr>
|
@@ -891,7 +816,7 @@ TODO: add linux and windows systems
|
|
891
816
|
<div class="method_details ">
|
892
817
|
<h3 class="signature " id="query_apiary-instance_method">
|
893
818
|
|
894
|
-
- (<tt>Object</tt>) <strong>query_apiary</strong>(host,
|
819
|
+
- (<tt>Object</tt>) <strong>query_apiary</strong>(host, path)
|
895
820
|
|
896
821
|
|
897
822
|
|
@@ -903,19 +828,19 @@ TODO: add linux and windows systems
|
|
903
828
|
<pre class="lines">
|
904
829
|
|
905
830
|
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
831
|
+
73
|
832
|
+
74
|
833
|
+
75
|
834
|
+
76
|
835
|
+
77</pre>
|
911
836
|
</td>
|
912
837
|
<td>
|
913
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
838
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 73</span>
|
914
839
|
|
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
|
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='
|
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
|
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='
|
840
|
+
<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_path'>path</span><span class='rparen'>)</span>
|
841
|
+
<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='embexpr_end'>}</span><span class='tstring_content'>/blueprint/generate</span><span class='tstring_end'>"</span></span>
|
842
|
+
<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_path'>path</span><span class='rparen'>)</span>
|
843
|
+
<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='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
|
919
844
|
<span class='kw'>end</span></pre>
|
920
845
|
</td>
|
921
846
|
</tr>
|
@@ -937,14 +862,14 @@ TODO: add linux and windows systems
|
|
937
862
|
<pre class="lines">
|
938
863
|
|
939
864
|
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
865
|
+
54
|
866
|
+
55
|
867
|
+
56
|
868
|
+
57
|
869
|
+
58</pre>
|
945
870
|
</td>
|
946
871
|
<td>
|
947
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
872
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 54</span>
|
948
873
|
|
949
874
|
<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
875
|
<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>
|
@@ -971,23 +896,23 @@ TODO: add linux and windows systems
|
|
971
896
|
<pre class="lines">
|
972
897
|
|
973
898
|
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
899
|
+
60
|
900
|
+
61
|
901
|
+
62
|
902
|
+
63
|
903
|
+
64
|
904
|
+
65
|
905
|
+
66</pre>
|
981
906
|
</td>
|
982
907
|
<td>
|
983
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
908
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 60</span>
|
984
909
|
|
985
910
|
<span class='kw'>def</span> <span class='id identifier rubyid_run_server'>run_server</span>
|
986
911
|
<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
|
912
|
+
<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='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_api_host'>api_host</span><span class='comma'>,</span> <span class='ivar'>@options</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
988
913
|
<span class='kw'>end</span>
|
989
914
|
|
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>
|
915
|
+
<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='ivar'>@options</span><span class='period'>.</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
916
|
<span class='kw'>end</span></pre>
|
992
917
|
</td>
|
993
918
|
</tr>
|
@@ -1009,12 +934,12 @@ TODO: add linux and windows systems
|
|
1009
934
|
<pre class="lines">
|
1010
935
|
|
1011
936
|
|
1012
|
-
31
|
1013
937
|
32
|
1014
|
-
33
|
938
|
+
33
|
939
|
+
34</pre>
|
1015
940
|
</td>
|
1016
941
|
<td>
|
1017
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
942
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 32</span>
|
1018
943
|
|
1019
944
|
<span class='kw'>def</span> <span class='id identifier rubyid_server'>server</span>
|
1020
945
|
<span class='id identifier rubyid_run_server'>run_server</span>
|
@@ -1039,15 +964,15 @@ TODO: add linux and windows systems
|
|
1039
964
|
<pre class="lines">
|
1040
965
|
|
1041
966
|
|
1042
|
-
35
|
1043
967
|
36
|
1044
|
-
37
|
968
|
+
37
|
969
|
+
38</pre>
|
1045
970
|
</td>
|
1046
971
|
<td>
|
1047
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
972
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 36</span>
|
1048
973
|
|
1049
974
|
<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
|
975
|
+
<span class='id identifier rubyid_generate_static'>generate_static</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
1051
976
|
<span class='kw'>end</span></pre>
|
1052
977
|
</td>
|
1053
978
|
</tr>
|
@@ -1069,18 +994,52 @@ TODO: add linux and windows systems
|
|
1069
994
|
<pre class="lines">
|
1070
995
|
|
1071
996
|
|
1072
|
-
39
|
1073
997
|
40
|
1074
998
|
41
|
1075
999
|
42
|
1076
|
-
43
|
1000
|
+
43
|
1001
|
+
44</pre>
|
1077
1002
|
</td>
|
1078
1003
|
<td>
|
1079
|
-
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line
|
1004
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 40</span>
|
1080
1005
|
|
1081
1006
|
<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
1007
|
<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
|
1008
|
+
<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='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
1009
|
+
<span class='kw'>end</span>
|
1010
|
+
<span class='kw'>end</span></pre>
|
1011
|
+
</td>
|
1012
|
+
</tr>
|
1013
|
+
</table>
|
1014
|
+
</div>
|
1015
|
+
|
1016
|
+
<div class="method_details ">
|
1017
|
+
<h3 class="signature " id="write_generated_path-instance_method">
|
1018
|
+
|
1019
|
+
- (<tt>Object</tt>) <strong>write_generated_path</strong>(path, outfile)
|
1020
|
+
|
1021
|
+
|
1022
|
+
|
1023
|
+
|
1024
|
+
|
1025
|
+
</h3><table class="source_code">
|
1026
|
+
<tr>
|
1027
|
+
<td>
|
1028
|
+
<pre class="lines">
|
1029
|
+
|
1030
|
+
|
1031
|
+
84
|
1032
|
+
85
|
1033
|
+
86
|
1034
|
+
87
|
1035
|
+
88</pre>
|
1036
|
+
</td>
|
1037
|
+
<td>
|
1038
|
+
<pre class="code"><span class="info file"># File 'lib/apiary/command/preview.rb', line 84</span>
|
1039
|
+
|
1040
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_write_generated_path'>write_generated_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_outfile'>outfile</span><span class='rparen'>)</span>
|
1041
|
+
<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_outfile'>outfile</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>
|
1042
|
+
<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='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='rparen'>)</span>
|
1084
1043
|
<span class='kw'>end</span>
|
1085
1044
|
<span class='kw'>end</span></pre>
|
1086
1045
|
</td>
|
@@ -1093,9 +1052,9 @@ TODO: add linux and windows systems
|
|
1093
1052
|
</div>
|
1094
1053
|
|
1095
1054
|
<div id="footer">
|
1096
|
-
Generated on
|
1055
|
+
Generated on Sat Jan 25 12:41:41 2014 by
|
1097
1056
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1098
|
-
0.8.
|
1057
|
+
0.8.7.3 (ruby-2.1.0).
|
1099
1058
|
</div>
|
1100
1059
|
|
1101
1060
|
</body>
|