rbcli 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/Gemfile.lock +19 -5
  4. data/docs/404.html +9 -9
  5. data/docs/advanced/automatic_updates/index.html +30 -30
  6. data/docs/advanced/command_types/index.html +78 -78
  7. data/docs/advanced/distributed_state_locking/index.html +30 -30
  8. data/docs/advanced/hooks/index.html +42 -42
  9. data/docs/advanced/index.html +27 -27
  10. data/docs/advanced/index.xml +12 -50
  11. data/docs/advanced/interactive_commands/index.html +35 -35
  12. data/docs/advanced/logging/index.html +36 -36
  13. data/docs/advanced/remote_execution/index.html +51 -51
  14. data/docs/advanced/state_storage/index.html +34 -34
  15. data/docs/advanced/user_config_files/index.html +30 -30
  16. data/docs/categories/index.html +27 -27
  17. data/docs/categories/index.xml +3 -2
  18. data/docs/development/changelog/index.html +91 -60
  19. data/docs/development/code_of_conduct/index.html +27 -27
  20. data/docs/development/contributing/index.html +40 -40
  21. data/docs/development/index.html +27 -27
  22. data/docs/development/index.xml +6 -16
  23. data/docs/development/license/index.html +26 -26
  24. data/docs/index.html +26 -26
  25. data/docs/index.json +15 -15
  26. data/docs/index.xml +20 -90
  27. data/docs/quick_reference/index.html +54 -54
  28. data/docs/quick_reference/index.xml +3 -2
  29. data/docs/sitemap.xml +0 -1
  30. data/docs/tags/index.html +27 -27
  31. data/docs/tags/index.xml +3 -2
  32. data/docs/tutorial/10-getting_started/index.html +33 -33
  33. data/docs/tutorial/20-project_layout/index.html +55 -55
  34. data/docs/tutorial/30-your_first_command/index.html +90 -90
  35. data/docs/tutorial/40-options_parameters_and_arguments/index.html +167 -167
  36. data/docs/tutorial/50-publishing/index.html +30 -30
  37. data/docs/tutorial/index.html +27 -27
  38. data/docs/tutorial/index.xml +8 -28
  39. data/docs/whoami/index.html +28 -28
  40. data/docs/whoami/index.xml +3 -2
  41. data/docs-src/.hugo_build.lock +0 -0
  42. data/docs-src/content/development/changelog.md +20 -0
  43. data/docs-src/makesite.sh +4 -4
  44. data/lib/rbcli/engine/command.rb +1 -1
  45. data/lib/rbcli/engine/parser.rb +9 -7
  46. data/lib/rbcli/util/optimist.rb +1063 -0
  47. data/lib/rbcli/version.rb +1 -1
  48. data/lib/rbcli-tool/util.rb +1 -1
  49. data/rbcli.gemspec +7 -3
  50. data/skeletons/micro/executable +6 -1
  51. data/skeletons/mini/executable +6 -1
  52. data/skeletons/project/untitled.gemspec +4 -4
  53. metadata +9 -8
  54. data/lib/rbcli/util/trollop.rb +0 -1050
@@ -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.88.1" />
6
+ <meta name="generator" content="Hugo 0.125.1">
7
7
  <meta name="description" content="">
8
8
 
9
9
 
@@ -12,21 +12,21 @@
12
12
  <title>Distributed State and Locking :: RBCli Documentation</title>
13
13
 
14
14
 
15
- <link href="/rbcli/css/nucleus.css?1634703589" rel="stylesheet">
16
- <link href="/rbcli/css/fontawesome-all.min.css?1634703589" rel="stylesheet">
17
- <link href="/rbcli/css/hybrid.css?1634703589" rel="stylesheet">
18
- <link href="/rbcli/css/featherlight.min.css?1634703589" rel="stylesheet">
19
- <link href="/rbcli/css/perfect-scrollbar.min.css?1634703589" rel="stylesheet">
20
- <link href="/rbcli/css/auto-complete.css?1634703589" rel="stylesheet">
21
- <link href="/rbcli/css/atom-one-dark-reasonable.css?1634703589" rel="stylesheet">
22
- <link href="/rbcli/css/theme.css?1634703589" rel="stylesheet">
23
- <link href="/rbcli/css/hugo-theme.css?1634703589" rel="stylesheet">
15
+ <link href="/rbcli/css/nucleus.css?1713907739" rel="stylesheet">
16
+ <link href="/rbcli/css/fontawesome-all.min.css?1713907739" rel="stylesheet">
17
+ <link href="/rbcli/css/hybrid.css?1713907739" rel="stylesheet">
18
+ <link href="/rbcli/css/featherlight.min.css?1713907739" rel="stylesheet">
19
+ <link href="/rbcli/css/perfect-scrollbar.min.css?1713907739" rel="stylesheet">
20
+ <link href="/rbcli/css/auto-complete.css?1713907739" rel="stylesheet">
21
+ <link href="/rbcli/css/atom-one-dark-reasonable.css?1713907739" rel="stylesheet">
22
+ <link href="/rbcli/css/theme.css?1713907739" rel="stylesheet">
23
+ <link href="/rbcli/css/hugo-theme.css?1713907739" rel="stylesheet">
24
24
 
