standup_md 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57e3f70a3f6a38b1c9d6efa8b1f72dffc678771bd1404c4ff218840efcd24be5
4
- data.tar.gz: 8f68954fa77c186804ce05f14f2903d8e7e36d978c8ec75453153f18e48490e7
3
+ metadata.gz: a87d888af43be793a8c4d542a57d6260de252df5abf6d4e5025b04b389c1569c
4
+ data.tar.gz: 336d2d4c04678ab01262eebf2323f69d48347f873d9236dfdb8c781a6e20caa7
5
5
  SHA512:
6
- metadata.gz: af2637941f87f5a3aab89ae2cd5a44d750e58d289ce0a5c9f21aeba6708c4e847794065a5c86520ece53f1a1475e15079f3a924b70724e4b6258ee14cdcf9a6d
7
- data.tar.gz: cf88b88ad98241a3caded35085a5031fa8ebb3b0c64124d2d32dd3f7ad1ec1ff2ff52b566c7316738e43b56e642522b5f6e6e107cd55ccaea1732eb233683c26
6
+ metadata.gz: f965f80af7cdb9023487f2ed458b9da2e6e94d6474f777c6ff11266e309a6025f4d6051e639d8bf3e31d8f8a4b23419c6a6be602ee32954974162eb1b41c0659
7
+ data.tar.gz: 1f3fcf18356183cea6fdf77a2cb1298b082e915d056f6b649ac41440c40aa76f88db6da365296fedea5b3723efe258a5cbe5be23d10e10a3810bdf941e920a24
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standup_md (0.3.7)
4
+ standup_md (0.3.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -113,20 +113,12 @@ your clipboard without even opening your editor.
113
113
  standup -p | pbcopy
114
114
  ```
115
115
 
116
- If you wanted to add today's entry without opening your editor, and print the
117
- result to the command line, you could use the following.
118
-
119
116
  #### Add entry to file without opening it
120
- ```sh
121
- standup --no-edit --current "Work on this thing","And another thing"
122
- ```
123
-
124
- #### Find an entry by date and print it.
125
- If you wanted to find and print the entry for March 2nd, 2020, you could use the
126
- following.
117
+ You can add an entry for today without even opening your editor. Note that, if
118
+ you have multiple entries, you must separate them with a comma and *no spaces*.
127
119
 
128
120
  ```sh
129
- standup -p 2020-03-02
121
+ standup --no-edit --current "Work on this thing","And another thing"
130
122
  ```
131
123
 
132
124
  ### Customization and Runtime Options
@@ -321,7 +313,7 @@ file, or something like `~/.vim/plugin/standup.vim`.
321
313
 
322
314
  ```vim
323
315
  command! -complete=custom,<SID>StandupCompletion -nargs=? -bang Standup
324
- \ call s:OpenStandupFile(<bang>0, <f-args>)
316
+ \ call <SID>OpenStandupFile(<bang>0, <f-args>)
325
317
 
326
318
  function! s:StandupCompletion(...) abort
327
319
  let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
data/doc/README_md.html CHANGED
@@ -69,7 +69,6 @@
69
69
  <li><a href="#label-Adding+an+entry+for+today+via+editor">Adding an entry for today via editor</a>
70
70
  <li><a href="#label-Copy+the+entry+for+today+to+clipboard">Copy the entry for today to clipboard</a>
71
71
  <li><a href="#label-Add+entry+to+file+without+opening+it">Add entry to file without opening it</a>
72
- <li><a href="#label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.</a>
73
72
  <li><a href="#label-Customization+and+Runtime+Options">Customization and Runtime Options</a>
74
73
  <li><a href="#label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults</a>
75
74
  <li><a href="#label-Executable+Flags">Executable Flags</a>
@@ -188,17 +187,11 @@ rake install</pre>
188
187
  <pre class="ruby"><span class="ruby-identifier">standup</span> <span class="ruby-operator">-</span><span class="ruby-identifier">p</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">pbcopy</span>
189
188
  </pre>
190
189
 
191
- <p>If you wanted to add today&#39;s entry without opening your editor, and print the result to the command line, you could use the following.</p>
192
-
193
190
  <h4 id="label-Add+entry+to+file+without+opening+it">Add entry to file without opening it<span><a href="#label-Add+entry+to+file+without+opening+it">&para;</a> <a href="#top">&uarr;</a></span></h4>
194
191
 
195
- <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
196
-
197
- <h4 id="label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.<span><a href="#label-Find+an+entry+by+date+and+print+it.">&para;</a> <a href="#top">&uarr;</a></span></h4>
192
+ <p>You can add an entry for today without even opening your editor. Note that, if you have multiple entries, you must separate them with a comma and <em>no spaces</em>.</p>
198
193
 
199
- <p>If you wanted to find and print the entry for March 2nd, 2020, you could use the following.</p>
200
-
201
- <pre>standup -p 2020-03-02</pre>
194
+ <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
202
195
 
203
196
  <h3 id="label-Customization+and+Runtime+Options">Customization and Runtime Options<span><a href="#label-Customization+and+Runtime+Options">&para;</a> <a href="#top">&uarr;</a></span></h3>
204
197
 
@@ -360,7 +353,7 @@ rake install</pre>
360
353
  <p>While there&#39;s no official support for vim, you can add this to your <code>vimrc</code> file, or something like <code>~/.vim/plugin/standup.vim</code>.</p>
361
354
 
362
355
  <pre>command! -complete=custom,&lt;SID&gt;StandupCompletion -nargs=? -bang Standup
363
- \ call s:OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
356
+ \ call &lt;SID&gt;OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
364
357
 
365
358
  function! s:StandupCompletion(...) abort
366
359
  let l:dir = get(g:, &#39;standup_dir&#39;, $HOME . &#39;/.cache/standup_md&#39;) . &#39;/&#39;
data/doc/StandupMD.html CHANGED
@@ -114,7 +114,7 @@
114
114
  <div class="method-source-code" id="config-source">
115
115
  <pre><span class="ruby-comment"># File lib/standup_md.rb, line 19</span>
116
116
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
117
- <span class="ruby-ivar">@config</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
117
+ <span class="ruby-ivar">@config</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">reset_config</span>
118
118
  <span class="ruby-keyword">end</span></pre>
119
119
  </div>
120
120
  </div>
@@ -183,14 +183,17 @@
183
183
 
184
184
  <p>@param [String] file</p>
185
185
 
186
+ <p>@return [String] file</p>
187
+
186
188
  <div class="method-source-code" id="load_config_file-source">
187
- <pre><span class="ruby-comment"># File lib/standup_md.rb, line 52</span>
189
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 54</span>
188
190
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">load_config_file</span>(<span class="ruby-identifier">file</span>)
189
- <span class="ruby-identifier">file</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">file</span>)
190
- <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File #{file} does not exist.&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)
191
+ <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
192
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File #{file} does not exist.&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)
191
193
 
192
- <span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
193
- <span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
194
+ <span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
195
+ <span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
196
+ <span class="ruby-keyword">end</span>
194
197
  <span class="ruby-keyword">end</span></pre>
195
198
  </div>
196
199
  </div>
@@ -218,13 +218,13 @@
218
218
  <div class="method-source-code" id="execute-source">
219
219
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 30</span>
220
220
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">execute</span>(<span class="ruby-identifier">options</span> = [])
221
- <span class="ruby-identifier">exe</span> = <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)
222
-
223
- <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">write_file</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">write</span>
224
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">print</span>
225
- <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">entry</span>)
226
- <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">edit</span>
227
- <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">edit</span>
221
+ <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">exe</span><span class="ruby-operator">|</span>
222
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">write_file</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">write</span>
223
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">print</span>
224
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">entry</span>)
225
+ <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">edit</span>
226
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">edit</span>
227
+ <span class="ruby-keyword">end</span>
228
228
  <span class="ruby-keyword">end</span>
229
229
  <span class="ruby-keyword">end</span></pre>
230
230
  </div>
@@ -374,9 +374,9 @@
374
374
  <div class="method-source-code" id="directory-3D-source">
375
375
  <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 202</span>
376
376
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">directory=</span>(<span class="ruby-identifier">directory</span>)
377
- <span class="ruby-identifier">directory</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">directory</span>)
378
- <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">directory</span>) <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">directory</span>)
379
- <span class="ruby-ivar">@directory</span> = <span class="ruby-identifier">directory</span>
377
+ <span class="ruby-ivar">@directory</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">directory</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">directory</span><span class="ruby-operator">|</span>
378
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">directory</span>) <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">directory</span>)
379
+ <span class="ruby-keyword">end</span>
380
380
  <span class="ruby-keyword">end</span></pre>
