hookapp 2.0.9 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a5b6a517bd76ec8ddfc8ef6ffb98d6690dc56c2d5133bb1ad88635d72aaf55e
4
- data.tar.gz: ddd95cde21eba658a09a98c04c49a03e98853bc450b257d2f6ad843cdf084f35
3
+ metadata.gz: 139ecb2e98a6f42e1499541fd62cc8b7605e4223874dec1ed843d05e50d15b9e
4
+ data.tar.gz: afe9d0893cb5ae49a2063228b74580801d78987ebbb4e4374b0bef8bfdd08fde
5
5
  SHA512:
6
- metadata.gz: 2ab5784b34f8a8380b37202cd1a674c78083e6ec1748f3320f4292933a7cc20cd20db520daa7fd697dade590fa32d5f7d21224e1ebae4396fe5ec2aaff7f6081
7
- data.tar.gz: b45ce5ede9b4fa988f660fb5943b0ce1a7ee8e7bfffd9d0d5a45b0a4138c1db812a8f36dffcba02159e20f370e64e2b611e2e968a61fbf2d763ec03295d927d2
6
+ metadata.gz: 7ddb41793305f83f4f0b4b09abf4e27c35f19c9f97c23ff5c33a082ef94bec9445572c9481f831131770afaec6fd2c344700405a2bc801e37e5749b500fbfca7
7
+ data.tar.gz: d5020af5a886bd2df01839afc7dc642926307d077b8a36e89e520e420c55724dca7ead7626db0571e7f694c4d92231891a9a219f9b32f811dbe48e47c6581414
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ #### 2.0.10
2
+
3
+ - Fix permissions issues when installed using sudo
4
+
1
5
  #### 2.0.9
2
6
 
3
7
  - Fix fzf integration across platforms
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hookapp (2.0.9)
4
+ hookapp (2.0.10)
5
5
  gli (~> 2.20.1)
6
6
  tty-which (~> 0.5, >= 0.5.0)
7
7
 
data/README.md CHANGED
@@ -6,7 +6,7 @@ CLI interface for Hook.app (macOS)
6
6
 
7
7
  This gem includes a `hook` binary that allows interaction with the features of Hook.app.
8
8
 
9
- *v2.0.9*
9
+ *v2.0.10*
10
10
 
11
11
  ## Installation
12
12
 
@@ -358,5 +358,5 @@ This software is licensed under the MIT License.
358
358
  THE SOFTWARE.
359
359
 
360
360
 
361
- Documentation generated 2022-05-26 08:29
361
+ Documentation generated 2022-05-28 08:26
362
362
 
data/hook.rdoc CHANGED
@@ -4,7 +4,7 @@ Hook.app is a productivity tool for macOS <https://hookproductivity.com/>.
4
4
 
5
5
  This gem includes a `hook` binary that allows interaction with the features of Hook.app.
6
6
 
7
- v2.0.9
7
+ v2.0.10
8
8
 
9
9
  === Global Options
10
10
  === --help