25
- <link href="/rbcli/css/theme-blue.css?1634703589" rel="stylesheet">
25
+ <link href="/rbcli/css/theme-blue.css?1713907739" rel="stylesheet">
26
26
 
27
27
 
28
28
 
29
- <script src="/rbcli/js/jquery-3.3.1.min.js?1634703589"></script>
29
+ <script src="/rbcli/js/jquery-3.3.1.min.js?1713907739"></script>
30
30
 
31
31
  <style>
32
32
  :root #header + #content > #left > #rlblock_left{
@@ -55,14 +55,14 @@
55
55
  <span data-search-clear=""><i class="fas fa-times"></i></span>
56
56
  </div>
57
57
 
58
- <script type="text/javascript" src="/rbcli/js/lunr.min.js?1634703589"></script>
59
- <script type="text/javascript" src="/rbcli/js/auto-complete.js?1634703589"></script>
58
+ <script type="text/javascript" src="/rbcli/js/lunr.min.js?1713907739"></script>
59
+ <script type="text/javascript" src="/rbcli/js/auto-complete.js?1713907739"></script>
60
60
  <script type="text/javascript">
61
61
 
62
62
  var baseurl = "https:\/\/akhoury6.github.io\/rbcli\/";
63
63
 
64
64
  </script>
65
- <script type="text/javascript" src="/rbcli/js/search.js?1634703589"></script>
65
+ <script type="text/javascript" src="/rbcli/js/search.js?1713907739"></script>
66
66
 
67
67
 
68
68
  </div>
@@ -716,10 +716,10 @@
716
716
  </ol>
717
717
  <h2 id="manual-locking">Manual Locking</h2>
718
718
  <p>Remember: all state in Rbcli is lazy-loaded. Therefore, RBCli wll only attempt to lock the data when you first try to access it. If you need to make sure that the data is locked before executing a block of code, use:</p>
719
- <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby"><span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">.</span>remote_state<span style="color:#f92672">.</span>refresh
720
- </code></pre></div><p>to force the lock and retrieve the latest data. You can force an unlock by calling:</p>
721
- <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby"><span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">.</span>remote_state<span style="color:#f92672">.</span>disconnect
722
- </code></pre></div><p>Even if you do not want to store any data, you can leverage manual locking to control access to a different shared resource, such as a stateful API. For example, if you write a cloud deployment toolkit, you can ensure that only one user is attempting to modify a deployment at any given time.</p>
719
+ <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ruby" data-lang="ruby"><span style="display:flex;"><span><span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">.</span>remote_state<span style="color:#f92672">.</span>refresh
720
+ </span></span></code></pre></div><p>to force the lock and retrieve the latest data. You can force an unlock by calling:</p>
721
+ <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ruby" data-lang="ruby"><span style="display:flex;"><span><span style="color:#66d9ef">Rbcli</span><span style="color:#f92672">.</span>remote_state<span style="color:#f92672">.</span>disconnect
722
+ </span></span></code></pre></div><p>Even if you do not want to store any data, you can leverage manual locking to control access to a different shared resource, such as a stateful API. For example, if you write a cloud deployment toolkit, you can ensure that only one user is attempting to modify a deployment at any given time.</p>
723
723
 
724
724
 
725
725
  <footer class="footline">
@@ -1153,19 +1153,19 @@
1153
1153
  <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
1154
1154
  <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
1155
1155
  </div>
1156
- <script src="/rbcli/js/clipboard.min.js?1634703589"></script>
1157
- <script src="/rbcli/js/perfect-scrollbar.min.js?1634703589"></script>
1158
- <script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1634703589"></script>
1159
- <script src="/rbcli/js/jquery.sticky.js?1634703589"></script>
1160
- <script src="/rbcli/js/featherlight.min.js?1634703589"></script>
1161
- <script src="/rbcli/js/highlight.pack.js?1634703589"></script>
1156
+ <script src="/rbcli/js/clipboard.min.js?1713907739"></script>
1157
+ <script src="/rbcli/js/perfect-scrollbar.min.js?1713907739"></script>
1158
+ <script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1713907739"></script>
1159
+ <script src="/rbcli/js/jquery.sticky.js?1713907739"></script>
1160
+ <script src="/rbcli/js/featherlight.min.js?1713907739"></script>
1161
+ <script src="/rbcli/js/highlight.pack.js?1713907739"></script>
1162
1162
  <script>hljs.initHighlightingOnLoad();</script>
1163
- <script src="/rbcli/js/modernizr.custom-3.6.0.js?1634703589"></script>
1164
- <script src="/rbcli/js/learn.js?1634703589"></script>
1165
- <script src="/rbcli/js/hugo-learn.js?1634703589"></script>
1163
+ <script src="/rbcli/js/modernizr.custom-3.6.0.js?1713907739"></script>
1164
+ <script src="/rbcli/js/learn.js?1713907739"></script>
1165
+ <script src="/rbcli/js/hugo-learn.js?1713907739"></script>
1166
1166
 
1167
- <link href="/rbcli/mermaid/mermaid.css?1634703589" rel="stylesheet" />
1168
- <script src="/rbcli/mermaid/mermaid.js?1634703589"></script>
1167
+ <link href="/rbcli/mermaid/mermaid.css?1713907739" rel="stylesheet" />
1168
+ <script src="/rbcli/mermaid/mermaid.js?1713907739"></script>
1169
1169
  <script>
1170
1170
  mermaid.initialize({ startOnLoad: true });
1171
1171
  </script>
@@ -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.88.1" />
6
+ <meta name="generator" content="Hugo 0.125.1">
7
7
  <meta name="description" content="">
8
8
 
9
9
 
@@ -12,21 +12,21 @@
12
12
  <title>Execution Hooks :: RBCli Documentation</title>
13
13
 
14
14
 
15
- <link href="/rbcli/css/nucleus.css?1634703589" rel="stylesheet">
16
- <link href="/rbcli/css/fontawesome-all.min.css?1634703589" rel="stylesheet">
17
- <link href="/rbcli/css/hybrid.css?1634703589" rel="stylesheet">
18
- <link href="/rbcli/css/featherlight.min.css?1634703589" rel="stylesheet">
19
- <link href="/rbcli/css/perfect-scrollbar.min.css?1634703589" rel="stylesheet">
20
- <link href="/rbcli/css/auto-complete.css?1634703589" rel="stylesheet">
21
- <link href="/rbcli/css/atom-one-dark-reasonable.css?1634703589" rel="stylesheet">
22
- <link href="/rbcli/css/theme.css?1634703589" rel="stylesheet">
23
- <link href="/rbcli/css/hugo-theme.css?1634703589" rel="stylesheet">
15
+ <link href="/rbcli/css/nucleus.css?1713907739" rel="stylesheet">
16
+ <link href="/rbcli/css/fontawesome-all.min.css?1713907739" rel="stylesheet">
17
+ <link href="/rbcli/css/hybrid.css?1713907739" rel="stylesheet">
18
+ <link href="/rbcli/css/featherlight.min.css?1713907739" rel="stylesheet">
19
+ <link href="/rbcli/css/perfect-scrollbar.min.css?1713907739" rel="stylesheet">
20
+ <link href="/rbcli/css/auto-complete.css?1713907739" rel="stylesheet">
21
+ <link href="/rbcli/css/atom-one-dark-reasonable.css?1713907739" rel="stylesheet">
22
+ <link href="/rbcli/css/theme.css?1713907739" rel="stylesheet">
23
+ <link href="/rbcli/css/hugo-theme.css?1713907739" rel="stylesheet">
24
24
 
25
- <link href="/rbcli/css/theme-blue.css?1634703589" rel="stylesheet">
25
+ <link href="/rbcli/css/theme-blue.css?1713907739" rel="stylesheet">
26
26
 
27
27
 
28
28
 
29
- <script src="/rbcli/js/jquery-3.3.1.min.js?1634703589"></script>
29
+ <script src="/rbcli/js/jquery-3.3.1.min.js?1713907739"></script>
30
30
 
31
31
  <style>
32
32
  :root #header + #content > #left > #rlblock_left{
@@ -55,14 +55,14 @@
55
55
  <span data-search-clear=""><i class="fas fa-times"></i></span>
56
56
  </div>
57
57
 
58
- <script type="text/javascript" src="/rbcli/js/lunr.min.js?1634703589"></script>
59
- <script type="text/javascript" src="/rbcli/js/auto-complete.js?1634703589"></script>
58
+ <script type="text/javascript" src="/rbcli/js/lunr.min.js?1713907739"></script>
59
+ <script type="text/javascript" src="/rbcli/js/auto-complete.js?1713907739"></script>
60
60
  <script type="text/javascript">
61
61
 
62
62
  var baseurl = "https:\/\/akhoury6.github.io\/rbcli\/";
63
63
 
64
64
  </script>
65
- <script type="text/javascript" src="/rbcli/js/search.js?1634703589"></script>
65
+ <script type="text/javascript" src="/rbcli/js/search.js?1713907739"></script>
66
66
 
67
67
 
68
68
  </div>
@@ -711,31 +711,31 @@
711
711
  <h2 id="the-defailt-action-hook">The Defailt Action Hook</h2>
712
712
  <p>The Default hook is called when a user calls your application without providing a command. If the hook is not provided, the application will automatically display the help text (the same as running it with <code>-h</code>).</p>
713
713
  <p>To create it in your project, run:</p>
714
- <div class="highlight"><pre tabindex="0" 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 hook --default
715
- <span style="color:#75715e"># or</span>
716
- rbcli hook -d
717
- </code></pre></div><p>You will then find the hook under <code>hooks/default_action.rb</code>.</p>
714
+ <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>rbcli hook --default
715
+ </span></span><span style="display:flex;"><span><span style="color:#75715e"># or</span>
716
+ </span></span><span style="display:flex;"><span>rbcli hook -d
717
+ </span></span></code></pre></div><p>You will then find the hook under <code>hooks/default_action.rb</code>.</p>
718
718
  <h2 id="the-pre-execution-hook">The Pre-Execution Hook</h2>
719
719
  <p>The Pre-Execution hook is called after the global command line options are parsed and before a command is executed.</p>
720
720
  <p>To create it in your project, run:</p>
721
- <div class="highlight"><pre tabindex="0" 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 hook --pre
722
- <span style="color:#75715e"># or</span>
723
- rbcli hook -p
724
- </code></pre></div><p>You will then find the hook under <code>hooks/pre_execution.rb</code>.</p>
721
+ <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>rbcli hook --pre
722
+ </span></span><span style="display:flex;"><span><span style="color:#75715e"># or</span>
723
+ </span></span><span style="display:flex;"><span>rbcli hook -p
724
+ </span></span></code></pre></div><p>You will then find the hook under <code>hooks/pre_execution.rb</code>.</p>
725
725
  <h2 id="the-post-execution-hook">The Post-Execution Hook</h2>
726
726
  <p>The Pre-Execution hook is called after a command is executed.</p>
727
727
  <p>To create it in your project, run:</p>
728
- <div class="highlight"><pre tabindex="0" 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 hook --post
729
- <span style="color:#75715e"># or</span>
730
- rbcli hook -o
731
- </code></pre></div><p>You will then find the hook under <code>hooks/post_execution.rb</code>.</p>
728
+ <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>rbcli hook --post
729
+ </span></span><span style="display:flex;"><span><span style="color:#75715e"># or</span>
730
+ </span></span><span style="display:flex;"><span>rbcli hook -o
731
+ </span></span></code></pre></div><p>You will then find the hook under <code>hooks/post_execution.rb</code>.</p>
732
732
  <h2 id="the-first-run-hook">The First-Run Hook</h2>
733
733
  <p>The First-Run hook is called the first time a user executes your application. Using the first-run hook requires enabling <a href="/rbcli/advanced/state_storage/">Local State Storage</a> for persistence.</p>
734
734
  <p>To create it in your project, run:</p>
735
- <div class="highlight"><pre tabindex="0" 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 hook --firstrun
736
- <span style="color:#75715e"># or</span>
737
- rbcli hook -f
738
- </code></pre></div><p>You will then find the hook under <code>hooks/first_run.rb</code>.</p>
735
+ <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>rbcli hook --firstrun
736
+ </span></span><span style="display:flex;"><span><span style="color:#75715e"># or</span>
737
+ </span></span><span style="display:flex;"><span>rbcli hook -f
738
+ </span></span></code></pre></div><p>You will then find the hook under <code>hooks/first_run.rb</code>.</p>
739
739
 
740
740
 
741
741
  <footer class="footline">
@@ -1169,19 +1169,19 @@ rbcli hook -f
1169
1169
  <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
1170
1170
  <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
1171
1171
  </div>
1172
- <script src="/rbcli/js/clipboard.min.js?1634703589"></script>
1173
- <script src="/rbcli/js/perfect-scrollbar.min.js?1634703589"></script>
1174
- <script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1634703589"></script>
1175
- <script src="/rbcli/js/jquery.sticky.js?1634703589"></script>
1176
- <script src="/rbcli/js/featherlight.min.js?1634703589"></script>
1177
- <script src="/rbcli/js/highlight.pack.js?1634703589"></script>
1172
+ <script src="/rbcli/js/clipboard.min.js?1713907739"></script>
1173
+ <script src="/rbcli/js/perfect-scrollbar.min.js?1713907739"></script>
1174
+ <script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1713907739"></script>
1175
+ <script src="/rbcli/js/jquery.sticky.js?1713907739"></script>
1176
+ <script src="/rbcli/js/featherlight.min.js?1713907739"></script>
1177
+ <script src="/rbcli/js/highlight.pack.js?1713907739"></script>
1178
1178
  <script>hljs.initHighlightingOnLoad();</script>
1179
- <script src="/rbcli/js/modernizr.custom-3.6.0.js?1634703589"></script>
1180
- <script src="/rbcli/js/learn.js?1634703589"></script>
1181
- <script src="/rbcli/js/hugo-learn.js?1634703589"></script>
1179
+ <script src="/rbcli/js/modernizr.custom-3.6.0.js?1713907739"></script>
1180
+ <script src="/rbcli/js/learn.js?1713907739"></script>
1181
+ <script src="/rbcli/js/hugo-learn.js?1713907739"></script>
1182
1182
 
1183
- <link href="/rbcli/mermaid/mermaid.css?1634703589" rel="stylesheet" />
1184
- <script src="/rbcli/mermaid/mermaid.js?1634703589"></script>
1183
+ <link href="/rbcli/mermaid/mermaid.css?1713907739" rel="stylesheet" />
1184
+ <script src="/rbcli/mermaid/mermaid.js?1713907739"></script>
1185
1185
  <script>
1186
1186
  mermaid.initialize({ startOnLoad: true });
1187
1187
  </script>
@@ -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.88.1" />
6
+ <meta name="generator" content="Hugo 0.125.1">
7
7
  <meta name="description" content="">