381
381
  </div>
382
382
  </div>
@@ -208,7 +208,7 @@
208
208
  <div id="method-c-create" class="method-detail ">
209
209
  <div class="method-heading">
210
210
  <span class="method-name">create</span><span
211
- class="method-args">() { |config| ... }</span>
211
+ class="method-args">() { |entry| ... }</span>
212
212
  <span class="method-click-advice">click to toggle source</span>
213
213
  </div>
214
214
 
@@ -220,15 +220,13 @@
220
220
  <div class="method-source-code" id="create-source">
221
221
  <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 57</span>
222
222
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">create</span>
223
- <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">new</span>(
223
+ <span class="ruby-identifier">new</span>(
224
224
  <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>,
225
225
  <span class="ruby-identifier">config</span>.<span class="ruby-identifier">current</span>,
226
226
  <span class="ruby-identifier">config</span>.<span class="ruby-identifier">previous</span>,
227
227
  <span class="ruby-identifier">config</span>.<span class="ruby-identifier">impediments</span>,
228
228
  <span class="ruby-identifier">config</span>.<span class="ruby-identifier">notes</span>
229
- )
230
- <span class="ruby-keyword">yield</span> <span class="ruby-identifier">config</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
231
- <span class="ruby-identifier">entry</span>
229
+ ).<span class="ruby-identifier">tap</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">entry</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span> }
232
230
  <span class="ruby-keyword">end</span></pre>
233
231
  </div>
234
232
  </div>
@@ -257,16 +255,16 @@
257
255
  <p>@param [Array] notes</p>
258
256
 
259
257
  <div class="method-source-code" id="new-source">
260
- <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 81</span>
258
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 79</span>
261
259
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">current</span>, <span class="ruby-identifier">previous</span>, <span class="ruby-identifier">impediments</span>, <span class="ruby-identifier">notes</span> = [])
262
260
  <span class="ruby-identifier">raise</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Date</span>)
263
261
  <span class="ruby-ivar">@config</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">config</span>
264
262
 
265
- <span class="ruby-ivar">@date</span> = <span class="ruby-identifier">date</span>
266
- <span class="ruby-ivar">@current</span> = <span class="ruby-identifier">current</span>
267
- <span class="ruby-ivar">@previous</span> = <span class="ruby-identifier">previous</span>
268
- <span class="ruby-ivar">@impediments</span> = <span class="ruby-identifier">impediments</span>
269
- <span class="ruby-ivar">@notes</span> = <span class="ruby-identifier">notes</span>
263
+ <span class="ruby-ivar">@date</span> = <span class="ruby-identifier">date</span>
264
+ <span class="ruby-ivar">@current</span> = <span class="ruby-identifier">current</span>
265
+ <span class="ruby-ivar">@previous</span> = <span class="ruby-identifier">previous</span>
266
+ <span class="ruby-ivar">@impediments</span> = <span class="ruby-identifier">impediments</span>
267
+ <span class="ruby-ivar">@notes</span> = <span class="ruby-identifier">notes</span>
270
268
  <span class="ruby-keyword">end</span></pre>
271
269
  </div>
272
270
  </div>
@@ -292,7 +290,7 @@
292
290
  <p>Sorting method for Comparable. Entries are compared by date.</p>
293
291
 
294
292
  <div class="method-source-code" id="3C-3D-3E-source">
295
- <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 94</span>
293
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 92</span>
296
294
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">&lt;=&gt;</span>(<span class="ruby-identifier">other</span>)
297
295
  <span class="ruby-identifier">date</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">date</span>
298
296
  <span class="ruby-keyword">end</span></pre>
@@ -315,7 +313,7 @@
315
313
  <p>@return [Hash]</p>