@@ -0,0 +1,100 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Hook::Prompt - hookapp</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+ <body id="top" role="document" class="module">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
34
+ <a href="../table_of_contents.html#classes">Classes</a>
35
+ <a href="../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+
62
+ <div id="includes-section" class="nav-section">
63
+ <h3>Included Modules</h3>
64
+
65
+ <ul class="link-list">
66
+ <li><a class="include" href="PromptSTD.html">Hook::PromptSTD</a>
67
+ <li><a class="include" href="PromptFZF.html">Hook::PromptFZF</a>
68
+ </ul>
69
+ </div>
70
+
71
+
72
+
73
+ </div>
74
+ </nav>
75
+
76
+ <main role="main" aria-labelledby="module-Hook::Prompt">
77
+ <h1 id="module-Hook::Prompt" class="module">
78
+ module Hook::Prompt
79
+ </h1>
80
+
81
+ <section class="description">
82
+
83
+ </section>
84
+
85
+ <section id="5Buntitled-5D" class="documentation-section">
86
+
87
+
88
+
89
+
90
+
91
+ </section>
92
+ </main>
93
+
94
+
95
+ <footer id="validator-badges" role="contentinfo">
96
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
97
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.3.
98
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
99
+ </footer>
100
+
@@ -0,0 +1,243 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Hook::PromptFZF - hookapp</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+ <body id="top" role="document" class="module">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
34
+ <a href="../table_of_contents.html#classes">Classes</a>
35
+ <a href="../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+
62
+
63
+
64
+ <!-- Method Quickref -->
65
+ <div id="method-list-section" class="nav-section">
66
+ <h3>Methods</h3>
67
+
68
+ <ul class="link-list" role="directory">
69
+ <li ><a href="#method-i-fzf">#fzf</a>
70
+ <li ><a href="#method-i-install_fzf">#install_fzf</a>
71
+ <li ><a href="#method-i-uninstall_fzf">#uninstall_fzf</a>
72
+ <li ><a href="#method-i-which_fzf">#which_fzf</a>
73
+ </ul>
74
+ </div>
75
+
76
+ </div>
77
+ </nav>
78
+
79
+ <main role="main" aria-labelledby="module-Hook::PromptFZF">
80
+ <h1 id="module-Hook::PromptFZF" class="module">
81
+ module Hook::PromptFZF
82
+ </h1>
83
+
84
+ <section class="description">
85
+
86
+ <p>Methods for working installing/using FuzzyFileFinder</p>
87
+
88
+ </section>
89
+
90
+ <section id="5Buntitled-5D" class="documentation-section">
91
+
92
+
93
+
94
+
95
+
96
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
97
+ <header>
98
+ <h3>Public Instance Methods</h3>
99
+ </header>
100
+
101
+ <div id="method-i-fzf" class="method-detail ">
102
+ <div class="method-heading">
103
+ <span class="method-name">fzf</span><span
104
+ class="method-args">()</span>
105
+ <span class="method-click-advice">click to toggle source</span>
106
+ </div>
107
+
108
+ <div class="method-description">
109
+ <p>Get path to fzf binary, installing if needed</p>
110
+
111
+ <p>@return [String] Path to fzf binary</p>
112
+
113
+ <div class="method-source-code" id="fzf-source">
114
+ <pre><span class="ruby-comment"># File lib/hook/prompt.rb, line 39</span>
115
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">fzf</span>
116
+ <span class="ruby-ivar">@fzf</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">install_fzf</span>
117
+ <span class="ruby-keyword">end</span></pre>
118
+ </div>
119
+ </div>
120
+
121
+
122
+ </div>
123
+
124
+ <div id="method-i-install_fzf" class="method-detail ">
125
+ <div class="method-heading">
126
+ <span class="method-name">install_fzf</span><span
127
+ class="method-args">(force: false)</span>
128
+ <span class="method-click-advice">click to toggle source</span>
129
+ </div>
130
+
131
+ <div class="method-description">
132
+ <p>Install fzf on the current system. Installs to a subdirectory of the gem</p>
133
+
134
+ <p>@param force [Boolean] If true, reinstall if</p>
135
+
136
+ <pre class="ruby"><span class="ruby-identifier">needed</span>
137
+ </pre>
138
+
139
+ <p>@return [String] Path to fzf binary</p>
140
+
141
+ <div class="method-source-code" id="install_fzf-source">
142
+ <pre><span class="ruby-comment"># File lib/hook/prompt.rb, line 74</span>
143
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">install_fzf</span>(<span class="ruby-value">force:</span> <span class="ruby-keyword">false</span>)
144
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">force</span>
145
+ <span class="ruby-identifier">uninstall_fzf</span>
146
+ <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">which_fzf</span>
147
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">which_fzf</span>
148
+ <span class="ruby-keyword">end</span>
149
+
150
+ <span class="ruby-identifier">fzf_dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword">__FILE__</span>), <span class="ruby-string">&#39;../helpers/fzf&#39;</span>)
151
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">fzf_dir</span>) <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">fzf_dir</span>)
152
+ <span class="ruby-identifier">fzf_bin</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">fzf_dir</span>, <span class="ruby-string">&#39;bin/fzf&#39;</span>)
153
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">fzf_bin</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">fzf_bin</span>)
154
+
155
+ <span class="ruby-identifier">warn</span> <span class="ruby-string">&#39;fzf: Compiling and installing fzf -- this will only happen once&#39;</span>
156
+ <span class="ruby-identifier">warn</span> <span class="ruby-string">&#39;fzf: fzf is copyright Junegunn Choi, MIT License &lt;https://github.com/junegunn/fzf/blob/master/LICENSE&gt;&#39;</span>
157
+
158
+ <span class="ruby-identifier">silence_std</span>
159
+ <span class="ruby-node">`&#39;#{fzf_dir}/install&#39; --bin --no-key-bindings --no-completion --no-update-rc --no-bash --no-zsh --no-fish &amp;&gt; /dev/null`</span>
160
+ <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">fzf_bin</span>)
161
+ <span class="ruby-identifier">restore_std</span>
162
+ <span class="ruby-identifier">warn</span> <span class="ruby-string">&#39;Error installing, trying again as root&#39;</span>
163
+ <span class="ruby-identifier">silence_std</span>
164
+ <span class="ruby-node">`sudo &#39;#{fzf_dir}/install&#39; --bin --no-key-bindings --no-completion --no-update-rc --no-bash --no-zsh --no-fish &amp;&gt; /dev/null`</span>
165
+ <span class="ruby-keyword">end</span>
166
+ <span class="ruby-identifier">restore_std</span>
167
+ <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">fzf_bin</span>)
168
+ <span class="ruby-identifier">puts</span> <span class="ruby-string">&#39;fzf: unable to install fzf. You can install manually and Hook CLI will use the system version.&#39;</span>
169
+ <span class="ruby-identifier">puts</span> <span class="ruby-string">&#39;fzf: see https://github.com/junegunn/fzf#installation&#39;</span>
170
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&#39;Error installing fzf, please report at https://github.com/ttscoff/hookapp/issues&#39;</span>)
171
+ <span class="ruby-keyword">end</span>
172
+
173
+ <span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;fzf: installed to #{fzf}&quot;</span>
174
+ <span class="ruby-identifier">fzf_bin</span>
175
+ <span class="ruby-keyword">end</span></pre>
176
+ </div>
177
+ </div>
178
+
179
+
180
+ </div>
181
+
182
+ <div id="method-i-uninstall_fzf" class="method-detail ">
183
+ <div class="method-heading">
184
+ <span class="method-name">uninstall_fzf</span><span
185
+ class="method-args">()</span>
186
+ <span class="method-click-advice">click to toggle source</span>
187
+ </div>
188
+
189
+ <div class="method-description">
190
+ <p>Remove fzf binary</p>
191
+
192
+ <div class="method-source-code" id="uninstall_fzf-source">
193
+ <pre><span class="ruby-comment"># File lib/hook/prompt.rb, line 46</span>
194
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">uninstall_fzf</span>
195
+ <span class="ruby-identifier">fzf_bin</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword">__FILE__</span>), <span class="ruby-string">&#39;../helpers/fzf/bin/fzf&#39;</span>)
196
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_f</span>(<span class="ruby-identifier">fzf_bin</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">fzf_bin</span>)
197
+ <span class="ruby-identifier">warn</span> <span class="ruby-string">&#39;fzf: removed #{fzf_bin}&#39;</span>
198
+ <span class="ruby-keyword">end</span></pre>
199
+ </div>
200
+ </div>
201
+
202
+
203
+ </div>
204
+
205
+ <div id="method-i-which_fzf" class="method-detail ">
206
+ <div class="method-heading">
207
+ <span class="method-name">which_fzf</span><span
208
+ class="method-args">()</span>
209
+ <span class="method-click-advice">click to toggle source</span>
210
+ </div>
211
+
212
+ <div class="method-description">
213
+ <p>Return the path to the fzf binary</p>
214
+
215
+ <p>@return [String] Path to fzf</p>
216
+
217
+ <div class="method-source-code" id="which_fzf-source">
218
+ <pre><span class="ruby-comment"># File lib/hook/prompt.rb, line 57</span>
219
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">which_fzf</span>
220
+ <span class="ruby-identifier">fzf_dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword">__FILE__</span>), <span class="ruby-string">&#39;../helpers/fzf&#39;</span>)
221
+ <span class="ruby-identifier">fzf_bin</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">fzf_dir</span>, <span class="ruby-string">&#39;bin/fzf&#39;</span>)
222
+ <span class="ruby-keyword">return</span> <span class="ruby-identifier">fzf_bin</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">fzf_bin</span>)
223
+
224
+ <span class="ruby-constant">TTY</span><span class="ruby-operator">::</span><span class="ruby-constant">Which</span>.<span class="ruby-identifier">which</span>(<span class="ruby-string">&#39;fzf&#39;</span>)
225
+ <span class="ruby-keyword">end</span></pre>
226
+ </div>
227
+ </div>
228
+
229
+
230
+ </div>
231
+
232
+ </section>
233
+
234
+ </section>
235
+ </main>
236
+
237
+
238
+ <footer id="validator-badges" role="contentinfo">
239
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
240
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.3.
241
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
242
+ </footer>
243
+
@@ -0,0 +1,177 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>module Hook::PromptSTD - hookapp</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+ <body id="top" role="document" class="module">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="../index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="../table_of_contents.html#pages">Pages</a>
34
+ <a href="../table_of_contents.html#classes">Classes</a>
35
+ <a href="../table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+
61
+
62
+
63
+
64
+ <!-- Method Quickref -->
65
+ <div id="method-list-section" class="nav-section">
66
+ <h3>Methods</h3>
67
+
68
+ <ul class="link-list" role="directory">
69
+ <li ><a href="#method-i-clear_screen">#clear_screen</a>
70
+ <li ><a href="#method-i-restore_std">#restore_std</a>
71
+ <li ><a href="#method-i-silence_std">#silence_std</a>
72
+ </ul>
73
+ </div>
74
+
75
+ </div>
76
+ </nav>
77
+
78
+ <main role="main" aria-labelledby="module-Hook::PromptSTD">
79
+ <h1 id="module-Hook::PromptSTD" class="module">
80
+ module Hook::PromptSTD
81
+ </h1>
82
+
83
+ <section class="description">
84
+
85
+ </section>
86
+
87
+ <section id="5Buntitled-5D" class="documentation-section">
88
+
89
+
90
+
91
+
92
+
93
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
94
+ <header>
95
+ <h3>Public Instance Methods</h3>
96
+ </header>
97
+
98
+ <div id="method-i-clear_screen" class="method-detail ">
99
+ <div class="method-heading">
100
+ <span class="method-name">clear_screen</span><span
101
+ class="method-args">(msg = nil)</span>
102
+ <span class="method-click-advice">click to toggle source</span>
103
+ </div>
104
+
105
+ <div class="method-description">
106
+ <p>Clear the terminal screen</p>
107
+
108
+ <div class="method-source-code" id="clear_screen-source">
109
+ <pre><span class="ruby-comment"># File lib/hook/prompt.rb, line 8</span>
110
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">clear_screen</span>(<span class="ruby-identifier">msg</span> = <span class="ruby-keyword">nil</span>)
111
+ <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;\e[H\e[2J&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">tty?</span>
112
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">msg</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">good?</span>
113
+ <span class="ruby-keyword">end</span></pre>
114
+ </div>
115
+ </div>
116
+
117
+
118
+ </div>
119
+
120
+ <div id="method-i-restore_std" class="method-detail ">
121
+ <div class="method-heading">
122
+ <span class="method-name">restore_std</span><span
123
+ class="method-args">()</span>
124
+ <span class="method-click-advice">click to toggle source</span>
125
+ </div>
126
+
127
+ <div class="method-description">
128
+ <p>Restore silenced STDOUT and STDERR</p>
129
+
130
+ <div class="method-source-code" id="restore_std-source">
131
+ <pre><span class="ruby-comment"># File lib/hook/prompt.rb, line 26</span>
132
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">restore_std</span>
133
+ <span class="ruby-identifier">$stdout</span> = <span class="ruby-constant">STDOUT</span>
134
+ <span class="ruby-identifier">$stderr</span> = <span class="ruby-constant">STDERR</span>
135
+ <span class="ruby-keyword">end</span></pre>
136
+ </div>
137
+ </div>
138
+
139
+
140
+ </div>
141
+
142
+ <div id="method-i-silence_std" class="method-detail ">
143
+ <div class="method-heading">
144
+ <span class="method-name">silence_std</span><span
145
+ class="method-args">(file = &#39;/dev/null&#39;)</span>
146
+ <span class="method-click-advice">click to toggle source</span>
147
+ </div>
148
+
149
+ <div class="method-description">
150
+ <p>Redirect STDOUT and STDERR to /dev/null or file</p>
151
+
152
+ <p>@param file [String] a file path to redirect to</p>
153
+
154
+ <div class="method-source-code" id="silence_std-source">
155
+ <pre><span class="ruby-comment"># File lib/hook/prompt.rb, line 18</span>
156
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">silence_std</span>(<span class="ruby-identifier">file</span> = <span class="ruby-string">&#39;/dev/null&#39;</span>)
157
+ <span class="ruby-identifier">$stdout</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file</span>, <span class="ruby-string">&#39;w&#39;</span>)
158
+ <span class="ruby-identifier">$stderr</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">file</span>, <span class="ruby-string">&#39;w&#39;</span>)
159
+ <span class="ruby-keyword">end</span></pre>
160
+ </div>
161
+ </div>
162
+
163
+
164
+ </div>
165
+
166
+ </section>
167
+
168
+ </section>
169
+ </main>
170
+
171
+
172
+ <footer id="validator-badges" role="contentinfo">
173
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
174
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.3.
175
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
176
+ </footer>
177
+
@@ -132,7 +132,7 @@
132
132
 
133
133
  <p>This gem includes a `hook` binary that allows interaction with the features of Hook.app.</p>
134
134
 
135
- <p>v2.0.9</p>
135
+ <p>v2.0.10</p>
136
136
 
137
137
  <h3 id="label-Global+Options">Global Options<span><a href="#label-Global+Options">&para;</a> <a href="#top">&uarr;</a></span></h3>
138
138
 
data/html/created.rid CHANGED
@@ -1,4 +1,4 @@
1
- Thu, 26 May 2022 08:30:27 -0500
1
+ Sat, 28 May 2022 08:27:12 -0500
2
2
  README.rdoc Tue, 07 Jul 2020 16:57:07 -0500
3
3
  lib/hook.rb Thu, 26 May 2022 08:20:27 -0500
4
4
  lib/hook/hookapp.rb Thu, 26 May 2022 08:19:39 -0500
@@ -6,5 +6,5 @@ lib/hook/hooker.rb Sun, 31 Oct 2021 07:54:46 -0500
6
6
  lib/hook/markdown_document_listener.rb Sun, 26 Sep 2021 07:45:59 -0500
7
7
  lib/hook/prompt.rb Thu, 26 May 2022 08:20:13 -0500
8
8
  lib/hook/string.rb Sun, 31 Oct 2021 07:03:15 -0500
9
- lib/hook/version.rb Thu, 26 May 2022 08:29:18 -0500
9
+ lib/hook/version.rb Sat, 28 May 2022 08:21:49 -0500
10
10
  bin/hook Sun, 31 Oct 2021 07:54:10 -0500
data/html/index.html CHANGED
@@ -99,7 +99,7 @@
99
99
 
100
100
  <p>This gem includes a `hook` binary that allows interaction with the features of Hook.app.</p>
101
101
 
102
- <p>v2.0.9</p>
102
+ <p>v2.0.10</p>
103
103
 
104
104
  <h3 id="label-Global+Options">Global Options<span><a href="#label-Global+Options">&para;</a> <a href="#top">&uarr;</a></span></h3>
105
105
 
Binary file
data/lib/hook/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hook
4
- VERSION = '2.0.9'
4
+ VERSION = '2.0.10'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hookapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.9
4
+ version: 2.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-26 00:00:00.000000000 Z
11
+ date: 2022-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba
@@ -119,6 +119,9 @@ files:
119
119
  - html/GLI/Commands/Doc.html
120
120
  - html/GLI/Commands/MarkdownDocumentListener.html
121
121
  - html/Hook.html
122
+ - html/Hook/Prompt.html
123
+ - html/Hook/PromptFZF.html
124
+ - html/Hook/PromptSTD.html
122
125
  - html/HookApp.html
123
126
  - html/Hooker.html
124
127
  - html/README_rdoc.html