8
8
 
9
9
 
@@ -12,21 +12,21 @@
12
12
  <title>Advanced :: RBCli Documentation</title>
13
13
 
14
14
 
15
- <link href="/rbcli/css/nucleus.css?1634703589" rel="stylesheet">
16
- <link href="/rbcli/css/fontawesome-all.min.css?1634703589" rel="stylesheet">
17
- <link href="/rbcli/css/hybrid.css?1634703589" rel="stylesheet">
18
- <link href="/rbcli/css/featherlight.min.css?1634703589" rel="stylesheet">
19
- <link href="/rbcli/css/perfect-scrollbar.min.css?1634703589" rel="stylesheet">
20
- <link href="/rbcli/css/auto-complete.css?1634703589" rel="stylesheet">
21
- <link href="/rbcli/css/atom-one-dark-reasonable.css?1634703589" rel="stylesheet">
22
- <link href="/rbcli/css/theme.css?1634703589" rel="stylesheet">
23
- <link href="/rbcli/css/hugo-theme.css?1634703589" rel="stylesheet">
15
+ <link href="/rbcli/css/nucleus.css?1713907739" rel="stylesheet">
16
+ <link href="/rbcli/css/fontawesome-all.min.css?1713907739" rel="stylesheet">
17
+ <link href="/rbcli/css/hybrid.css?1713907739" rel="stylesheet">
18
+ <link href="/rbcli/css/featherlight.min.css?1713907739" rel="stylesheet">
19
+ <link href="/rbcli/css/perfect-scrollbar.min.css?1713907739" rel="stylesheet">
20
+ <link href="/rbcli/css/auto-complete.css?1713907739" rel="stylesheet">
21
+ <link href="/rbcli/css/atom-one-dark-reasonable.css?1713907739" rel="stylesheet">
22
+ <link href="/rbcli/css/theme.css?1713907739" rel="stylesheet">
23
+ <link href="/rbcli/css/hugo-theme.css?1713907739" rel="stylesheet">
24
24
 
25
- <link href="/rbcli/css/theme-blue.css?1634703589" rel="stylesheet">
25
+ <link href="/rbcli/css/theme-blue.css?1713907739" rel="stylesheet">
26
26
 
27
27
 
28
28
 
29
- <script src="/rbcli/js/jquery-3.3.1.min.js?1634703589"></script>
29
+ <script src="/rbcli/js/jquery-3.3.1.min.js?1713907739"></script>
30
30
 
31
31
  <style>
32
32
  :root #header + #content > #left > #rlblock_left{
@@ -55,14 +55,14 @@
55
55
  <span data-search-clear=""><i class="fas fa-times"></i></span>
56
56
  </div>
57
57
 
58
- <script type="text/javascript" src="/rbcli/js/lunr.min.js?1634703589"></script>
59
- <script type="text/javascript" src="/rbcli/js/auto-complete.js?1634703589"></script>
58
+ <script type="text/javascript" src="/rbcli/js/lunr.min.js?1713907739"></script>
59
+ <script type="text/javascript" src="/rbcli/js/auto-complete.js?1713907739"></script>
60
60
  <script type="text/javascript">
61
61
 
62
62
  var baseurl = "https:\/\/akhoury6.github.io\/rbcli\/";
63
63
 
64
64
  </script>
65
- <script type="text/javascript" src="/rbcli/js/search.js?1634703589"></script>
65
+ <script type="text/javascript" src="/rbcli/js/search.js?1713907739"></script>
66
66
 
67
67
 
68
68
  </div>
@@ -244,7 +244,7 @@
244
244
 
245
245
 
246
246
  <li data-nav-id="/rbcli/advanced/" title="Advanced" class="dd-item
247
- parent
247
+
248
248
  active
249
249
 
250
250
  ">
@@ -1118,19 +1118,19 @@
1118
1118
  <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
1119
1119
  <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
1120
1120
  </div>
1121
- <script src="/rbcli/js/clipboard.min.js?1634703589"></script>
1122
- <script src="/rbcli/js/perfect-scrollbar.min.js?1634703589"></script>
1123
- <script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1634703589"></script>
1124
- <script src="/rbcli/js/jquery.sticky.js?1634703589"></script>
1125
- <script src="/rbcli/js/featherlight.min.js?1634703589"></script>
1126
- <script src="/rbcli/js/highlight.pack.js?1634703589"></script>
1121
+ <script src="/rbcli/js/clipboard.min.js?1713907739"></script>
1122
+ <script src="/rbcli/js/perfect-scrollbar.min.js?1713907739"></script>
1123
+ <script src="/rbcli/js/perfect-scrollbar.jquery.min.js?1713907739"></script>
1124
+ <script src="/rbcli/js/jquery.sticky.js?1713907739"></script>
1125
+ <script src="/rbcli/js/featherlight.min.js?1713907739"></script>
1126
+ <script src="/rbcli/js/highlight.pack.js?1713907739"></script>
1127
1127
  <script>hljs.initHighlightingOnLoad();</script>