316
314
 
317
315
  <div class="method-source-code" id="to_h-source">
318
- <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 102</span>
316
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 100</span>
319
317
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_h</span>
320
318
  {
321
319
  <span class="ruby-identifier">date</span> <span class="ruby-operator">=&gt;</span> {
@@ -345,7 +343,7 @@
345
343
  <p>@return [String]</p>
346
344
 
347
345
  <div class="method-source-code" id="to_json-source">
348
- <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 117</span>
346
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 115</span>
349
347
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_json</span>
350
348
  <span class="ruby-identifier">to_h</span>.<span class="ruby-identifier">to_json</span>
351
349
  <span class="ruby-keyword">end</span></pre>
@@ -119,7 +119,7 @@
119
119
  <p><a href="Version.html"><code>Version</code></a> as <code>MAJOR.MINOR.PATCH</code></p>
120
120
 
121
121
  <div class="method-source-code" id="to_s-source">
122
- <pre><span class="ruby-comment"># File lib/standup_md/version.rb, line 24</span>
122
+ <pre><span class="ruby-comment"># File lib/standup_md/version.rb, line 23</span>
123
123
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">to_s</span>
124
124
  <span class="ruby-node">&quot;#{MAJOR}.#{MINOR}.#{PATCH}&quot;</span>
125
125
  <span class="ruby-keyword">end</span></pre>
data/doc/created.rid CHANGED
@@ -1,15 +1,15 @@
1
- Fri, 30 Apr 2021 10:18:47 -0500
2
- README.md Fri, 30 Apr 2021 10:15:18 -0500
3
- lib/standup_md.rb Tue, 13 Oct 2020 21:04:02 -0500
4
- lib/standup_md/cli.rb Tue, 13 Oct 2020 21:04:02 -0500
5
- lib/standup_md/cli/helpers.rb Tue, 13 Oct 2020 21:49:05 -0500
1
+ Sat, 08 May 2021 00:03:30 -0500
2
+ README.md Fri, 07 May 2021 17:33:37 -0500
3
+ lib/standup_md.rb Fri, 07 May 2021 23:55:13 -0500
4
+ lib/standup_md/cli.rb Sat, 08 May 2021 00:01:31 -0500
5
+ lib/standup_md/cli/helpers.rb Fri, 07 May 2021 23:53:07 -0500
6
6
  lib/standup_md/config.rb Tue, 13 Oct 2020 21:04:02 -0500
7
7
  lib/standup_md/config/cli.rb Tue, 13 Oct 2020 21:04:02 -0500
8
8
  lib/standup_md/config/entry.rb Tue, 13 Oct 2020 21:04:02 -0500
9
9
  lib/standup_md/config/entry_list.rb Wed, 17 Jun 2020 08:47:50 -0500
10
- lib/standup_md/config/file.rb Wed, 17 Jun 2020 08:47:50 -0500
11
- lib/standup_md/entry.rb Tue, 17 Nov 2020 11:34:44 -0600
10
+ lib/standup_md/config/file.rb Fri, 07 May 2021 23:57:01 -0500
11
+ lib/standup_md/entry.rb Fri, 07 May 2021 23:57:15 -0500
12
12
  lib/standup_md/entry_list.rb Mon, 12 Apr 2021 21:51:46 -0500
13
13
  lib/standup_md/file.rb Mon, 26 Apr 2021 09:04:06 -0500
14
14
  lib/standup_md/file/helpers.rb Tue, 13 Oct 2020 21:04:02 -0500
15
- lib/standup_md/version.rb Fri, 30 Apr 2021 10:18:44 -0500
15
+ lib/standup_md/version.rb Sat, 08 May 2021 00:03:13 -0500
data/doc/index.html CHANGED
@@ -177,17 +177,11 @@ rake install</pre>
177
177
  <pre class="ruby"><span class="ruby-identifier">standup</span> <span class="ruby-operator">-</span><span class="ruby-identifier">p</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">pbcopy</span>
178
178
  </pre>
179
179
 
180
- <p>If you wanted to add today&#39;s entry without opening your editor, and print the result to the command line, you could use the following.</p>
181
-
182
180
  <h4 id="label-Add+entry+to+file+without+opening+it">Add entry to file without opening it<span><a href="#label-Add+entry+to+file+without+opening+it">&para;</a> <a href="#top">&uarr;</a></span></h4>
183
181
 
184
- <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
185
-
186
- <h4 id="label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.<span><a href="#label-Find+an+entry+by+date+and+print+it.">&para;</a> <a href="#top">&uarr;</a></span></h4>
182
+ <p>You can add an entry for today without even opening your editor. Note that, if you have multiple entries, you must separate them with a comma and <em>no spaces</em>.</p>
187
183
 
188
- <p>If you wanted to find and print the entry for March 2nd, 2020, you could use the following.</p>
189
-
190
- <pre>standup -p 2020-03-02</pre>
184
+ <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
191
185
 
192
186
  <h3 id="label-Customization+and+Runtime+Options">Customization and Runtime Options<span><a href="#label-Customization+and+Runtime+Options">&para;</a> <a href="#top">&uarr;</a></span></h3>
193
187
 
@@ -349,7 +343,7 @@ rake install</pre>
349
343
  <p>While there&#39;s no official support for vim, you can add this to your <code>vimrc</code> file, or something like <code>~/.vim/plugin/standup.vim</code>.</p>
350
344
 
351
345
  <pre>command! -complete=custom,&lt;SID&gt;StandupCompletion -nargs=? -bang Standup
352
- \ call s:OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
346
+ \ call &lt;SID&gt;OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
353
347
 
354
348
  function! s:StandupCompletion(...) abort
355
349
  let l:dir = get(g:, &#39;standup_dir&#39;, $HOME . &#39;/.cache/standup_md&#39;) . &#39;/&#39;
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["standupmd","cli","helpers","config","cli","entry","entrylist","file","entry","entrylist","file","version","<<()","<=>()","@entries()","bullet_character=()","config()","config()","config()","config()","config()","config_file_loaded?()","configure()","create()","directory=()","echo()","echo()","edit()","execute()","exist?()","filter()","filter!()","find()","find()","find_by_date()","header_depth=()","initalize()","load()","load()","load_config_file()","load_preferences()","loaded?()","new()","new()","new()","new()","new()","new()","new()","new()","new?()","preference_file_loaded?()","print()","reset()","reset()","reset()","reset()","reset_config()","sort()","sort!()","sort_reverse()","sub_header_depth=()","to_h()","to_h()","to_json()","to_json()","to_s()","write()","write_file()","readme"],"longSearchIndex":["standupmd","standupmd::cli","standupmd::cli::helpers","standupmd::config","standupmd::config::cli","standupmd::config::entry","standupmd::config::entrylist","standupmd::config::file","standupmd::entry","standupmd::entrylist","standupmd::file","standupmd::version","standupmd::entrylist#<<()","standupmd::entry#<=>()","standupmd::entrylist#@entries()","standupmd::config::file#bullet_character=()","standupmd::config()","standupmd::cli::config()","standupmd::entry::config()","standupmd::entrylist::config()","standupmd::file::config()","standupmd::config_file_loaded?()","standupmd::configure()","standupmd::entry::create()","standupmd::config::file#directory=()","standupmd::cli#echo()","standupmd::cli::echo()","standupmd::cli#edit()","standupmd::cli::execute()","standupmd::file#exist?()","standupmd::entrylist#filter()","standupmd::entrylist#filter!()","standupmd::entrylist#find()","standupmd::file::find()","standupmd::file::find_by_date()","standupmd::config::file#header_depth=()","standupmd::config::entrylist#initalize()","standupmd::file#load()","standupmd::file::load()","standupmd::load_config_file()","standupmd::cli#load_preferences()","standupmd::file#loaded?()","standupmd::cli::new()","standupmd::config::new()","standupmd::config::cli::new()","standupmd::config::entry::new()","standupmd::config::file::new()","standupmd::entry::new()","standupmd::entrylist::new()","standupmd::file::new()","standupmd::file#new?()","standupmd::cli#preference_file_loaded?()","standupmd::cli::helpers#print()","standupmd::config::cli#reset()","standupmd::config::entry#reset()","standupmd::config::entrylist#reset()","standupmd::config::file#reset()","standupmd::reset_config()","standupmd::entrylist#sort()","standupmd::entrylist#sort!()","standupmd::entrylist#sort_reverse()","standupmd::config::file#sub_header_depth=()","standupmd::entry#to_h()","standupmd::entrylist#to_h()","standupmd::entry#to_json()","standupmd::entrylist#to_json()","standupmd::version::to_s()","standupmd::file#write()","standupmd::cli#write_file()",""],"info":[["StandupMD","","StandupMD.html","","<p>The main module for the gem. Provides access to configuration classes.\n"],["StandupMD::Cli","","StandupMD/Cli.html","","<p>Class for handing the command-line interface.\n"],["StandupMD::Cli::Helpers","","StandupMD/Cli/Helpers.html","","<p>Module responsible for reading and writing standup files.\n"],["StandupMD::Config","","StandupMD/Config.html","","<p>This class provides a connector from StandupMD to the configuration classes.\n"],["StandupMD::Config::Cli","","StandupMD/Config/Cli.html","","<p>The configuration class for StandupMD::Cli\n"],["StandupMD::Config::Entry","","StandupMD/Config/Entry.html","","<p>The configuration class for StandupMD::Entry\n"],["StandupMD::Config::EntryList","","StandupMD/Config/EntryList.html","","<p>The configuration class for StandupMD::EntryList\n"],["StandupMD::Config::File","","StandupMD/Config/File.html","","<p>The configuration class for StandupMD::File\n"],["StandupMD::Entry","","StandupMD/Entry.html","","<p>Class for handling single entries. Includes the comparable module, and compares by date.\n"],["StandupMD::EntryList","","StandupMD/EntryList.html","","<p>Enumerable list of entries.\n"],["StandupMD::File","","StandupMD/File.html","","<p>Class for handling reading and writing standup files.\n"],["StandupMD::Version","","StandupMD/Version.html","","<p>Module that contains all gem version information. Follows semantic versioning. Read: semver.org/\n"],["<<","StandupMD::EntryList","StandupMD/EntryList.html#method-i-3C-3C","(entry)","<p>Appends entries to list.\n<p>@param [StandupMD::Entry] entry\n<p>@return [Array]\n"],["<=>","StandupMD::Entry","StandupMD/Entry.html#method-i-3C-3D-3E","(other)","<p>Sorting method for Comparable. Entries are compared by date.\n"],["@entries","StandupMD::EntryList","StandupMD/EntryList.html#method-i-40entries","","<p>The following are forwarded to @entries, which is the underly array of entries.\n<p><code>each</code> &mdash; Iterate over each …\n"],["bullet_character=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-bullet_character-3D","(char)","<p>Setter for bullet_character. Must be * (asterisk) or - (dash).\n<p>@param [String] character\n<p>@return [String] …\n"],["config","StandupMD","StandupMD.html#method-c-config","()","<p>Method for accessing the configuration.\n<p>@return [StanupMD::Cli]\n"],["config","StandupMD::Cli","StandupMD/Cli.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::Cli]\n"],["config","StandupMD::Entry","StandupMD/Entry.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::Entry]\n"],["config","StandupMD::EntryList","StandupMD/EntryList.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::EntryList]\n"],["config","StandupMD::File","StandupMD/File.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::EntryList]\n"],["config_file_loaded?","StandupMD","StandupMD.html#method-c-config_file_loaded-3F","()","<p>Has a config file been loaded?\n<p>@return [Boolean]\n"],["configure","StandupMD","StandupMD.html#method-c-configure","()","<p>Allows for configuration via a block. Useful when making config files.\n<p>@example\n\n<pre>StandupMD.configure { |s| ...</pre>\n"],["create","StandupMD::Entry","StandupMD/Entry.html#method-c-create","()","<p>Creates a generic entry. Default values can be set via configuration. Yields the entry if a block is …\n"],["directory=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-directory-3D","(directory)","<p>Setter for directory. Must be expanded in case the user uses `~` for home. If the directory doesn&#39;t …\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-i-echo","(msg)","<p>Quick access to Cli.echo.\n<p>@return [nil]\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-c-echo","(msg)","<p>Prints output if <code>verbose</code> is true.\n<p>@return [nil]\n"],["edit","StandupMD::Cli","StandupMD/Cli.html#method-i-edit","()","<p>Opens the file in an editor. Abandons the script.\n<p>@return [nil]\n"],["execute","StandupMD::Cli","StandupMD/Cli.html#method-c-execute","(options = [])","<p>Creates an instance of <code>StandupMD</code> and runs what the user requested.\n"],["exist?","StandupMD::File","StandupMD/File.html#method-i-exist-3F","()","<p>Does the file exist?\n<p>@return [Boolean] true if exists\n"],["filter","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter","(start_date, end_date)","<p>Returns entries that are between the start and end date. This method assumes the list has already been …\n"],["filter!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter-21","(start_date, end_date)","<p>Replaces entries with results of filter.\n<p>@param [Date] start_date\n<p>@param [Date] end_date\n"],["find","StandupMD::EntryList","StandupMD/EntryList.html#method-i-find","(date)","<p>Finds an entry based on date. This method assumes the list has already been sorted.\n<p>@param [Date] date …\n"],["find","StandupMD::File","StandupMD/File.html#method-c-find","(file_name)","<p>Find standup file in directory by file name.\n<p>@param [String] File_naem\n"],["find_by_date","StandupMD::File","StandupMD/File.html#method-c-find_by_date","(date)","<p>Find standup file in directory by Date object.\n<p>@param [Date] date\n"],["header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-header_depth-3D","(depth)","<p>Number of octothorps (#) to use before the main header.\n<p>@param [Integer] depth\n<p>@return [Integer]\n"],["initalize","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-initalize","()","<p>Initializes the config with default values.\n"],["load","StandupMD::File","StandupMD/File.html#method-i-load","()","<p>Loads the file&#39;s contents. TODO clean up this method.\n<p>@return [StandupMD::FileList]\n"],["load","StandupMD::File","StandupMD/File.html#method-c-load","(file_name)","<p>Convenience method for calling File.find(file_name).load\n<p>@param [String] file_name\n<p>@return [StandupMD::File] …\n"],["load_config_file","StandupMD","StandupMD.html#method-c-load_config_file","(file)","<p>Loads a config file.\n<p>@param [String] file\n"],["load_preferences","StandupMD::Cli","StandupMD/Cli.html#method-i-load_preferences","()","<p>Load the preference file.\n<p>@return [nil]\n"],["loaded?","StandupMD::File","StandupMD/File.html#method-i-loaded-3F","()","<p>Has the file been loaded?\n<p>@return [Boolean] true if loaded\n"],["new","StandupMD::Cli","StandupMD/Cli.html#method-c-new","(options = [], load_config = true)","<p>Constructor. Sets defaults.\n<p>@param [Array] options\n"],["new","StandupMD::Config","StandupMD/Config.html#method-c-new","()","<p>Builds the links to the configuration classes.\n"],["new","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Config::File","StandupMD/Config/File.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Entry","StandupMD/Entry.html#method-c-new","(date, current, previous, impediments, notes = [])","<p>Constructs instance of <code>StandupMD::Entry</code>.\n<p>@param [Date] date\n<p>@param [Array] current\n"],["new","StandupMD::EntryList","StandupMD/EntryList.html#method-c-new","(*entries)","<p>Contruct a list. Can pass any amount of <code>StandupMD::Entry</code> instances.\n<p>@param [Entry] entries\n<p>@return [StandupMD::EntryList] …\n"],["new","StandupMD::File","StandupMD/File.html#method-c-new","(file_name)","<p>Constructs the instance.\n<p>@param [String] file_name\n<p>@return [StandupMP::File]\n"],["new?","StandupMD::File","StandupMD/File.html#method-i-new-3F","()","<p>Was the file just now created?\n<p>@return [Boolean] true if new\n"],["preference_file_loaded?","StandupMD::Cli","StandupMD/Cli.html#method-i-preference_file_loaded-3F","()","<p>Has the preference file been loaded?\n<p>@return boolean\n"],["print","StandupMD::Cli::Helpers","StandupMD/Cli/Helpers.html#method-i-print","(entry)","<p>Print an entry to the command line.\n<p>@param [StandupMD::Entry] entry\n<p>@return [nil]\n"],["reset","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::File","StandupMD/Config/File.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset_config","StandupMD","StandupMD.html#method-c-reset_config","()","<p>Reset all configuration values to their defaults.\n<p>@return [StandupMD::Config]\n"],["sort","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort","()","<p>Returns a copy of self sorted by date.\n<p>@return [StandupMD::EntryList]\n"],["sort!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort-21","()","<p>Replace entries with sorted entries by date.\n<p>@return [StandupMD::EntryList]\n"],["sort_reverse","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort_reverse","()","<p>Returns a copy of self sorted by date.\n<p>@return [StandupMD::EntryList]\n"],["sub_header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-sub_header_depth-3D","(depth)","<p>Number of octothorps (#) to use before sub headers (Current, Previous, etc).\n<p>@param [Integer] depth\n<p>@return …\n"],["to_h","StandupMD::Entry","StandupMD/Entry.html#method-i-to_h","()","<p>Entry as a hash .\n<p>@return [Hash]\n"],["to_h","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_h","()","<p>The list as a hash, with the dates as keys.\n<p>@return [Hash]\n"],["to_json","StandupMD::Entry","StandupMD/Entry.html#method-i-to_json","()","<p>Entry as a json object.\n<p>@return [String]\n"],["to_json","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_json","()","<p>The entry list as a json object.\n<p>@return [String]\n"],["to_s","StandupMD::Version","StandupMD/Version.html#method-c-to_s","()","<p>Version as <code>MAJOR.MINOR.PATCH</code>\n"],["write","StandupMD::File","StandupMD/File.html#method-i-write","(**dates)","<p>Writes a new entry to the file if the first entry in the file isn&#39;t today. This method is destructive; …\n"],["write_file","StandupMD::Cli","StandupMD/Cli.html#method-i-write_file","()","<p>Writes entries to the file.\n<p>@return [Boolean] true if file was written\n"],["README","","README_md.html","","<p>The Standup Doctor\n<p><img src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fevanthegrayt%2Fstandup_md%2Fbadge%3Fref%3Dmaster&style=flat\"> …\n\n<blockquote>"]]}}
1
+ var search_data = {"index":{"searchIndex":["standupmd","cli","helpers","config","cli","entry","entrylist","file","entry","entrylist","file","version","<<()","<=>()","@entries()","bullet_character=()","config()","config()","config()","config()","config()","config_file_loaded?()","configure()","create()","directory=()","echo()","echo()","edit()","execute()","exist?()","filter()","filter!()","find()","find()","find_by_date()","header_depth=()","initalize()","load()","load()","load_config_file()","load_preferences()","loaded?()","new()","new()","new()","new()","new()","new()","new()","new()","new?()","preference_file_loaded?()","print()","reset()","reset()","reset()","reset()","reset_config()","sort()","sort!()","sort_reverse()","sub_header_depth=()","to_h()","to_h()","to_json()","to_json()","to_s()","write()","write_file()","readme"],"longSearchIndex":["standupmd","standupmd::cli","standupmd::cli::helpers","standupmd::config","standupmd::config::cli","standupmd::config::entry","standupmd::config::entrylist","standupmd::config::file","standupmd::entry","standupmd::entrylist","standupmd::file","standupmd::version","standupmd::entrylist#<<()","standupmd::entry#<=>()","standupmd::entrylist#@entries()","standupmd::config::file#bullet_character=()","standupmd::config()","standupmd::cli::config()","standupmd::entry::config()","standupmd::entrylist::config()","standupmd::file::config()","standupmd::config_file_loaded?()","standupmd::configure()","standupmd::entry::create()","standupmd::config::file#directory=()","standupmd::cli#echo()","standupmd::cli::echo()","standupmd::cli#edit()","standupmd::cli::execute()","standupmd::file#exist?()","standupmd::entrylist#filter()","standupmd::entrylist#filter!()","standupmd::entrylist#find()","standupmd::file::find()","standupmd::file::find_by_date()","standupmd::config::file#header_depth=()","standupmd::config::entrylist#initalize()","standupmd::file#load()","standupmd::file::load()","standupmd::load_config_file()","standupmd::cli#load_preferences()","standupmd::file#loaded?()","standupmd::cli::new()","standupmd::config::new()","standupmd::config::cli::new()","standupmd::config::entry::new()","standupmd::config::file::new()","standupmd::entry::new()","standupmd::entrylist::new()","standupmd::file::new()","standupmd::file#new?()","standupmd::cli#preference_file_loaded?()","standupmd::cli::helpers#print()","standupmd::config::cli#reset()","standupmd::config::entry#reset()","standupmd::config::entrylist#reset()","standupmd::config::file#reset()","standupmd::reset_config()","standupmd::entrylist#sort()","standupmd::entrylist#sort!()","standupmd::entrylist#sort_reverse()","standupmd::config::file#sub_header_depth=()","standupmd::entry#to_h()","standupmd::entrylist#to_h()","standupmd::entry#to_json()","standupmd::entrylist#to_json()","standupmd::version::to_s()","standupmd::file#write()","standupmd::cli#write_file()",""],"info":[["StandupMD","","StandupMD.html","","<p>The main module for the gem. Provides access to configuration classes.\n"],["StandupMD::Cli","","StandupMD/Cli.html","","<p>Class for handing the command-line interface.\n"],["StandupMD::Cli::Helpers","","StandupMD/Cli/Helpers.html","","<p>Module responsible for reading and writing standup files.\n"],["StandupMD::Config","","StandupMD/Config.html","","<p>This class provides a connector from StandupMD to the configuration classes.\n"],["StandupMD::Config::Cli","","StandupMD/Config/Cli.html","","<p>The configuration class for StandupMD::Cli\n"],["StandupMD::Config::Entry","","StandupMD/Config/Entry.html","","<p>The configuration class for StandupMD::Entry\n"],["StandupMD::Config::EntryList","","StandupMD/Config/EntryList.html","","<p>The configuration class for StandupMD::EntryList\n"],["StandupMD::Config::File","","StandupMD/Config/File.html","","<p>The configuration class for StandupMD::File\n"],["StandupMD::Entry","","StandupMD/Entry.html","","<p>Class for handling single entries. Includes the comparable module, and compares by date.\n"],["StandupMD::EntryList","","StandupMD/EntryList.html","","<p>Enumerable list of entries.\n"],["StandupMD::File","","StandupMD/File.html","","<p>Class for handling reading and writing standup files.\n"],["StandupMD::Version","","StandupMD/Version.html","","<p>Module that contains all gem version information. Follows semantic versioning. Read: semver.org/\n"],["<<","StandupMD::EntryList","StandupMD/EntryList.html#method-i-3C-3C","(entry)","<p>Appends entries to list.\n<p>@param [StandupMD::Entry] entry\n<p>@return [Array]\n"],["<=>","StandupMD::Entry","StandupMD/Entry.html#method-i-3C-3D-3E","(other)","<p>Sorting method for Comparable. Entries are compared by date.\n"],["@entries","StandupMD::EntryList","StandupMD/EntryList.html#method-i-40entries","","<p>The following are forwarded to @entries, which is the underly array of entries.\n<p><code>each</code> &mdash; Iterate over each …\n"],["bullet_character=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-bullet_character-3D","(char)","<p>Setter for bullet_character. Must be * (asterisk) or - (dash).\n<p>@param [String] character\n<p>@return [String] …\n"],["config","StandupMD","StandupMD.html#method-c-config","()","<p>Method for accessing the configuration.\n<p>@return [StanupMD::Cli]\n"],["config","StandupMD::Cli","StandupMD/Cli.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::Cli]\n"],["config","StandupMD::Entry","StandupMD/Entry.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::Entry]\n"],["config","StandupMD::EntryList","StandupMD/EntryList.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::EntryList]\n"],["config","StandupMD::File","StandupMD/File.html#method-c-config","()","<p>Access to the class&#39;s configuration.\n<p>@return [StandupMD::Config::EntryList]\n"],["config_file_loaded?","StandupMD","StandupMD.html#method-c-config_file_loaded-3F","()","<p>Has a config file been loaded?\n<p>@return [Boolean]\n"],["configure","StandupMD","StandupMD.html#method-c-configure","()","<p>Allows for configuration via a block. Useful when making config files.\n<p>@example\n\n<pre>StandupMD.configure { |s| ...</pre>\n"],["create","StandupMD::Entry","StandupMD/Entry.html#method-c-create","()","<p>Creates a generic entry. Default values can be set via configuration. Yields the entry if a block is …\n"],["directory=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-directory-3D","(directory)","<p>Setter for directory. Must be expanded in case the user uses `~` for home. If the directory doesn&#39;t …\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-i-echo","(msg)","<p>Quick access to Cli.echo.\n<p>@return [nil]\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-c-echo","(msg)","<p>Prints output if <code>verbose</code> is true.\n<p>@return [nil]\n"],["edit","StandupMD::Cli","StandupMD/Cli.html#method-i-edit","()","<p>Opens the file in an editor. Abandons the script.\n<p>@return [nil]\n"],["execute","StandupMD::Cli","StandupMD/Cli.html#method-c-execute","(options = [])","<p>Creates an instance of <code>StandupMD</code> and runs what the user requested.\n"],["exist?","StandupMD::File","StandupMD/File.html#method-i-exist-3F","()","<p>Does the file exist?\n<p>@return [Boolean] true if exists\n"],["filter","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter","(start_date, end_date)","<p>Returns entries that are between the start and end date. This method assumes the list has already been …\n"],["filter!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter-21","(start_date, end_date)","<p>Replaces entries with results of filter.\n<p>@param [Date] start_date\n<p>@param [Date] end_date\n"],["find","StandupMD::EntryList","StandupMD/EntryList.html#method-i-find","(date)","<p>Finds an entry based on date. This method assumes the list has already been sorted.\n<p>@param [Date] date …\n"],["find","StandupMD::File","StandupMD/File.html#method-c-find","(file_name)","<p>Find standup file in directory by file name.\n<p>@param [String] File_naem\n"],["find_by_date","StandupMD::File","StandupMD/File.html#method-c-find_by_date","(date)","<p>Find standup file in directory by Date object.\n<p>@param [Date] date\n"],["header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-header_depth-3D","(depth)","<p>Number of octothorps (#) to use before the main header.\n<p>@param [Integer] depth\n<p>@return [Integer]\n"],["initalize","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-initalize","()","<p>Initializes the config with default values.\n"],["load","StandupMD::File","StandupMD/File.html#method-i-load","()","<p>Loads the file&#39;s contents. TODO clean up this method.\n<p>@return [StandupMD::FileList]\n"],["load","StandupMD::File","StandupMD/File.html#method-c-load","(file_name)","<p>Convenience method for calling File.find(file_name).load\n<p>@param [String] file_name\n<p>@return [StandupMD::File] …\n"],["load_config_file","StandupMD","StandupMD.html#method-c-load_config_file","(file)","<p>Loads a config file.\n<p>@param [String] file\n<p>@return [String] file\n"],["load_preferences","StandupMD::Cli","StandupMD/Cli.html#method-i-load_preferences","()","<p>Load the preference file.\n<p>@return [nil]\n"],["loaded?","StandupMD::File","StandupMD/File.html#method-i-loaded-3F","()","<p>Has the file been loaded?\n<p>@return [Boolean] true if loaded\n"],["new","StandupMD::Cli","StandupMD/Cli.html#method-c-new","(options = [], load_config = true)","<p>Constructor. Sets defaults.\n<p>@param [Array] options\n"],["new","StandupMD::Config","StandupMD/Config.html#method-c-new","()","<p>Builds the links to the configuration classes.\n"],["new","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Config::File","StandupMD/Config/File.html#method-c-new","()","<p>Initializes the config with default values.\n"],["new","StandupMD::Entry","StandupMD/Entry.html#method-c-new","(date, current, previous, impediments, notes = [])","<p>Constructs instance of <code>StandupMD::Entry</code>.\n<p>@param [Date] date\n<p>@param [Array] current\n"],["new","StandupMD::EntryList","StandupMD/EntryList.html#method-c-new","(*entries)","<p>Contruct a list. Can pass any amount of <code>StandupMD::Entry</code> instances.\n<p>@param [Entry] entries\n<p>@return [StandupMD::EntryList] …\n"],["new","StandupMD::File","StandupMD/File.html#method-c-new","(file_name)","<p>Constructs the instance.\n<p>@param [String] file_name\n<p>@return [StandupMP::File]\n"],["new?","StandupMD::File","StandupMD/File.html#method-i-new-3F","()","<p>Was the file just now created?\n<p>@return [Boolean] true if new\n"],["preference_file_loaded?","StandupMD::Cli","StandupMD/Cli.html#method-i-preference_file_loaded-3F","()","<p>Has the preference file been loaded?\n<p>@return boolean\n"],["print","StandupMD::Cli::Helpers","StandupMD/Cli/Helpers.html#method-i-print","(entry)","<p>Print an entry to the command line.\n<p>@param [StandupMD::Entry] entry\n<p>@return [nil]\n"],["reset","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset","StandupMD::Config::File","StandupMD/Config/File.html#method-i-reset","()","<p>Sets all config values back to their defaults.\n<p>@return [Hash]\n"],["reset_config","StandupMD","StandupMD.html#method-c-reset_config","()","<p>Reset all configuration values to their defaults.\n<p>@return [StandupMD::Config]\n"],["sort","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort","()","<p>Returns a copy of self sorted by date.\n<p>@return [StandupMD::EntryList]\n"],["sort!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort-21","()","<p>Replace entries with sorted entries by date.\n<p>@return [StandupMD::EntryList]\n"],["sort_reverse","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort_reverse","()","<p>Returns a copy of self sorted by date.\n<p>@return [StandupMD::EntryList]\n"],["sub_header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-sub_header_depth-3D","(depth)","<p>Number of octothorps (#) to use before sub headers (Current, Previous, etc).\n<p>@param [Integer] depth\n<p>@return …\n"],["to_h","StandupMD::Entry","StandupMD/Entry.html#method-i-to_h","()","<p>Entry as a hash .\n<p>@return [Hash]\n"],["to_h","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_h","()","<p>The list as a hash, with the dates as keys.\n<p>@return [Hash]\n"],["to_json","StandupMD::Entry","StandupMD/Entry.html#method-i-to_json","()","<p>Entry as a json object.\n<p>@return [String]\n"],["to_json","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_json","()","<p>The entry list as a json object.\n<p>@return [String]\n"],["to_s","StandupMD::Version","StandupMD/Version.html#method-c-to_s","()","<p>Version as <code>MAJOR.MINOR.PATCH</code>\n"],["write","StandupMD::File","StandupMD/File.html#method-i-write","(**dates)","<p>Writes a new entry to the file if the first entry in the file isn&#39;t today. This method is destructive; …\n"],["write_file","StandupMD::Cli","StandupMD/Cli.html#method-i-write_file","()","<p>Writes entries to the file.\n<p>@return [Boolean] true if file was written\n"],["README","","README_md.html","","<p>The Standup Doctor\n<p><img src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fevanthegrayt%2Fstandup_md%2Fbadge%3Fref%3Dmaster&style=flat\"> …\n\n<blockquote>"]]}}
Binary file
@@ -42,7 +42,6 @@
42
42
  <li><a href="README_md.html#label-Adding+an+entry+for+today+via+editor">Adding an entry for today via editor</a>
43
43
  <li><a href="README_md.html#label-Copy+the+entry+for+today+to+clipboard">Copy the entry for today to clipboard</a>
44
44
  <li><a href="README_md.html#label-Add+entry+to+file+without+opening+it">Add entry to file without opening it</a>
45
- <li><a href="README_md.html#label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.</a>
46
45
  <li><a href="README_md.html#label-Customization+and+Runtime+Options">Customization and Runtime Options</a>
47
46
  <li><a href="README_md.html#label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults</a>
48
47
  <li><a href="README_md.html#label-Executable+Flags">Executable Flags</a>
data/lib/standup_md.rb CHANGED
@@ -17,7 +17,7 @@ module StandupMD
17
17
  #
18
18
  # @return [StanupMD::Cli]
19
19
  def self.config
20
- @config ||= StandupMD::Config.new
20
+ @config || reset_config
21
21
  end
22
22
 
23
23
  ##
@@ -49,11 +49,14 @@ module StandupMD
49
49
  # Loads a config file.
50
50
  #
51
51
  # @param [String] file
52
+ #
53
+ # @return [String] file
52
54
  def self.load_config_file(file)
53
- file = ::File.expand_path(file)
54
- raise "File #{file} does not exist." unless ::File.file?(file)
55
+ ::File.expand_path(file).tap do |file|
56
+ raise "File #{file} does not exist." unless ::File.file?(file)
55
57
 
56
- @config_file_loaded = true
57
- load file
58
+ @config_file_loaded = true
59
+ load file
60
+ end
58
61
  end
59
62
  end
@@ -28,13 +28,13 @@ module StandupMD
28
28
  ##
29
29
  # Creates an instance of +StandupMD+ and runs what the user requested.
30
30
  def self.execute(options = [])
31
- exe = new(options)
32
-
33
- exe.write_file if config.write
34
- if config.print
35
- exe.print(exe.entry)
36
- elsif config.edit
37
- exe.edit
31
+ new(options).tap do |exe|
32
+ exe.write_file if config.write
33
+ if config.print
34
+ exe.print(exe.entry)
35
+ elsif config.edit
36
+ exe.edit
37
+ end
38
38
  end
39
39
  end
40
40
 
@@ -125,25 +125,22 @@ module StandupMD
125
125
  # @return [StandupMD::Entry]
126
126
  def new_entry(file)
127
127
  entry = file.entries.find(config.cli.date)
128
- if entry.nil? && config.cli.date == Date.today
129
- previous_entry = set_previous_entry(file)
130
- entry = StandupMD::Entry.new(
131
- config.cli.date,
132
- config.entry.current,
133
- previous_entry,
134
- config.entry.impediments,
135
- config.entry.notes
136
- )
137
- file.entries << entry
138
- end
139
- entry
128
+ return entry unless entry.nil? && config.cli.date == Date.today
129
+
130
+ StandupMD::Entry.new(
131
+ config.cli.date,
132
+ config.entry.current,
133
+ previous_entry(file),
134
+ config.entry.impediments,
135
+ config.entry.notes
136
+ ).tap { |entry| file.entries << entry }
140
137
  end
141
138
 
142
139
  ##
143
140
  # The "previous" entries.
144
141
  #
145
142
  # @return [Array]
146
- def set_previous_entry(file)
143
+ def previous_entry(file)
147
144
  return config.entry.previous_entry unless config.cli.auto_fill_previous
148
145
 
149
146
  return prev_entry(prev_file.load.entries) if file.new? && prev_file
@@ -200,9 +200,9 @@ module StandupMD
200
200
  #
201
201
  # @return [String]
202
202
  def directory=(directory)
203
- directory = ::File.expand_path(directory)
204
- FileUtils.mkdir_p(directory) unless ::File.directory?(directory)
205
- @directory = directory
203
+ @directory = ::File.expand_path(directory).tap do |directory|
204
+ FileUtils.mkdir_p(directory) unless ::File.directory?(directory)
205
+ end
206
206
  end
207
207
  end
208
208
  end
@@ -80,11 +80,11 @@ module StandupMD
80
80
  raise unless date.is_a?(Date)
81
81
  @config = self.class.config
82
82
 
83
- @date = date
84
- @current = current
85
- @previous = previous
86
- @impediments = impediments
87
- @notes = notes
83
+ @date = date
84
+ @current = current
85
+ @previous = previous
86
+ @impediments = impediments
87
+ @notes = notes
88
88
  end
89
89
 
90
90
  ##
@@ -16,7 +16,7 @@ module StandupMD
16
16
 
17
17
  ##
18
18
  # Patch version.
19
- PATCH = 8
19
+ PATCH = 9
20
20
 
21
21
  ##
22
22
  # Version as +MAJOR.MINOR.PATCH+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standup_md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Gray
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2021-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake