rbcli 0.2.12 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +39 -38
- data/docs-src/content/development/changelog.md +16 -1
- data/docs-src/themes/hugo-theme-learn/CHANGELOG.md +74 -2
- data/docs-src/themes/hugo-theme-learn/README.md +42 -5
- data/docs-src/themes/hugo-theme-learn/exampleSite/config.toml +27 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md +12 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md +6 -4
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md +7 -5
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md +1 -1
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md +88 -61
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md +3 -3
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/cont/syntaxhighlight.en.md +89 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md +2 -2
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md +2 -2
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/showcase.en.md +4 -1
- data/docs-src/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md +4 -1
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg +1 -237
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png +0 -0
- data/docs-src/themes/hugo-theme-learn/exampleSite/static/images/showcase/tshark_dev.png +0 -0
- data/docs-src/themes/hugo-theme-learn/i18n/ar.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/de.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/hi.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/ja.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/ru.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/i18n/zh-cn.toml +26 -0
- data/docs-src/themes/hugo-theme-learn/layouts/_default/list.html +1 -1
- data/docs-src/themes/hugo-theme-learn/layouts/_default/single.html +1 -2
- data/docs-src/themes/hugo-theme-learn/layouts/partials/footer.html +3 -4
- data/docs-src/themes/hugo-theme-learn/layouts/partials/header.html +8 -6
- data/docs-src/themes/hugo-theme-learn/layouts/partials/menu.html +6 -5
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/children.html +2 -2
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/ref.html +1 -1
- data/docs-src/themes/hugo-theme-learn/layouts/shortcodes/relref.html +1 -1
- data/docs-src/themes/hugo-theme-learn/netlify.toml +1 -2
- data/docs-src/themes/hugo-theme-learn/static/css/theme.css +4 -0
- data/docs-src/themes/hugo-theme-learn/static/fonts/Inconsolata.svg +1 -359
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.svg +1 -1019
- data/docs-src/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.svg +1 -918
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_200.svg +1 -332
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_300.svg +1 -331
- data/docs-src/themes/hugo-theme-learn/static/fonts/Work_Sans_500.svg +1 -333
- data/docs-src/themes/hugo-theme-learn/static/images/clippy.svg +1 -1
- data/docs-src/themes/hugo-theme-learn/static/js/auto-complete.js +3 -223
- data/docs-src/themes/hugo-theme-learn/static/js/highlight.pack.js +6 -3
- data/docs-src/themes/hugo-theme-learn/static/js/hugo-learn.js +8 -5
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-brands-400.svg +1 -1260
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-regular-400.svg +1 -471
- data/docs-src/themes/hugo-theme-learn/static/webfonts/fa-solid-900.svg +1 -2763
- data/docs/404.html +8 -8
- data/docs/advanced/automatic_updates/index.html +85 -65
- data/docs/advanced/command_types/index.html +139 -144
- data/docs/advanced/distributed_state_locking/index.html +83 -55
- data/docs/advanced/hooks/index.html +94 -81
- data/docs/advanced/index.html +75 -34
- data/docs/advanced/index.xml +8 -8
- data/docs/advanced/interactive_commands/index.html +90 -66
- data/docs/advanced/logging/index.html +94 -67
- data/docs/advanced/remote_execution/index.html +94 -75
- data/docs/advanced/state_storage/index.html +122 -119
- data/docs/advanced/user_config_files/index.html +94 -71
- data/docs/categories/index.html +82 -30
- data/docs/categories/index.xml +1 -1
- data/docs/css/theme.css +4 -0
- data/docs/development/changelog/index.html +185 -177
- data/docs/development/code_of_conduct/index.html +85 -64
- data/docs/development/contributing/index.html +96 -96
- data/docs/development/index.html +75 -34
- data/docs/development/index.xml +2 -2
- data/docs/development/license/index.html +80 -46
- data/docs/fonts/Inconsolata.svg +1 -359
- data/docs/fonts/Novecentosanswide-Normal-webfont.svg +1 -1019
- data/docs/fonts/Novecentosanswide-UltraLight-webfont.svg +1 -918
- data/docs/fonts/Work_Sans_200.svg +1 -332
- data/docs/fonts/Work_Sans_300.svg +1 -331
- data/docs/fonts/Work_Sans_500.svg +1 -333
- data/docs/images/clippy.svg +1 -1
- data/docs/index.html +112 -61
- data/docs/index.json +24 -24
- data/docs/index.xml +13 -13
- data/docs/js/auto-complete.js +3 -223
- data/docs/js/highlight.pack.js +6 -3
- data/docs/js/hugo-learn.js +8 -5
- data/docs/quick_reference/index.html +126 -159
- data/docs/quick_reference/index.xml +1 -1
- data/docs/sitemap.xml +2 -4
- data/docs/tags/index.html +82 -30
- data/docs/tags/index.xml +1 -1
- data/docs/tutorial/10-getting_started/index.html +87 -66
- data/docs/tutorial/20-project_layout/index.html +126 -116
- data/docs/tutorial/30-your_first_command/index.html +151 -141
- data/docs/tutorial/40-options_parameters_and_arguments/index.html +233 -258
- data/docs/tutorial/50-publishing/index.html +86 -66
- data/docs/tutorial/index.html +75 -34
- data/docs/tutorial/index.xml +4 -4
- data/docs/webfonts/fa-brands-400.svg +1 -1260
- data/docs/webfonts/fa-regular-400.svg +1 -471
- data/docs/webfonts/fa-solid-900.svg +1 -2763
- data/docs/whoami/index.html +76 -46
- data/docs/whoami/index.xml +1 -1
- data/lib/rbcli/configuration/configurate_blocks/me.rb +5 -5
- data/lib/rbcli/util/deprecation_warning.rb +21 -4
- data/lib/rbcli/version.rb +1 -1
- data/rbcli.gemspec +8 -8
- data/skeletons/project/Gemfile +1 -1
- data/skeletons/project/config/general.rb +1 -1
- data/skeletons/project/lib/lib.erb +2 -0
- data/skeletons/project/spec/spec_helper.rb +7 -7
- data/skeletons/project/spec/untitled_spec.rb +6 -6
- data/skeletons/project/untitled.gemspec +28 -26
- metadata +29 -20
- data/docs-src/themes/hugo-theme-learn/static/js/html5shiv-printshiv.min.js +0 -4
@@ -3,7 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<meta name="generator" content="Hugo 0.
|
6
|
+
<meta name="generator" content="Hugo 0.74.3" />
|
7
7
|
<meta name="description" content="">
|
8
8
|
|
9
9
|
|
@@ -12,20 +12,21 @@
|
|
12
12
|
<title>The Project Layout :: RBCli Documentation</title>
|
13
13
|
|
14
14
|
|
15
|
-
<link href="/rbcli/css/nucleus.css?
|
16
|
-
<link href="/rbcli/css/fontawesome-all.min.css?
|
17
|
-
<link href="/rbcli/css/hybrid.css?
|
18
|
-
<link href="/rbcli/css/featherlight.min.css?
|
19
|
-
<link href="/rbcli/css/perfect-scrollbar.min.css?
|
20
|
-
<link href="/rbcli/css/auto-complete.css?
|
21
|
-
<link href="/rbcli/css/atom-one-dark-reasonable.css?
|
22
|
-
<link href="/rbcli/css/theme.css?
|
23
|
-
<link href="/rbcli/css/hugo-theme.css?
|
15
|
+
<link href="/rbcli/css/nucleus.css?1596148729" rel="stylesheet">
|
16
|
+
<link href="/rbcli/css/fontawesome-all.min.css?1596148729" rel="stylesheet">
|
17
|
+
<link href="/rbcli/css/hybrid.css?1596148729" rel="stylesheet">
|
18
|
+
<link href="/rbcli/css/featherlight.min.css?1596148729" rel="stylesheet">
|
19
|
+
<link href="/rbcli/css/perfect-scrollbar.min.css?1596148729" rel="stylesheet">
|
20
|
+
<link href="/rbcli/css/auto-complete.css?1596148729" rel="stylesheet">
|
21
|
+
<link href="/rbcli/css/atom-one-dark-reasonable.css?1596148729" rel="stylesheet">
|
22
|
+
<link href="/rbcli/css/theme.css?1596148729" rel="stylesheet">
|
23
|
+
<link href="/rbcli/css/hugo-theme.css?1596148729" rel="stylesheet">
|
24
|
+
|
25
|
+
<link href="/rbcli/css/theme-blue.css?1596148729" rel="stylesheet">
|
24
26
|
|
25
|
-
<link href="/rbcli/css/theme-blue.css?1561087612" rel="stylesheet">
|
26
27
|
|
27
28
|
|
28
|
-
<script src="/rbcli/js/jquery-3.3.1.min.js?
|
29
|
+
<script src="/rbcli/js/jquery-3.3.1.min.js?1596148729"></script>
|
29
30
|
|
30
31
|
<style>
|
31
32
|
:root #header + #content > #left > #rlblock_left{
|
@@ -54,14 +55,14 @@
|
|
54
55
|
<span data-search-clear=""><i class="fas fa-times"></i></span>
|
55
56
|
</div>
|
56
57
|
|
57
|
-
<script type="text/javascript" src="/rbcli/js/lunr.min.js?
|
58
|
-
<script type="text/javascript" src="/rbcli/js/auto-complete.js?
|
58
|
+
<script type="text/javascript" src="/rbcli/js/lunr.min.js?1596148729"></script>
|
59
|
+
<script type="text/javascript" src="/rbcli/js/auto-complete.js?1596148729"></script>
|
59
60
|
<script type="text/javascript">
|
60
61
|
|
61
62
|
var baseurl = "https:\/\/akhoury6.github.io\/rbcli\/";
|
62
63
|
|
63
64
|
</script>
|
64
|
-
<script type="text/javascript" src="/rbcli/js/search.js?
|
65
|
+
<script type="text/javascript" src="/rbcli/js/search.js?1596148729"></script>
|
65
66
|
|
66
67
|
|
67
68
|
</div>
|
@@ -74,6 +75,8 @@
|
|
74
75
|
|
75
76
|
|
76
77
|
|
78
|
+
|
79
|
+
|
77
80
|
|
78
81
|
|
79
82
|
|
@@ -96,6 +99,8 @@
|
|
96
99
|
|
97
100
|
|
98
101
|
|
102
|
+
|
103
|
+
|
99
104
|
|
100
105
|
|
101
106
|
|
@@ -121,6 +126,8 @@
|
|
121
126
|
|
122
127
|
|
123
128
|
|
129
|
+
|
130
|
+
|
124
131
|
|
125
132
|
|
126
133
|
|
@@ -140,6 +147,8 @@
|
|
140
147
|
|
141
148
|
|
142
149
|
|
150
|
+
|
151
|
+
|
143
152
|
|
144
153
|
|
145
154
|
|
@@ -159,6 +168,8 @@
|
|
159
168
|
|
160
169
|
|
161
170
|
|
171
|
+
|
172
|
+
|
162
173
|
|
163
174
|
|
164
175
|
|
@@ -178,6 +189,8 @@
|
|
178
189
|
|
179
190
|
|
180
191
|
|
192
|
+
|
193
|
+
|
181
194
|
|
182
195
|
|
183
196
|
|
@@ -197,6 +210,8 @@
|
|
197
210
|
|
198
211
|
|
199
212
|
|
213
|
+
|
214
|
+
|
200
215
|
|
201
216
|
|
202
217
|
|
@@ -223,6 +238,8 @@
|
|
223
238
|
|
224
239
|
|
225
240
|
|
241
|
+
|
242
|
+
|
226
243
|
|
227
244
|
|
228
245
|
|
@@ -248,6 +265,8 @@
|
|
248
265
|
|
249
266
|
|
250
267
|
|
268
|
+
|
269
|
+
|
251
270
|
|
252
271
|
|
253
272
|
|
@@ -267,6 +286,8 @@
|
|
267
286
|
|
268
287
|
|
269
288
|
|
289
|
+
|
290
|
+
|
270
291
|
|
271
292
|
|
272
293
|
|
@@ -286,6 +307,8 @@
|
|
286
307
|
|
287
308
|
|
288
309
|
|
310
|
+
|
311
|
+
|
289
312
|
|
290
313
|
|
291
314
|
|
@@ -305,6 +328,8 @@
|
|
305
328
|
|
306
329
|
|
307
330
|
|
331
|
+
|
332
|
+
|
308
333
|
|
309
334
|
|
310
335
|
|
@@ -324,6 +349,8 @@
|
|
324
349
|
|
325
350
|
|
326
351
|
|
352
|
+
|
353
|
+
|
327
354
|
|
328
355
|
|
329
356
|
|
@@ -343,6 +370,8 @@
|
|
343
370
|
|
344
371
|
|
345
372
|
|
373
|
+
|
374
|
+
|
346
375
|
|
347
376
|
|
348
377
|
|
@@ -362,6 +391,8 @@
|
|
362
391
|
|
363
392
|
|
364
393
|
|
394
|
+
|
395
|
+
|
365
396
|
|
366
397
|
|
367
398
|
|
@@ -381,6 +412,8 @@
|
|
381
412
|
|
382
413
|
|
383
414
|
|
415
|
+
|
416
|
+
|
384
417
|
|
385
418
|
|
386
419
|
|
@@ -400,6 +433,8 @@
|
|
400
433
|
|
401
434
|
|
402
435
|
|
436
|
+
|
437
|
+
|
403
438
|
|
404
439
|
|
405
440
|
|
@@ -426,6 +461,8 @@
|
|
426
461
|
|
427
462
|
|
428
463
|
|
464
|
+
|
465
|
+
|
429
466
|
|
430
467
|
|
431
468
|
|
@@ -451,6 +488,8 @@
|
|
451
488
|
|
452
489
|
|
453
490
|
|
491
|
+
|
492
|
+
|
454
493
|
|
455
494
|
|
456
495
|
|
@@ -470,6 +509,8 @@
|
|
470
509
|
|
471
510
|
|
472
511
|
|
512
|
+
|
513
|
+
|
473
514
|
|
474
515
|
|
475
516
|
|
@@ -489,6 +530,8 @@
|
|
489
530
|
|
490
531
|
|
491
532
|
|
533
|
+
|
534
|
+
|
492
535
|
|
493
536
|
|
494
537
|
|
@@ -508,6 +551,8 @@
|
|
508
551
|
|
509
552
|
|
510
553
|
|
554
|
+
|
555
|
+
|
511
556
|
|
512
557
|
|
513
558
|
|
@@ -534,6 +579,8 @@
|
|
534
579
|
|
535
580
|
|
536
581
|
|
582
|
+
|
583
|
+
|
537
584
|
|
538
585
|
|
539
586
|
|
@@ -585,7 +632,6 @@
|
|
585
632
|
|
586
633
|
|
587
634
|
|
588
|
-
|
589
635
|
<section id="body">
|
590
636
|
<div id="overlay"></div>
|
591
637
|
<div class="padding highlightable">
|
@@ -619,9 +665,9 @@
|
|
619
665
|
|
620
666
|
<a href='/rbcli/'></a> > <a href='/rbcli/tutorial/'>Tutorial</a> > The Project Layout
|
621
667
|
|
622
|
-
|
668
|
+
|
623
669
|
|
624
|
-
|
670
|
+
|
625
671
|
|
626
672
|
|
627
673
|
|
@@ -631,20 +677,18 @@
|
|
631
677
|
<div class="progress">
|
632
678
|
<div class="wrapper">
|
633
679
|
<nav id="TableOfContents">
|
634
|
-
<ul>
|
635
|
-
<li>
|
636
|
-
<ul>
|
637
|
-
<li><a href="#project-
|
638
|
-
<
|
639
|
-
|
640
|
-
|
641
|
-
</
|
642
|
-
<li><a href="#
|
643
|
-
<li><a href="#
|
644
|
-
<li><a href="#
|
645
|
-
|
646
|
-
</ul></li>
|
647
|
-
</ul>
|
680
|
+
<ul>
|
681
|
+
<li><a href="#project-initialization-types">Project Initialization Types</a>
|
682
|
+
<ul>
|
683
|
+
<li><a href="#project-mode">Project Mode</a></li>
|
684
|
+
<li><a href="#mini--micro-modes">Mini & Micro Modes</a></li>
|
685
|
+
</ul>
|
686
|
+
</li>
|
687
|
+
<li><a href="#project-mode-structure">Project Mode Structure</a></li>
|
688
|
+
<li><a href="#git-rubygems-and-rspec">Git, RubyGems, and rspec</a></li>
|
689
|
+
<li><a href="#rbcli-folders">RBCli Folders</a></li>
|
690
|
+
<li><a href="#next-steps">Next Steps</a></li>
|
691
|
+
</ul>
|
648
692
|
</nav>
|
649
693
|
</div>
|
650
694
|
</div>
|
@@ -668,50 +712,29 @@
|
|
668
712
|
|
669
713
|
|
670
714
|
|
671
|
-
|
672
|
-
|
673
|
-
|
674
715
|
<p>Now we will learn about what an RBCli project looks like and how to start using it.</p>
|
675
|
-
|
676
716
|
<h2 id="project-initialization-types">Project Initialization Types</h2>
|
677
|
-
|
678
717
|
<p>RBCli can initialize a tool in three different modes:</p>
|
679
|
-
|
680
718
|
<ul>
|
681
719
|
<li>Project Mode (default)</li>
|
682
720
|
<li>Mini Mode</li>
|
683
721
|
<li>Micro Mode</li>
|
684
722
|
</ul>
|
685
|
-
|
686
723
|
<h3 id="project-mode">Project Mode</h3>
|
687
|
-
|
688
724
|
<p>If you’ve been following along with the tutorial, you’ve already seen Project Mode. An RBCli Project consists of several folders, each of which has a specific function. The RBCli framework handles loading and parsing the code automatically. To generate a standard, full-featured RBCli project, run:</p>
|
689
|
-
|
690
|
-
|
691
|
-
</code></pre>
|
692
|
-
|
693
|
-
<p>where <code>mytool</code> can be replaced with any other command name you’d like. (We will continue using <code>mytool</code> in this tutorial though!)</p>
|
694
|
-
|
725
|
+
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">rbcli init -n mytool
|
726
|
+
</code></pre></div><p>where <code>mytool</code> can be replaced with any other command name you’d like. (We will continue using <code>mytool</code> in this tutorial though!)</p>
|
695
727
|
<p>Inside the newly created <code>mytool</code> folder you will see a bunch of files and folders related to your project. We will go over the structure later.</p>
|
696
|
-
|
697
|
-
<h3 id="mini-micro-modes">Mini & Micro Modes</h3>
|
698
|
-
|
728
|
+
<h3 id="mini--micro-modes">Mini & Micro Modes</h3>
|
699
729
|
<p>If you need to write a CLI tool but project mode feels a bit overkill for you – if you think a single-file script is all that is needed – that’s where the Mini and Micro modes come in. Instead of generating a full directory tree, you get only a single file that contains most of the functionality of RBCli. To use it, run:</p>
|
700
|
-
|
701
|
-
<
|
702
|
-
# or
|
730
|
+
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">rbcli init -n mytool -t mini
|
731
|
+
<span style="color:#75715e"># or</span>
|
703
732
|
rbcli init -n mytool -t micro
|
704
|
-
</code></pre>
|
705
|
-
|
706
|
-
<p>The only difference between the two is that <code>mini</code> will show you all available options and some documentation to help you, while <code>micro</code> is for advanced users who just want the samllest file possible.</p>
|
707
|
-
|
733
|
+
</code></pre></div><p>The only difference between the two is that <code>mini</code> will show you all available options and some documentation to help you, while <code>micro</code> is for advanced users who just want the samllest file possible.</p>
|
708
734
|
<p>As far as documentation goes, every piece of code present in those files is identical to Project mode so it should be pretty easy to navigate.</p>
|
709
|
-
|
710
735
|
<h2 id="project-mode-structure">Project Mode Structure</h2>
|
711
|
-
|
712
736
|
<p>An RBCli project has the following structure:</p>
|
713
|
-
|
714
|
-
<pre><code class="language-text"><name>/
|
737
|
+
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-text" data-lang="text"><name>/
|
715
738
|
|--- application/
|
716
739
|
| |--- commands/
|
717
740
|
| | |--- scripts/
|
@@ -733,111 +756,99 @@ rbcli init -n mytool -t micro
|
|
733
756
|
|--- README.md
|
734
757
|
|--- Rakefile
|
735
758
|
|--- <name>.gemspec
|
736
|
-
</code></pre>
|
737
|
-
|
738
|
-
<h2 id="git-rubygems-and-rspec">Git, RubyGems, and rspec</h2>
|
739
|
-
|
759
|
+
</code></pre></div><h2 id="git-rubygems-and-rspec">Git, RubyGems, and rspec</h2>
|
740
760
|
<p>A few files aren’t part of RBCli itself, but are provided for your convenience. If you’re experienced in Ruby and Git you can skip over this.</p>
|
741
|
-
|
742
761
|
<ul>
|
743
762
|
<li><code>.gitignore</code>
|
744
|
-
|
745
763
|
<ul>
|
746
764
|
<li>Specifies which files to ignore in git. If you don’t use git you can delete this file</li>
|
747
|
-
</ul
|
765
|
+
</ul>
|
766
|
+
</li>
|
748
767
|
<li><code>.rspec</code>
|
749
|
-
|
750
768
|
<ul>
|
751
769
|
<li>Configures Rspec for testing your code</li>
|
752
|
-
</ul
|
770
|
+
</ul>
|
771
|
+
</li>
|
753
772
|
<li><code>Gemfile</code>
|
754
|
-
|
755
773
|
<ul>
|
756
774
|
<li>Allows declaring dependencies for when your users install your application</li>
|
757
|
-
</ul
|
775
|
+
</ul>
|
776
|
+
</li>
|
758
777
|
<li><code>Gemspec</code>
|
759
|
-
|
760
778
|
<ul>
|
761
779
|
<li>Same as above, but also lets you fill in more information so that you can publish your application as a gem</li>
|
762
|
-
</ul
|
780
|
+
</ul>
|
781
|
+
</li>
|
763
782
|
<li><code>README.md</code>
|
764
|
-
|
765
783
|
<ul>
|
766
784
|
<li>A skeleton README file that will appear as a front page documentation to your code in most source control systems (i.e. Github, Bitbucket)</li>
|
767
|
-
</ul
|
785
|
+
</ul>
|
786
|
+
</li>
|
768
787
|
<li><code>CODE_OF_CONDUCT.md</code>
|
769
|
-
|
770
788
|
<ul>
|
771
789
|
<li>Taken directly from the <a href="http://contributor-covenant.org">contributor covenant</a> for your convenience</li>
|
772
|
-
</ul
|
790
|
+
</ul>
|
791
|
+
</li>
|
773
792
|
<li><code>Rakefile</code>
|
774
|
-
|
775
793
|
<ul>
|
776
794
|
<li>So you can run rspec tests as a rake task</li>
|
777
|
-
</ul></li>
|
778
795
|
</ul>
|
779
|
-
|
796
|
+
</li>
|
797
|
+
</ul>
|
780
798
|
<p>There is a lot of controvesy online regarding using the <code>gemfile</code> vs the <code>gemspec</code>. If you are new to Ruby in general then I suggest declaring your dependencies in the gemspec and leaving the <code>gemfile</code> as-is. This keeps things simple and allows publishing and distributing your tool as a gem.</p>
|
781
|
-
|
782
799
|
<p>Additionally, note that a git repo is not created automatically. Using git is out of scope of this tutorial, but you can find tutorials <a href="https://www.tutorialspoint.com/git/">here</a>.</p>
|
783
|
-
|
784
800
|
<h2 id="rbcli-folders">RBCli Folders</h2>
|
785
|
-
|
786
801
|
<ul>
|
787
802
|
<li><code>application/</code>
|
788
|
-
|
789
803
|
<ul>
|
790
804
|
<li>This is where the core of your application will live. You will define CLI options, commands, scripts, and hooks within this folder.</li>
|
791
|
-
</ul
|
805
|
+
</ul>
|
806
|
+
</li>
|
792
807
|
<li><code>config/</code>
|
793
|
-
|
794
808
|
<ul>
|
795
809
|
<li>This folder contains the configuration for RBCli’s features; such as storage, logging, and automatic updates.</li>
|
796
|
-
</ul
|
810
|
+
</ul>
|
811
|
+
</li>
|
797
812
|
<li><code>exe/</code>
|
798
|
-
|
799
813
|
<ul>
|
800
814
|
<li>This folder contains the executable for your tool. You should not edit it; doing so may lead to unexpected behavior.</li>
|
801
|
-
</ul
|
815
|
+
</ul>
|
816
|
+
</li>
|
802
817
|
<li><code>hooks/</code>
|
803
|
-
|
804
818
|
<ul>
|
805
819
|
<li>RBCli has several hooks that can be used to run code at different times, such as the ‘default’ code that is run when no command is selected. This is where they are placed.</li>
|
806
|
-
</ul
|
820
|
+
</ul>
|
821
|
+
</li>
|
807
822
|
<li><code>lib/</code>
|
808
|
-
|
809
823
|
<ul>
|
810
824
|
<li>This folder is for you to write any additional code as you see fit, for importing into your commands, scripts, and hooks. It is automatically added to the $LOAD_PATH for you, so you can just use require statements like <code>require 'abc.rb'</code> without worrying about where they are located on the filesystem.</li>
|
811
|
-
</ul
|
825
|
+
</ul>
|
826
|
+
</li>
|
812
827
|
<li><code>userconf/</code>
|
813
|
-
|
814
828
|
<ul>
|
815
829
|
<li>This folder is for you to place the layout and defaults of any userspace config file. Acceptable formats are yaml and json, though we recommend YAML since it is by far easier to read and supports comments.</li>
|
816
|
-
</ul
|
830
|
+
</ul>
|
831
|
+
</li>
|
817
832
|
<li><code>spec/</code>
|
818
|
-
|
819
833
|
<ul>
|
820
834
|
<li>This folder is for your rspec tests.</li>
|
821
|
-
</ul
|
835
|
+
</ul>
|
836
|
+
</li>
|
822
837
|
<li><code>.rbcli</code>
|
823
|
-
|
824
838
|
<ul>
|
825
839
|
<li>This file is for internal use by RBCli. It should not be modified or deleted.</li>
|
826
|
-
</ul></li>
|
827
840
|
</ul>
|
828
|
-
|
841
|
+
</li>
|
842
|
+
</ul>
|
829
843
|
<h2 id="next-steps">Next Steps</h2>
|
830
|
-
|
831
844
|
<p>For the purposes of getting started right now, you don’t actually need to edit any of the defaults already present.</p>
|
832
|
-
|
833
845
|
<p>We just finished going through what an RBCli project looks like. Now let’s create our first application with it!</p>
|
834
846
|
|
835
847
|
|
836
|
-
<footer class="
|
848
|
+
<footer class="footline">
|
837
849
|
|
838
850
|
</footer>
|
839
851
|
|
840
|
-
|
841
852
|
|
842
853
|
</div>
|
843
854
|
|
@@ -1265,20 +1276,19 @@ rbcli init -n mytool -t micro
|
|
1265
1276
|
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
|
1266
1277
|
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
|
1267
1278
|
</div>
|
1268
|
-
<script src="/rbcli/js/clipboard.min.js?
|
1269
|
-
<script src="/rbcli/js/perfect-scrollbar.min.js?
|
1270
|
-
<script src="/rbcli/js/perfect-scrollbar.jquery.min.js?
|
1271
|
-
<script src="/rbcli/js/jquery.sticky.js?
|
1272
|
-
<script src="/rbcli/js/featherlight.min.js?
|
1273
|
-
<script src="/rbcli/js/
|
1274
|
-
<script src="/rbcli/js/highlight.pack.js?1561087612"></script>
|
1279
|
+
<script src="/rbcli/js/clipboard.min.js?1596148729"></script>
|
1280
|
+
<script src="/rbcli/js/perfect-scrollbar.min.js?1596148729"></script>
|
1281
|
+
<script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1596148729"></script>
|
1282
|
+
<script src="/rbcli/js/jquery.sticky.js?1596148729"></script>
|
1283
|
+
<script src="/rbcli/js/featherlight.min.js?1596148729"></script>
|
1284
|
+
<script src="/rbcli/js/highlight.pack.js?1596148729"></script>
|
1275
1285
|
<script>hljs.initHighlightingOnLoad();</script>
|
1276
|
-
<script src="/rbcli/js/modernizr.custom-3.6.0.js?
|
1277
|
-
<script src="/rbcli/js/learn.js?
|
1278
|
-
<script src="/rbcli/js/hugo-learn.js?
|
1286
|
+
<script src="/rbcli/js/modernizr.custom-3.6.0.js?1596148729"></script>
|
1287
|
+
<script src="/rbcli/js/learn.js?1596148729"></script>
|
1288
|
+
<script src="/rbcli/js/hugo-learn.js?1596148729"></script>
|
1279
1289
|
|
1280
|
-
<link href="/rbcli/mermaid/mermaid.css?
|
1281
|
-
<script src="/rbcli/mermaid/mermaid.js?
|
1290
|
+
<link href="/rbcli/mermaid/mermaid.css?1596148729" rel="stylesheet" />
|
1291
|
+
<script src="/rbcli/mermaid/mermaid.js?1596148729"></script>
|
1282
1292
|
<script>
|
1283
1293
|
mermaid.initialize({ startOnLoad: true });
|
1284
1294
|
</script>
|