1128
- <script src="/rbcli/js/modernizr.custom-3.6.0.js?1634703589"></script>
1129
- <script src="/rbcli/js/learn.js?1634703589"></script>
1130
- <script src="/rbcli/js/hugo-learn.js?1634703589"></script>
1128
+ <script src="/rbcli/js/modernizr.custom-3.6.0.js?1713907739"></script>
1129
+ <script src="/rbcli/js/learn.js?1713907739"></script>
1130
+ <script src="/rbcli/js/hugo-learn.js?1713907739"></script>
1131
1131
 
1132
- <link href="/rbcli/mermaid/mermaid.css?1634703589" rel="stylesheet" />
1133
- <script src="/rbcli/mermaid/mermaid.js?1634703589"></script>
1132
+ <link href="/rbcli/mermaid/mermaid.css?1713907739" rel="stylesheet" />
1133
+ <script src="/rbcli/mermaid/mermaid.js?1713907739"></script>
1134
1134
  <script>
1135
1135
  mermaid.initialize({ startOnLoad: true });
1136
1136
  </script>
@@ -4,110 +4,72 @@
4
4
  <title>Advanced on RBCli Documentation</title>
5
5
  <link>https://akhoury6.github.io/rbcli/advanced/</link>
6
6
  <description>Recent content in Advanced on RBCli Documentation</description>
7
- <generator>Hugo -- gohugo.io</generator>
7
+ <generator>Hugo 0.125.1</generator>
8
8
  <language>en-us</language>
9
- <lastBuildDate>Thu, 20 Jun 2019 15:08:08 -0400</lastBuildDate><atom:link href="https://akhoury6.github.io/rbcli/advanced/index.xml" rel="self" type="application/rss+xml" />
9
+ <lastBuildDate>Thu, 20 Jun 2019 15:07:21 -0400</lastBuildDate>
10
+ <atom:link href="https://akhoury6.github.io/rbcli/advanced/index.xml" rel="self" type="application/rss+xml" />
10
11
  <item>
11
12
  <title>Automatic Updates</title>
12
13
  <link>https://akhoury6.github.io/rbcli/advanced/automatic_updates/</link>
13
14
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
14
-
15
15
  <guid>https://akhoury6.github.io/rbcli/advanced/automatic_updates/</guid>
16
- <description>RBCli can automatically notify users when an update is available. If force_update is set (see below), RBCli can halt execution until the user updates their application.
17
- Two sources are currently supported: Github (including Enterprise) and RubyGems.
18
- GitHub Update Check The GitHub update check works best when paired with GitHub&amp;rsquo;s best practices on releases, where new releases are tagged on master with the format vX.X.X. See Github&amp;rsquo;s release documentation to learn more.</description>
16
+ <description>RBCli can automatically notify users when an update is available. If force_update is set (see below), RBCli can halt execution until the user updates their application.&#xA;Two sources are currently supported: Github (including Enterprise) and RubyGems.&#xA;GitHub Update Check The GitHub update check works best when paired with GitHub&amp;rsquo;s best practices on releases, where new releases are tagged on master with the format vX.X.X. See Github&amp;rsquo;s release documentation to learn more.</description>
19
17
  </item>
20
-
21
18
  <item>
22
19
  <title>Command Types</title>
23
20
  <link>https://akhoury6.github.io/rbcli/advanced/command_types/</link>
24
21
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
25
-
26
22
  <guid>https://akhoury6.github.io/rbcli/advanced/command_types/</guid>
27
- <description>RBCli has three different command types:
28
- Standard Commands (Ruby-based) Scripted Commands (Ruby+Bash based) External Commands (Wrapping a 3rd party application) This document is provided to be a reference. If you would like an in-depth tutorial, please see Your First Command.
29
- General Command Structure Commands in RBCli are created by subclassing Rbcli::Command. All commands share a certain common structure:
30
- class List &amp;lt; Rbcli::Command # Declare a new command by subclassing Rbcli::Command description &amp;#39;TODO: Description goes here&amp;#39; # (Required) Short description for the global help usage &amp;lt;&amp;lt;-EOF TODO: Usage text goes here EOF # (Required) Long description for the command-specific help parameter :force, &amp;#39;Force testing&amp;#39;, type: :boolean, default: false, required: false # (Optional, Multiple) Add a command-specific CLI parameter.</description>
23
+ <description>RBCli has three different command types:&#xA;Standard Commands (Ruby-based) Scripted Commands (Ruby+Bash based) External Commands (Wrapping a 3rd party application) This document is provided to be a reference. If you would like an in-depth tutorial, please see Your First Command.&#xA;General Command Structure Commands in RBCli are created by subclassing Rbcli::Command. All commands share a certain common structure:&#xA;class List &amp;lt; Rbcli::Command # Declare a new command by subclassing Rbcli::Command description &amp;#39;TODO: Description goes here&amp;#39; # (Required) Short description for the global help usage &amp;lt;&amp;lt;-EOF TODO: Usage text goes here EOF # (Required) Long description for the command-specific help parameter :force, &amp;#39;Force testing&amp;#39;, type: :boolean, default: false, required: false # (Optional, Multiple) Add a command-specific CLI parameter.</description>
31
24
  </item>
32
-
33
25
  <item>
34
26
  <title>Distributed State and Locking</title>
35
27
  <link>https://akhoury6.github.io/rbcli/advanced/distributed_state_locking/</link>
36
28
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
37
-
38
29
  <guid>https://akhoury6.github.io/rbcli/advanced/distributed_state_locking/</guid>
39
- <description>Distributed Locking allows a Remote State to be shared among multiple users of the application to make writes appear atomic between sessions. To use it, simply set the locking: parameter to true when enabling remote state.
40
- This is how locking works:
41
- The application attempts to acquire a lock on the remote state when you first access it If the backend is locked by a different application, wait and try again If it succeeds, the lock is held and refreshed periodically When the application exits, the lock is released If the application does not refresh its lock, or fails to release it when it exits, the lock will automatically expire within 60 seconds If another application steals the lock (unlikely but possible), and the application tries to save data, a StandardError will be thrown You can manually attempt to lock/unlock by calling Rbcli.</description>
30
+ <description>Distributed Locking allows a Remote State to be shared among multiple users of the application to make writes appear atomic between sessions. To use it, simply set the locking: parameter to true when enabling remote state.&#xA;This is how locking works:&#xA;The application attempts to acquire a lock on the remote state when you first access it If the backend is locked by a different application, wait and try again If it succeeds, the lock is held and refreshed periodically When the application exits, the lock is released If the application does not refresh its lock, or fails to release it when it exits, the lock will automatically expire within 60 seconds If another application steals the lock (unlikely but possible), and the application tries to save data, a StandardError will be thrown You can manually attempt to lock/unlock by calling Rbcli.</description>
42
31
  </item>
43
-
44
32
  <item>
45
33
  <title>Execution Hooks</title>
46
34
  <link>https://akhoury6.github.io/rbcli/advanced/hooks/</link>
47
35
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
48
-
49
36
  <guid>https://akhoury6.github.io/rbcli/advanced/hooks/</guid>
50
- <description>RBCli provides you with hooks that can be used to have code execute at certain places in the execution chain. These hooks are optional, and do not have to be defined for your application to run.
51
- All hooks will be created in the hooks/ folder in your project.
52
- The Defailt Action Hook The Default hook is called when a user calls your application without providing a command. If the hook is not provided, the application will automatically display the help text (the same as running it with -h).</description>
37
+ <description>RBCli provides you with hooks that can be used to have code execute at certain places in the execution chain. These hooks are optional, and do not have to be defined for your application to run.&#xA;All hooks will be created in the hooks/ folder in your project.&#xA;The Defailt Action Hook The Default hook is called when a user calls your application without providing a command. If the hook is not provided, the application will automatically display the help text (the same as running it with -h).</description>
53
38
  </item>
54
-
55
39
  <item>
56
40
  <title>Interactive Commands</title>
57
41
  <link>https://akhoury6.github.io/rbcli/advanced/interactive_commands/</link>
58
42
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
59
-
60
43
  <guid>https://akhoury6.github.io/rbcli/advanced/interactive_commands/</guid>
61
- <description>Why interactive commands? When catering to an audience of users who are not accustomed to scripting, you may want to prompt them for the information directly (the typical CS-101 &amp;lsquo;puts&amp;rsquo; and &amp;lsquo;gets&amp;rsquo; pattern). This can be a lot more straightforward than having to read the help texts of your tool, and trying multiple times to enter all of the required data.
62
- Of course, we want to make sure that scripting with the tool still works well (headless interaction).</description>
44
+ <description>Why interactive commands? When catering to an audience of users who are not accustomed to scripting, you may want to prompt them for the information directly (the typical CS-101 &amp;lsquo;puts&amp;rsquo; and &amp;lsquo;gets&amp;rsquo; pattern). This can be a lot more straightforward than having to read the help texts of your tool, and trying multiple times to enter all of the required data.&#xA;Of course, we want to make sure that scripting with the tool still works well (headless interaction).</description>
63
45
  </item>
64
-
65
46
  <item>
66
47
  <title>Logging</title>
67
48
  <link>https://akhoury6.github.io/rbcli/advanced/logging/</link>
68
49
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
69
-
70
50
  <guid>https://akhoury6.github.io/rbcli/advanced/logging/</guid>
71
- <description>Logging with RBCli is straightforward - it looks at the config file for logging settings, and instantiates a single, globally accessible Logger object. You can access it within a standard command like this:
72
- Rbcli::log.info { &amp;#39;These logs can go to STDERR, STDOUT, or a file&amp;#39; } Enabling Logging To enable logging, simply set the default values in the config/logging.rb file:
73
- log_level :info log_target &amp;#39;stderr&amp;#39; log_level You can set the default log level using either numeric or standard Ruby logger levels: 0-5, or DEBUG &amp;lt; INFO &amp;lt; WARN &amp;lt; ERROR &amp;lt; FATAL &amp;lt; UNKNOWN log_target This specifies where the logs will be placed.</description>
51
+ <description>Logging with RBCli is straightforward - it looks at the config file for logging settings, and instantiates a single, globally accessible Logger object. You can access it within a standard command like this:&#xA;Rbcli::log.info { &amp;#39;These logs can go to STDERR, STDOUT, or a file&amp;#39; } Enabling Logging To enable logging, simply set the default values in the config/logging.rb file:&#xA;log_level :info log_target &amp;#39;stderr&amp;#39; log_level You can set the default log level using either numeric or standard Ruby logger levels: 0-5, or DEBUG &amp;lt; INFO &amp;lt; WARN &amp;lt; ERROR &amp;lt; FATAL &amp;lt; UNKNOWN log_target This specifies where the logs will be placed.</description>
74
52
  </item>
75
-
76
53
  <item>
77
54
  <title>Remote Execution</title>
78
55
  <link>https://akhoury6.github.io/rbcli/advanced/remote_execution/</link>
79
56
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
80
-
81
57
  <guid>https://akhoury6.github.io/rbcli/advanced/remote_execution/</guid>
82
- <description>RBCli can be configured to execute commands on a remote machine via SSH instead of locally.
83
- Currently, only script and extern commands are supported.
84
- Configuration To allow remote execution, go to config/general.rb and change the following line to true:
85
- remote_execution permitted: false Then, for each command that you would like to enable remote execution for, add the following directive to the command class declaration:
86
- remote_permitted Usage Your end users can now execute a command remotely by specifying the connection string and credentials on the command line as follows:</description>
58
+ <description>RBCli can be configured to execute commands on a remote machine via SSH instead of locally.&#xA;Currently, only script and extern commands are supported.&#xA;Configuration To allow remote execution, go to config/general.rb and change the following line to true:&#xA;remote_execution permitted: false Then, for each command that you would like to enable remote execution for, add the following directive to the command class declaration:&#xA;remote_permitted Usage Your end users can now execute a command remotely by specifying the connection string and credentials on the command line as follows:</description>
87
59
  </item>
88
-
89
60
  <item>
90
61
  <title>State Storage</title>
91
62
  <link>https://akhoury6.github.io/rbcli/advanced/state_storage/</link>
92
63
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
93
-
94
64
  <guid>https://akhoury6.github.io/rbcli/advanced/state_storage/</guid>
95
- <description>RBCli supports both local and remote state storage. This is done by synchronizing a Hash with either the local disk or a remote database.
96
- Local State RBCli&amp;rsquo;s local state storage gives you access to a hash that is automatically persisted to disk when changes are made.
97
- Configuration You can configure it in config/storage.rb.
98
- local_state &amp;#39;/var/mytool/localstate&amp;#39;, force_creation: true, halt_on_error: true There are three parameters to configure it with:
99
- The path as a string (self-explanatory) force_creation This will attempt to create the path and file if it does not exist (equivalent to an mkdir -p and touch in linux) halt_on_error RBCli&amp;rsquo;s default behavior is to raise an exception if the file can not be created, read, or updated at any point in time If this is set to false, RBCli will silence any errors pertaining to file access and will fall back to whatever data is available.</description>
65
+ <description>RBCli supports both local and remote state storage. This is done by synchronizing a Hash with either the local disk or a remote database.&#xA;Local State RBCli&amp;rsquo;s local state storage gives you access to a hash that is automatically persisted to disk when changes are made.&#xA;Configuration You can configure it in config/storage.rb.&#xA;local_state &amp;#39;/var/mytool/localstate&amp;#39;, force_creation: true, halt_on_error: true There are three parameters to configure it with:&#xA;The path as a string (self-explanatory) force_creation This will attempt to create the path and file if it does not exist (equivalent to an mkdir -p and touch in linux) halt_on_error RBCli&amp;rsquo;s default behavior is to raise an exception if the file can not be created, read, or updated at any point in time If this is set to false, RBCli will silence any errors pertaining to file access and will fall back to whatever data is available.</description>
100
66
  </item>
101
-
102
67
  <item>
103
68
  <title>User Configuration Files</title>
104
69
  <link>https://akhoury6.github.io/rbcli/advanced/user_config_files/</link>
105
70
  <pubDate>Thu, 20 Jun 2019 15:07:21 -0400</pubDate>
106
-
107
71
  <guid>https://akhoury6.github.io/rbcli/advanced/user_config_files/</guid>
108
- <description>RBCli provides built-in support for creating and managing userspace configuration files. It does this through two chains: the defaults chain and the user chain.
109
- Defaults chain The defaults chain allows you to specify sane defaults for your CLI tool throughout your code. This gives you the ability to declare configuration alongside the code, and allows RBCli to generate a user config automatically given your defaults. There are two ways to set them:</description>
72
+ <description>RBCli provides built-in support for creating and managing userspace configuration files. It does this through two chains: the defaults chain and the user chain.&#xA;Defaults chain The defaults chain allows you to specify sane defaults for your CLI tool throughout your code. This gives you the ability to declare configuration alongside the code, and allows RBCli to generate a user config automatically given your defaults. There are two ways to set them:</description>
110
73
  </item>
111
-
112
74
  </channel>
113
75
  </rss>